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

Important considerations before you integrate.

  • Synchronous: You issue your request and wait for a response from PayEngine. Due to the customer interaction with the card reading device, the wait time could be up to 90 seconds.
  • You will receive a transaction ID and a normal transaction response and do not need to do any follow up polling to determine the results of the transaction.
  • Why use it: Less development, and the API response is identical to a standard sale API response. Parsing the response, if you already use the sale API, will be identical.
  • Caveats: Due to internet connectivity issues, if you lose internet connectivity while waiting for the API call, you will not receive the API response. This will require you to query PayEngine or log into the partner console to see the status of the transaction.

Sample Request / Response

Request
Response

Example Request

{
"merchant_id": "a447b0b8-0dbb-4e07-bfc2-c35bba8d71e8",
"data": {
"transactionAmount": "110.00",
"deviceId": "e68f0d4b-6a64-4426-a7b7-062be8e332e"
}
}

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"
}
}
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'
}
}
}
Copy link
On this page
post
Sample Request / Response