POST
/api/public/v1/billing/payment-methods/set-default

Set default payment method

Change which payment method is used as the default for charges.

Request Body

PropertyTypeDescription
paymentMethodIdstringStripe payment method ID.
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/billing/payment-methods/set-default" \
  -H "X-Organization-Id: your_org_id" \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "paymentMethodId": "pm_123"
  }'
200Example response
json
{
  "message": "Default payment method updated successfully!",
  "content": {
    "defaultPaymentMethodId": "pm_123"
  }
}