v1

latestOpenAPI 3.1.02026-07-26270268.6 KB

Initiate Authentication

post/v6/direct/authenticate/initiate

Request body

sessionIdstring required

A session ID, is a unique identifier that a server generates as part of the create session API call and assigns to a merchant transaction for the duration of the session (15 min).

cardNumberstring required

Valid card number, as a string without any separators. Length of 16 for Visa, MasterCard, Mada cards. Length of 15 for American Express cards.

ReturnUrlstring required

The URL where the client will be automatically redirected to once the Authentication process has been successful. Must be dynamic, based on the order being created. Must be a URL with a HTTPS protocol.

merchantNamestring

Name of the merchant initiating the transaction

callbackUrlstring

The URL where the response containing order details will be returned. Must be a valid URL and must have an HTTPS protocol.

isSetPaymentMethodEnabledboolean

If this is set to true, then the customer is allowed to use the payment gateway

isCreateCustomerEnabledboolean

If this is set to true, then the customer account will be created and can be used for later transactions.

paymentOperation'Pay' | 'PreAuthorize' | 'AuthorizeCapture'

Type of payment operation that is carried out with this transaction

cardOnFileboolean

This field only applies if you collect details of card from your payers, store them, and either you or your payers use the stored value for subsequent payments.

restrictPaymentMethodsboolean

Flag indicating whether certain type of payment methods are restricted for this transaction

source'HPP. MobileApp' | 'DirectAPI'

Source of capturing the transaction. Use "DirectAPI" for this call.

Response

200

orderIdstring
threeDSecureIdstring
redirectHtmlstring
gatewayDecisionstring
responseMessagestring
detailedResponseMessagestring
languagestring
responseCodestring
detailedResponseCodestring

Example response

{
  "orderId": "66001ccd-f8eb-446e-d634-08dd5bd373b9",
  "threeDSecureId": "428e2d83-b7af-43bd-176f-08dd5bd37492",
  "redirectHtml": "<div id=\"initiate3dsSimpleRedirect\" xmlns=\"http://www.w3.org/1999/html\"><iframe id=\"methodFrame\" name=\"methodFrame\" height=\"100\" width=\"200\"> </iframe><form id=\"initiate3dsSimpleRedirectForm\" method=\"POST\" action=\"https://centinelapistag.cardinalcommerce.com/V1/Cruise/Collect\"target=\"methodFrame\"> <input type=\"hidden\" name=\"JWT\" value=\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIyYTRiNTUwYi1mZTU2LTQ2MzUtYTk1Yy1lMzAzMTJkZjEwNDUiLCJpYXQiOjE3NDUzMDk1MjEsImlzcyI6IjVkZDgzYmYwMGU0MjNkMTQ5OGRjYmFjYSIsImV4cCI6MTc0NTMxMzEyMSwiT3JnVW5pdElkIjoiNjdlZmQ2MGZhMTQzZGU2NTc3MTFjMzIwIiwiUmVmZXJlbmNlSWQiOiJhNzI3ZWNkYS04Y2M2LTRiYmEtODlkMC1hZjFmNTI5NWM1MWIifQ.QfLEWPyuzpyhK-vFn40wisguHQtwEFso0T1lhGIDTTo\"/></form> <script id=\"initiate-authentication-script\"> var e = document.getElementById(\"initiate3dsSimpleRedirectForm\");if (e) { e.submit(); if (e.parentNode !== null) { e.parentNode.removeChild(e); } } </script> </div>",
  "gatewayDecision": "ContinueToPayer",
  "responseMessage": "Success",
  "detailedResponseMessage": "The operation was successful",
  "language": "en",
  "responseCode": "000",
  "detailedResponseCode": "000"
}