PaymentsAPI
Docs for payments API methods.
1. getDeviceSerialNumber
getDeviceSerialNumber(): Promise<string>Returns serial number of device as typestring.
2. getReceipt
getReceipt(txnId: string): Promise<TransactionReceiptData>Returns receipt data for the particular transaction ID.
Accepts transactionId as parameter.
Returns TransactionReceiptData:
date: string;
approvalCode: string;
appVersion: string;
businessName: string;
retrievalReferenceNumber: string;
deviceId: number;
responseCode: string;
issuerCTI: string;
merchantTidVisibility: number;
'9F12': string;
merchantId: string;
'9F11': string;
appId: string;
appPerName: string;
timestampGMT: string;
fullCardType: string;
acquirerName: string;
batchNumber: string;
longitude: string;
ac: string;
receivingInstitutionCode: string;
transactionID: string;
firstName: string;
tvr: string;
custMaskedCardNumber: string;
tipOption: string;
tgTransactionID: string;
creditDebitCardType: string;
billNumber: string;
applicationId: string;
processingFeeMode: string;
cardNumber: string;
acquirerLogo: string;
statusCode: string;
cid: string;
latitude: string;
offlineCounter: string;
custTidVisibility: number;
terminalId: string;
tsi: string;
creditDebitCardTypeName: string;
result: string;
processingMerchantCode: string;
expiryDate: string;
refTransactionType: string;
appLabel: string;
invoiceNumber: string;
currency: string;
cashBackAmount: string;
tgName: string;
cashBack: string;
issuerBankName: string;
amount: string;
merchantMidVisibility: number;
cardHolderName: string;
address2: string;
tipAmount: string;
transactionStatus: string;
transactionMode: string;
address1: string;
cardType: string;
custMidVisibility: number;
'9F06': string;
message: string;
balanceAmount: string;
transactionType: number;
isPinVerified: boolean;
stan: string;
time: string;
isSignatureRequired: boolean;
orderId: string;
shipperId: string;
transType: string;3. readCardNumber
Gives card details currently inserted in the POS device.
Accepts commandCallback : CommandCallbackFunction : (command: string) => void. Callback function to be passed if commands are required which are generated by payment device.
Example :
Returns ReadCardNumberResult :
4. voidTransaction
Voids a transaction for the given transaction ID.
Accepts transactionId as parameter.
Accepts commandCallback : CommandCallbackFunction : (command: string) => void. Callback function to be passed if commands are required which are generated by payment device.
Returns TransactionReceiptData:
5. initiateTransaction
Initiates transaction on device.
Accepts : InitiateTransactionInput :
orderAmount : string : The amount for which to initiate the transaction.
description?: string : Transaction Description
phoneNumber?: string : Customers phone number
cashbackAmount?: string : Cashback amount to be given.
Accepts commandCallback : CommandCallbackFunction : (command: string) => void. Callback function to be passed if commands are required which are generated by payment device.
Returns TransactionReceiptData
6. printChargeSlip
Prints charge slip of the transaction.
Accepts : printChargeSlipInput : PrintChargeSlipInput :
transactionId : string : Transaction id for which charge slip needs to be printed.
isMerchantCopy : boolean : To print merchant copy if true, customer copy if false
isDuplicateCopy : boolean : To print duplicate charge slip
Returns void
7. isAutoPrintEnabled
Checks if auto print is enabled or not.
Returns boolean
Last updated
Was this helpful?