Customer is present and is offered to store the card details for the future card-on-file transactions. Merchant must obtain customer consent for initial storage of payment credentials and establish an agreement with the customer for ongoing/future payments. There are two possible scenarios to store card details.
Get token with the purchase
- Payment is initiated with the payment request using API endpoint /payments/oneoff and request_token’ = true
- Merchant will get payment initiation response with payment link.
- Customer inserts card details and payment is processed.
- Payment Gateway sends callback notification with payment_reference and order_reference to callback_url.
- To get card token merchant sends request with API endpoint /payments/payment_reference.
- Payment Gateway sends back response that includes cc_details.token.
- Customer is redirected back to merchant.
Get token without any actual purchase
- Payment is initiated with the payment request using API endpoint /payments/oneoff, ‘amount’ is set to zero and ‘request_token’ = true
- Merchant will get payment initiation response with payment link.
- Customer inserts card details and payment is processed.
- Payment Gateway sends callback notification with payment_reference and order_reference to callback_url.
- To get card token merchant send request with API endpoint /payments/payment_reference.
- Payment Gateway sends back response that includes cc_details.token.
- Customer user is redirected back to merchant.