3. Initiate Pay
Once the merchant request has been verified, this API is used to safely handle payment requests by encrypting card data using AES and RSA encryption.
API Endpoints
https://kwpaypg.casheer.com/COFWAY/InitiatePayhttps://kwpaypgsb.casheer.com/COFWAY/InitiatePaySample Request & Response
"Initiate pay request{
"ReferenceId" : "xxxxxxxxx"
"MerchantId": xxxxxx,
"ECardData" = "encryptedCard",
32BIT AES Encryption
"ECardKey" = "encryptedKey",
"ACS_CallbackURL"= "call back url for 3DS"+ReferenceId
}
}; {
"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 ObjectSample code to encrypt ECardData
ACS_CallbackURL
Response Explaination
Last updated