Card Payments
Integration Flow (mada, Visa, Mastercard)
Preparation
Insert the Card Library into your project to collect card details and obtain a “Token ID”
Save Card - with an Authorize Transaction
- Request for the Token ID from the Card Library
- Create an Authorize Request
- Pass the “Token ID” in the Source.
- Pass a small amount (1 SAR, 0.100 KWD, BHD)
- Apply Auto Void after 1 hour - To auto void the amount
- Pass 3DS as True - To Authenticate with 3DS
- Pass Customer Initiated as True
- Pass Save Card as True - To save the card after a successful card 3DS Authentication and Authorization.
- Pass the Customer ID - Generated by the customer API in the customer object.
- Pass the correct MID related to each country.
- Pass the Redirect URL to redirect back after the 3DS Authentication
- Pass the Post URL to pass the response after the 3DS Authentication
- Save the following details from the Authorize Response for future transactions.
- Authorize ID
- Authorize Status
- Card ID
- Customer ID
- Payment Agreement ID
Manage Cards - Saved for your Customers
Retrieve the List of Cards under the Customer with the List of Card API using the Customer ID.
Transaction - Charge with a Saved Card
-
“Create a Token for a Saved Card” using the “Card ID”
- Pass Card ID
- Pass Customer ID
-
Step 2 - Create a Charge
- Pass “Token ID” in the Source
- Pass the amount to Charge
- SAR currency is required for Mada
- Pass 3DS as False
- Pass Customer Initiated as False
- Pass Save Card as False
- Pass Customer ID
- Pass Payment Agreement ID
- Pass the correct MID related to each country.
- No Post URL is Optional but recommended to push the info to your backend. Note - you will receive an immediate response, since no authentication will be needed with a Saved Card linked to a Payment Agreement.
-
Save the following details from the Authorize Response for future transactions.
- Charge ID
- Charge Status
Transaction - Authorize with a Saved Card
-
“Create a Token for a Saved Card” using the “Card ID”
- Pass Card ID
- Pass Customer ID
-
Create an Authorize
- Pass “Token ID” in the Source
- Pass the amount to Authorize
- Apply Auto Charge after X Hours (Recommended to apply “X” as your estimated delivery time plus a buffer,
- in order to void if necessary prior to the estimated delivery time. This will avoid the need to perform a Refund)
- Pass 3DS as False
- Pass Customer Initiated as False
- Pass Save Card as False
- Pass Customer ID
- Pass Payment Agreement ID
- Pass the correct MID related to each country.
- No Post URL is Optional but recommended to push the info to your backend. Note - you will receive an immediate response, since no authentication will be needed with a Saved Card linked to a Payment Agreement.
-
Step 3 - Save the following details from the Response
- Authorize ID
- Authorize Status
-
Step 4 (Only if you want to Void an Authorize) - Create a Void
- Authorize ID
Updated about 1 year ago