Skip to main content

Add payment method

POST 

https://apis.<domain>/checkout/add-payment-method

Authorization: http

name: bearerTokentype: httpscheme: bearerin: headerdescription: Authorization Header: `Authorization: Bearer <user_token>`

Add payment method.

Authorization Action:

pay:methods:create

Request

Body

required
    cancel_url string

    If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website.

    success_url stringrequired

    The URL to which the customers is redirected when payment or setup is complete.

    payment_method_types string[]

    Possible values: [card, paypal, customer_balance]

    Default value: card

    customer string

    ID of an existing Customer, if one exists. If blank, a new Customer object based on information provided during the payment flow will be created.

Responses

Schema
    url stringrequired
curl -L -X POST 'https://apis.<domain>/checkout/add-payment-method' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"cancel_url": "string",
"success_url": "string",
"payment_method_types": [
"card"
],
"customer": "string"
}'
Request Collapse all
Base URL
https://apis.<domain>
Auth
Body required
{
"cancel_url": "string",
"success_url": "string",
"payment_method_types": [
"card"
],
"customer": "string"
}