1. getDeviceSerialNumber
Copy getDeviceSerialNumber(): Promise<string>
Returns serial number of device as typestring
.
2. getReceipt
Copy getReceipt(txnId: string): Promise<TransactionReceiptData>
Returns receipt data for the particular transaction ID.
Accepts transactionId
as parameter.
Returns TransactionReceiptData
:
Copy 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
Copy readCardNumber(commandCallback?: CommandCallbackFunction) : Promise<ReadCardNumberResult>
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 :
Copy mod91Sdk.PaymentsAPI.readCardNumber((command) => {
console.log("COMMAND", command)
});
Returns ReadCardNumberResult
:
Copy cardHash256: string;
cardHash: string;
cardHash512: string;
cardHash128: string;
cardBin: string;
result: boolean
4. voidTransaction
Copy voidTransaction(txnId: string ,commandCallback: CommandCallbackFunction): Promise<TransactionReceiptData>
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
:
Copy 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;
5. initiateTransaction
Copy initiateTransaction(initiateTransactionInput: InitiateTransactionInput, commandCallback?: CommandCallbackFunction): Promise<TransactionReceiptData> {
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
Copy 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;
6. printChargeSlip
Copy printChargeSlip(printChargeSlipInput: PrintChargeSlipInput): Promise<void>
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
Copy isAutoPrintEnabled() : Promise<boolean>
Checks if auto print is enabled or not.
Returns boolean
Last updated 9 months ago