Skip to main content
POST
/
api
/
payment-methods
curl --request POST \
  --url https://sbx.api.easybilling.cloud/payment-hub/api/payment-methods \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "paymentGatewayType": "stripe-connect",
  "customerIdentifier": "user-12345",
  "redirectUrl": "https://example.com/payment/success",
  "cancelUrl": "https://example.com/payment/cancel"
}
'
"<string>"

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

trace-id
string
default:{{$string.uuid}}

Body

application/json

Polymorphic request payload for presetting a payment method.

The concrete schema is selected by paymentGatewayType:

  • stripe-connect -> StripePaymentMethodPresetRequest
  • payer-max-isv -> PayerMaxPaymentMethodPresetRequest
paymentGatewayType
enum<string>
required

Gateway type discriminator. Fixed value stripe-connect

Available options:
stripe-connect
Example:

"stripe-connect"

customerIdentifier
string
required

Unique customer identifier (for example user ID) used to query or create a gateway customer

Example:

"user-12345"

redirectUrl
string<uri>
required

Redirect URL after setup is completed

Example:

"https://example.com/payment/success"

cancelUrl
string<uri>
required

Stripe-only required field. Redirect URL when the user cancels setup on Stripe.

Example:

"https://example.com/payment/cancel"

Response

Success; returns the payment method setup page URL

Gateway-provided redirect URL to the setup page