Credit Card Sale

The credit card sale API obtains real-time authorization for a Credit Card Sale transaction and enters the transaction into the Unsettled batch
post
https://<PayEngine-host>
/api/payment/sale

Sample Request / Response

Request
Response

Example Request

{
"merchant_id": "a447b0b8-0dbb-4e07-bfc2-c35bba8d71e8",
"data": {
"transactionAmount": "110.00",
"cardToken": "card_sandbox_xxxx"
}
}

Example Request with 3DS

{
"merchant_id": "a447b0b8-0dbb-4e07-bfc2-c35bba8d71e8",
"attempt3DSecure": true,
"browserInfo": "COLLECTED USING CLIENT BROWSER",
"data": {
"transactionAmount": "110.00",
"cardToken": "card_sandbox_xxxx"
}
}

Example Response

{
"ID": "c03ce6ad-1e78-4bd7-ad35-e0d46b6b765d",
"TransactionID": "2a03cbbb-7c94-4c99-8bb5-b89767dca086",
"MerchantID": "b0ad3bfe-c7a1-4def-9840-6c9b2570d2ce",
"ThreeDSActionRequired": false,
"SaleResponse": {
"status": "PASS",
"responseCode": "A0000",
"responseMessage": "Success",
"authCode": "054518",
"hostReferenceNumber": "204723420634",
"hostResponseCode": "00",
"taskID": "3251193947",
"transactionID": "3066147279",
"transactionTimestamp": "2022-02-16T15:45:24",
"transactionAmount": "0.01",
"processedAmount": "0.01",
"totalAmount": "0.01",
"addressVerificationCode": "0",
"cvvVerificationCode": "M",
"cardType": "V",
"maskedCardNumber": "5890",
"commercialCard": "B",
"aci": "N",
"customerReceipt": "PRINTABLE RECEIPT",
"merchantReceipt": "PRINTABLE RECEIPT"
}
}

Example 3DS Response

{
"data": {
"ID": "785bee37-8e14-427e-ab07-a3b0c16756a7",
"TransactionID": "06c2aa36-f968-4205-a5dd-8bf455bdad59",
"MerchantID": "e6803b29-68a4-4c2a-b3ee-019dfad86c61",
"ThreeDSActionRequired": true,
"ThreeDSData": "eyJ0IjoiMDZjMmFhMzYtZjk2OC00MjA1LWE1ZGQtOGJmNDU1YmRhZDU5IiwiZSI6InNhbmRib3giLCJzIjoiMjAyMi0wMS0xOVQyMjozNDoyMS4wNzJaIiwidGhyZWVEU1NlcnZlclRyYW5zSUQiOiJjZjRjOGI2NS0wZjc5LTQzZjYtODhiZi0wMmYwNzYzZTgxMGQiLCJ0aHJlZURTTWV0aG9kVVJMIjoiaHR0cHM6Ly9hY3Muc2FuZGJveC4zZHNlY3VyZS5pby8zZHNtZXRob2QifQ",
"SaleResponse": {
"status": "PENDING_3DSAUTH"
}
}
}
For complete 3DS flow please refer to our 3D Secure developer guide.
Webhook event: PAYMENT_SALE

Webhook Payload Example

{
event_uid: '4d304a4ed5a4e338b4753ab832efd9c0',
event: 'PAYMENT_SALE',
data: {
account_id: 'e90c1de6-4e87-4c9e-bcbc-c535d6e349ec',
payment_id: '41c4772c-aa78-41d2-b60b-52de07ec6df2',
merchant_id: 'c404d923-226f-4aae-92da-22c1ef370434',
transaction_id: '549f998c-2733-4c75-9420-17d097e95156',
sale_response: {
status: 'PASS',
taskID: '37549653',
authCode: 'DSC633',
cardType: 'V',
totalAmount: '75.48',
responseCode: 'A0000',
transactionID: '12544747',
customerReceipt: '<Printable Customer Receipt>',
merchantReceipt: '<Printable Customer Receipt>',
processedAmount: '75.48',
responseMessage: 'Success',
hostResponseCode: '00',
maskedCardNumber: '1111',
transactionAmount: '75.48',
hostReferenceNumber: '937213156263',
transactionTimestamp: '2022-02-04T20:59:24',
addressVerificationCode: 'Z',
cardTransactionIdentifier: '123456789012345',
cardHolderVerificationCode: 'N'
}
}
}