Start a setup intent to acquire payment details on-site
POST
/cms/customer/payment/setup
const url = 'https://api.example.com/cms/customer/payment/setup';const options = { method: 'POST', headers: { 'API-Key': '<API-Key>', Authorization: 'Bearer <token>', Token: '<Token>', 'Content-Type': 'application/json' }, body: '{"payment_method":"example","parameters":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.example.com/cms/customer/payment/setup \ --header 'API-Key: <API-Key>' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Token: <Token>' \ --data '{ "payment_method": "example", "parameters": {} }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
payment_method
required
Payment method to setup
string
parameters
Additional setup parameters. Touch’n Go: {“authCode”: “…”, “authState”: “…”} exactly as received on the binding return URL; links the wallet for auto debit.
object
Example generated
{ "payment_method": "example", "parameters": {}}Responses
Section titled “Responses”Payment method setup successful
Media typeapplication/json
object
response
Setup response
object
Example generated
{ "response": {}}Bad Request
Unauthorized
Forbidden