Create credit card payment for ECOM
ECOM payment is the default type and returns an acsform, which is a HTML from used to perform the 3DS authentication.
A HTML page should be send to the user which include the acsform in the body and the following JS in the header:
<script>
onload = () => document.forms[0].submit();
</script>
The user will complete the 3DS form and submit.
After submission, the user will be returned to the predefined return URL with an encoded transaction ID.
An example of your HTML form is below, refer to the payment page doc for further details.
<!DOCTYPE html>
<html>
<head>
<script>
onload = () => document.forms[0].submit();
</script>
</head>
<body>
<form id="form3ds22" method="post" action="https://acs.********"><input type="hidden" name="creq" value="********">
<input type="hidden" name="threeDSPageSessions[427**************][bfreq]" value="*******">
<input type="hidden" name="threeDSPageSessions[427**************][threeDSRef]" value="****">
<input id="btnSubmit" type="submit" class="button expanded btn btn-primary" value="Process Payment">
</form>
</body>
</html>
- application/json
Request Body
- payment_intent string required
Payment intent token.
- paymentToken string required
Payment token generated from Create Payment Token request.
- type integer
Type 1 is ECOM payment and type 2 is MOTO. Default value is 1 i.e. ECOM.
- raw_amount number
Payment amount. If not present, it will fetch value from Intent resource.
- customer_email string
Customer email. If not present, it will fetch value from Intent resource.
- customer_name string
Customer name. If not present, it will fetch value from Intent resource.
- transaction_unique string required
Transaction unique.
- device_timezone string required
Device timezone value which can be fetched using javascript and assigned to the respective hosted input field. This value is required in 3DS.
- device_capabilities string required
Device capabilities which can be fetched using javascript and assigned to the respective hosted input field. This value is required in 3DS.
- device_accept_language string required
Device accept language which can be fetched using javascript and assigned to the respective hosted input field. This value is required in 3DS.
- device_screen_resolution string required
Device accept language which can be fetched using javascript and assigned to the respective hosted input field. This value is required in 3DS.
- remote_address string required
Remote address which can be fetched using javascript and assigned to the respective hosted input field. This value is required in 3DS.
- merchant_data object
- customer_address string
User’s address details. If not present, it will fetch value from Intent resource.
- customer_postcode string
User’s postcode. If not present, it will fetch value from Intent resource.
- 200
- 201
API response
- application/json
- Schema
- Example (from schema)
- Example
Schema
- acsform string
{
"acsform": "string"
}
{
"acsform": "<form id=\"form3ds22\" method=\"post\" action=\"https://acs.********\"><input type=\"hidden\" name=\"creq\" value=\"********\"> <input type=\"hidden\" name=\"threeDSPageSessions[427**************][bfreq]\" value=\"*******\"> <input type=\"hidden\" name=\"threeDSPageSessions[427**************][threeDSRef]\" value=\"****\"> <input id=\"btnSubmit\" type=\"submit\" class=\"button expanded btn btn-primary\" value=\"Process Payment\"> </form>"
}
Form submission response
- application/json
- Schema
- Example (from schema)
- Example
Schema
- url string
{
"url": "string"
}
{
"url": "https://api-demo-php.blinkpayment.co.uk/return?transaction_id=BL-MYU12345&status=captured¬e=Payment%2BSuccessful&merchant_data=%257B%2522order_id%2522%253A%2522cc-12345678%2522%257D"
}