Process a transaction using saved card details (charge stored card) - [UK Specific]
This API flow is mandatory in the UK for processing a transaction using a saved card. As 3DS is mandatory due to the regulatory compliance requirements around the processing of card transactions where 3DS is mandatory on Customer-Initiated-Transactions for eCommerce, charge stored card and on the first transaction.
Note - 3DS is mandatory in the UK for processing a transaction using saved card details if it is a Customer-Initiated-Transaction.
API Steps to implement - Process a transaction using saved card details [UK]
Process a transaction using saved card details
When you submit a CIT request the function will process a 3DS real-time card transaction on the card account currently registered to the payer. This will then require a challenge for the end user to complete the 3DS challenge or be completed frictionless.
If it is an MIT payment request, this will not prompt 3DS and will not go through a challenge.
If a 3DS challenge is required a re-directUrl is returned in the response to direct the user to complete the 3DS challenge. Redirect the user and store the redirectId as this is required to finalise the transaction in step 4.
Once the 3DS challenge is complete, the user will be directed back to the CallbackURL to trigger the notification that the submission is complete. Finalise the 3DS transaction by retrieving the result
Step 1 - Process a transaction using saved card details
API |
---|
POST 3DS - Process a transaction using saved card details
|
Sample |
---|
Example Request
JSON
JSON
Example Response for 3DS challenge required
JSON
|
Stored Card Transaction Model
Property | Type | Description |
---|---|---|
| How the transaction is to be processed | |
| string(100) | Unique reference you provide to identify the transaction (must be unique across all your transactions) |
| decimal | Amount of the transaction (include decimal point for currencies with cents). |
| string(128) | You can provide additional information to describe the transaction |
| Date the service will be provided, ie Booking date. Optional. | |
| string(128) | For handling of the challenge scenario, you must provide a URL for your website that your customer will be redirected back to after the verification process. The URL should contain an id/reference that uniquely identifies the transaction that you are attempting to process so you can pick up where you left off when the customer is redirected back to your site |
| When using 3-D Secure, in order for the card's issuing bank to provide a challenge UI to your customer that is rendered appropriately for the device that your customer is using, the 3-D Secure system requires you to collect and pass-through information on the following information about the browser that your customer is using | |
| enum | Used to specify if you are storing the card you are providing, and whether or not it is CIT or MIT. See here for possible values. |
| enum | Used to specify the nature of the authorization. See below for allowed values. See here for possible values. |
| Can be used to provide tracking information of the user of your system who is performing the action |
*Required
**Required for UK
Step 2 - If a 3DS challenge is required, redirect the user to the redirectUrl to complete challenge
Re-direct the user to the redirectUrl.
Store the redirectId to finalise the transaction.
Example from above:
"redirectId": "7595a884ca3744ac83f5a033d48a2896",
Step 3 - Finalise the 3DS transaction
API |
---|
POST ChargeStoredCard - 3D Secure Finalize Transaction
|
Sample |
---|
Example Request
JSON
Example Response
JSON
|
3DS Test Cards to test different cases
When testing the 3DS supports a few different card numbers for triggering different scenarios:
Frictionless Success | Frictionless Fail | Challenge Required |
---|---|---|
4907639999909022 | 5283901906612672 | 4918914107195005 |
4016360000000010 | 4016360000000028 | 4016360000000093 |
What to do if the payment is failed / rejected?
Depending on the scenario and reason for the rejection, you can simply re-attempt payment via the same API workflow. However, if the payment has failed due to ‘insufficient funds’, it is recommended to have the business contact the payer before re-attempting payment to ensure sufficient funds are available to reduce the risk of the payment failing once more.
This concludes the API workflow of implementing the Process a transaction using saved card (charge stored card) to your application. Refer to our other methods available for accepting payments.