Payment
This API can be used to make a payment transaction. Supported transaction types are Sale, Void and Refund.
Please note that if a payment request also consists of RegisterParameters then the registration process will be executed by using the given values in case of the current registered terminal does not match the provided one. The merchant (sales) app do not need to add register parameters if the registration has been completed earlier with that credentials (MID, TID, Activation Code).
TransactionTypes
TransactionTypes | Meaning |
---|---|
200 | Sales |
300 | Refund |
400 | Void |
PaymentParameters
Field | Description | Value |
---|---|---|
amount | amount for payment | 1000 |
orderId | client ref id for transaction | "9bda71c6-a4b1-414b-97ec-5d36873216f2" |
transactionId | txnID for original transaction (only for void or refund txn requests) | 300001231240 |
transactionType | transaction type indicator For all possible values please see table 4.1 | 200 |
Call example
PaymentParameters paymentParameters = new PaymentParameters();
paymentParameters.setAmount(100);
paymentParameters.setTransactionId(12312312314); // -> For Void and Refund Transactions Only!!
paymentParameters.setOrderId("09bda71c6-a4b1-414b-97ec-5d36873216f2");
paymentParameters.setTransactionType(200);
app2AppRequest.setPaymentParameters(paymentParameters);
ConfigParameters configParameters = new ConfigParameters();
configParameters.setDrawerMenuEnabled(true);
configParameters.setSalesButtonEnabled(true);
configParameters.setVoidButtonEnabled(true);
configParameters.setRefundButtonEnabled(true);
configParameters.setHistoryButtonEnabled(true);
configParameters.setSettingsButtonEnabled(false);
configParameters.setSettlementButtonEnabled(false);
configParameters.setTipScreenEnabled(false);
configParameters.setUserPhotoEnabled(false);
configParameters.setWorkingMode(0);
configParameters.setTimeout(-1);
// if timeout set to lower than zero, there is no timeout
// if time out set to greater than zero, softPOS will wait for that second value.
app2AppRequest.setConfigParameters(configParameters);
app2AppService.getPayment(app2AppRequest, eventListener);
Example request
{
"amount":"1400",
"transactionType":"200",
"configParameters": {
"drawerMenu": "1",
"salesButton": "1",
"voidButton": "1",
"refundButton": "1",
"historyButton": "1",
"settingsButton": "1",
"tipScreen":"0",
"userPhoto":"1",
"workingMode":"0"
},
"registerParameters": {
"terminalId": "16010129",
"merchantId": "000000009041042",
"activationCode": "testCode"
},
"customMessage":"{\"blikCode\":\"777777\"}"
}fi
Example response
Success
{
"transactionType": "200",
"appVersion": "1.2.10",
"amount": "5000",
"maskedPan": "**** **** **** 0516",
"transactionStatus": "success",
"customMessage": "{\"isoStan\":\"001017\"}",
"refusalCode": "00",
"transactionDate": "29-11-2022 15:47:24",
"transactionId": "233394301141"
}
Error
{
"transactionType": "200",
"transactionStatus": "decline",
"refusalCode": "96"
}
Updated 20 days ago