Skip to main content
POST
cURL
This endpoint doesn’t accept payment details. It starts a flow the customer completes themselves, described by nextAction in the response: The payment method can’t be used for billing until the customer completes the flow. It then appears in List payment methods. The id, customer and instrument fields of the 201 response are deprecated. Use paymentMethod.id instead.

Authorizations

X-Delegated-Token
string
header
required

Headers

X-Tenant-ID
string
required

Unique identifier of the tenant in the system (usually a store identifier)

Body

application/json
provider
enum<string>

The provider to add the payment method with.

Available options:
shopify,
mollie
instrumentType
enum<string>

The kind of payment method to add.

Available options:
credit-card,
sepa-direct-debit
returnUrl
string<uri>

Where the provider sends the customer back after its page. Required for Mollie.

Response

Default Response

provider
enum<string>
required

The provider the payment method is added with.

Available options:
shopify,
mollie
instrumentType
enum<string>
required

The instrument.type the payment method will have once added.

Available options:
credit-card,
sepa-direct-debit
paymentMethod
null | object
required

The payment method being added. It appears in GET /customer/v1/payment-methods once the customer has completed the email. null for Mollie, whose payment method is created once the customer has completed its page.

nextAction
object
required

What the customer has to do next. email: open the link in the email Shopify sent. redirect: go to url.

id
string<uuid>
required

Deprecated: use paymentMethod.id.

customer
string
required

Deprecated: always the authenticated customer's id.

instrument
object

Deprecated and never sent. Read the payment method from GET /customer/v1/payment-methods once added.