Request Params
flow
flowThe default value depends on payment method
| Value | Remark |
|---|---|
| indirect | including redirect to link, web URL, app, etc. |
| direct | including QR code, scan, ticket direct payment flow is always be direct(including subscription payment) |
terminal_type
terminal_typeOnly pass this param when flow = indirect
| Value | Remark |
|---|---|
| web | default |
| app |
customer_id
customer_idIf the customer_id parameter is passed, it becomes possible to query the transaction history of this customer.
Only one of the customer_id and mandate_id params can be passed.
mandate_id
mandate_idIf the mandate_id parameter is passed, as long as the mandate is valid, the payment becomes a direct payment, this means the debit can be initiated directly without the consumer's action to pay. It also identifies which customer paid for it. For more detail about the mandate, visit: Create Customer Mandate
Only one of the customer_id and mandate_id params can be passed.
Response Params
payment.action
payment.actiontype = redirect_to_url
type = redirect_to_urlExample:
{
"type": "redirect_to_url",
"redirect_to_url": {
"url": "https://some-gateway.com/api/open/v1/ac/cashier/self/codevalue/checkout.htm?codeValue=281666040095AYuV1kHYR6Ixph30nX449BfS"
}
Instruction:
Redirect customer to APP URL to continue
type = redirect_to_app
type = redirect_to_appExample:
{
"type": "redirect_to_app",
"redirect_to_app": {
"url": "alipays://platformapi/startApp?appId=10000007&actionType=route&qrcode=281666040091kpWB2tD6k9hJyn1kG1Vv3kSL&externalThrough=%7B%22acTerminalType%22%3A%22WAP%22%7D"
}
}
Instruction:
Redirect customer to URL to continue
type = verify_otp
type = verify_otpExample:
{
"type": "verify_otp"
}
Instruction:
Wait for the customer to receive OTP, gather OTP and call POST mandates/:mandate_id/verify API to continue
type = display_qr_code
type = display_qr_codeExample:
{
"type": "display_qr_code",
"display_qr_code": {
"data": "00020101021226730014B...sHOarh630455D4",
"image_url_svg": "",
"image_url_png": ""
}
}
Instruction:
Display the QR code to the customer to continue
type = display_details
type = display_detailsExample:
{
"type": "display_details",
"display_details": {
// fields here vary in different payment methods
}
}
Example for boleto_br:
{
"type": "display_details",
"display_details": {
"code": "33299958000000100000001119018473501600286435",
"number": "33290001151901847350416002864359995800000010000"
}
}
Example for banktransfer_mx:
{
"type": "display_details",
"display_details": {
"country": "",
"currency": "",
"bank_name": "",
"bank_code": "",
"bank_branch_name": "",
"bank_branch_code": "",
"account_holder_name": "",
"account_number": "",
"reference": ""
}
}
Example for paycash_mx:
{
"type": "display_details",
"display_details": {
"reference": ""
}
}
Instruction:
Display the details to the customer to continue
