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 /InitiatePay

Sample Request & Response

The request body should include the following fields:

 "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
     }
     
 };

Field Name
Type
Description

ReferenceId

string

15-digit reference id received in the validate requet response

MerchantId

string

Merchant code

ECardData

string

The encrypted card data encrypted using AES encryption with a 32-bit key. Explained below

ECardKey

string

The AES encryption key, encrypted using an RSA public key generated at here

ACS_CallbackURL

string

Explained here

Explanation of the ECardData Encryption Object

The ECardData field in the request is an encrypted representation of the sensitive card details. The following explains the object that is encrypted using AES encryption before being included in the API request:

{
    "CardNumber": "xxxxxxxxxxxxxxxx",//16-digit card number
    "CardName": "John Doe", //Name mentioned on card
    "CardExpiry": "mm/yy", //month/year format
    "CardCVV": "xxx" //3 decimal number
}

ACS_CallbackURL

  • If empty, the 3D Secure callback will be handled by the provider, and the user will be redirected to call back url provided in the step 1. For more info about redirection refer here.

  • If provided, the 3D Secure callback will be sent to the merchant's specified URL, and the merchant must call the API at here for further processing.

Last updated

Was this helpful?