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

1
{
2
"merchant_id": "a447b0b8-0dbb-4e07-bfc2-c35bba8d71e8",
3
"data": {
4
"transactionAmount": "110.00",
5
"cardToken": "card_sandbox_xxxx"
6
}
7
}
Copied!

Example Request with 3DS

1
{
2
"merchant_id": "a447b0b8-0dbb-4e07-bfc2-c35bba8d71e8",
3
"attempt3DSecure": true,
4
"browserInfo": "COLLECTED USING CLIENT BROWSER",
5
"data": {
6
"transactionAmount": "110.00",
7
"cardToken": "card_sandbox_xxxx"
8
}
9
}
Copied!

Example Response

1
{
2
"ID": "c03ce6ad-1e78-4bd7-ad35-e0d46b6b765d",
3
"TransactionID": "2a03cbbb-7c94-4c99-8bb5-b89767dca086",
4
"MerchantID": "b0ad3bfe-c7a1-4def-9840-6c9b2570d2ce",
5
"ThreeDSActionRequired": false,
6
"SaleResponse": {
7
"status": "PASS",
8
"responseCode": "A0000",
9
"responseMessage": "Success",
10
"authCode": "054518",
11
"hostReferenceNumber": "204723420634",
12
"hostResponseCode": "00",
13
"taskID": "3251193947",
14
"transactionID": "3066147279",
15
"transactionTimestamp": "2022-02-16T15:45:24",
16
"transactionAmount": "0.01",
17
"processedAmount": "0.01",
18
"totalAmount": "0.01",
19
"addressVerificationCode": "0",
20
"cvvVerificationCode": "M",
21
"cardType": "V",
22
"maskedCardNumber": "5890",
23
"commercialCard": "B",
24
"aci": "N",
25
"customerReceipt": "PRINTABLE RECEIPT",
26
"merchantReceipt": "PRINTABLE RECEIPT"
27
}
28
}
Copied!

Example 3DS Response

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

Webhook Payload Example

1
{
2
event_uid: '4d304a4ed5a4e338b4753ab832efd9c0',
3
event: 'PAYMENT_SALE',
4
data: {
5
account_id: 'e90c1de6-4e87-4c9e-bcbc-c535d6e349ec',
6
payment_id: '41c4772c-aa78-41d2-b60b-52de07ec6df2',
7
merchant_id: 'c404d923-226f-4aae-92da-22c1ef370434',
8
transaction_id: '549f998c-2733-4c75-9420-17d097e95156',
9
sale_response: {
10
status: 'PASS',
11
taskID: '37549653',
12
authCode: 'DSC633',
13
cardType: 'V',
14
totalAmount: '75.48',
15
responseCode: 'A0000',
16
transactionID: '12544747',
17
customerReceipt: '<Printable Customer Receipt>',
18
merchantReceipt: '<Printable Customer Receipt>',
19
processedAmount: '75.48',
20
responseMessage: 'Success',
21
hostResponseCode: '00',
22
maskedCardNumber: '1111',
23
transactionAmount: '75.48',
24
hostReferenceNumber: '937213156263',
25
transactionTimestamp: '2022-02-04T20:59:24',
26
addressVerificationCode: 'Z',
27
cardTransactionIdentifier: '123456789012345',
28
cardHolderVerificationCode: 'N'
29
}
30
}
31
}
Copied!