Add payment method
POSThttps://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
- application/json
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
- 201
- application/json
- Schema
- Example (from schema)
Schema
url stringrequired
{
"url": "string"
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
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"
}'