3. Initiate Pay
After validating the merchant request, This API is used to process payment requests securely by encrypting card data using AES and RSA encryption.
API Endpoints
Direct Pay Production Base URL /InitiatePayDirect Pay Sandbox Base URL /InitiatePay Sample Request & Response
"Initiate pay request{
"ReferenceId" : "xxxxxxxxx",//15-digit reference id received in the validate requet response
"MerchantId": xxxxxx, //merchant code
"ECardData" = "encryptedCard", //card data encrypted using AES Encryption
"ECardKey" = "encryptedKey", // Encrypt the 32 digit AES key using the public key
"ACS_CallbackURL"= "call back url for 3DS"+ReferenceId //optional
}
};{
"errorCode": 0,
"errorMessgae": "SUCCESS",
"result": {
"authentication": {
"the3Ds1": null,
"the3Ds2": null,
"acceptVersions": null,
"channel": null,
"purpose": null,
"redirect": {
"customized": null,
"domainName": "ap.gateway.mastercard.com",
"html": "<div id=\"threedsChallengeRedirect\" xmlns=\"http://www.w3.org/1999/html\" style=\"height: 100vh\"> <form id =\"threedsChallengeRedirectForm\" method=\"POST\" action=\"https://ap.gateway.mastercard.com/acs/mastercard/v2/prompt\" target=\"challengeFrame\"> <input type=\"hidden\" name=\"creq\" value=\"eyJ0aHJlZURTU2VydmVyVHJhbnNJRCI6IjNmN2E4MmVjLTEzZjYtNDg2Ni05ODVjLTlkOTgxZjIzMGQ0OSJ9\" /> </form> <iframe id=\"challengeFrame\" name=\"challengeFrame\" width=\"100%\" height=\"100%\" ></iframe> <script id=\"authenticate-payer-script\"> var e=document.getElementById(\"threedsChallengeRedirectForm\"); if (e) { e.submit(); if (e.parentNode !== null) { e.parentNode.removeChild(e); } } </script> </div>"
},
"redirectHtml": null,
"version": "3DS2",
"the3Ds": null,
"method": "OUT_OF_BAND",
"payerInteraction": null
}
}
}Field Name
Type
Description
Explanation of the ECardData Encryption Object
ECardData Encryption ObjectACS_CallbackURL
Response Explaination
Last updated