Using the credit cards resource to accept ECOM and MOTO payments. For ECOM, the response will be an html form (acsform) that needs to be auto-submitted for the transaction to go through 3Ds checks. MOTO payments will be processed immediately.
Request Headers
For ECOM payments, as well as the authentication bearer token, there are additional parameters that need to be added to the request header.
Accept
Specifies the media types (MIME types) the client can process in the response (e.g.application/json
,text/html
).Accept-Encoding
Indicates the compression methods the client supports (e.g.gzip
,deflate
,br
)User-Agent
: Identifies the client making the request (browser, app, or bot) and its version (e.g.Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/120.0.0.0
).Content-Type
: Defines the media type of the request body (e.g.application/json
for JSON data orapplication/x-www-form-urlencoded
for form data)Accept-Charset
: Specifies the character encodings the client supports (e.g.,UTF-8
,ISO-8859-1
).
Request Body
payment_intent
(string, required): The payment intent token.paymentToken
(string, required): The tokenised card details.type
(integer, required): For ECOM, value is 1. For MOTO, value is 2.customer_email
(string, required): The email address of the customer making the payment.customer_name
(string, required): The name of the customer making the payment.transaction_unique
(string, required): A unique identifier for the transaction.device_timezone
(string, required): Device timezone value which can be fetched using javascript and assigned to the respective hosted input field.device_capabilities
(string, required): Device capabilities which can be fetched using javascript and assigned to the respective hosted input field.device_accept_language
(string, required): Device accept language which can be fetched using javascript and assigned to the respective hosted input field.device_screen_resolution
(string, required): Device accept language which can be fetched using javascript and assigned to the respective hosted input field.remote_address
(string, required): Remote address which can be fetched using javascript and assigned to the respective hosted input field.merchant_data
(json, optional): Additional custom data related to the merchant or customer.
Response
ECOM: acsform
(string): an html form to be submitted for 3DS screening. See here how to handle the 3DS form.
MOTO: url
(string): The return_url
entered in the intent with query parameters of the transaction result.
Successful response
Card Testing
For Card Testing information, please refer to the Test Credentials section of our API documentation.