POS application sends a payment request to the payment terminal. The terminal then guides the shopper to complete the transaction by presenting their card, scanning a QR code, or using another supported payment method.
PaymentParam defines the request parameters for a payment transaction. The application creates a PaymentParam object with the required transaction information and uses it to initiate a payment request through the SDK.
Although the implementation may vary across platforms, the parameters and their meanings remain consistent.
Global reference of the sale transaction for the sale system.
Type of transaction being undertaken for the main service.
Total amount of the transaction.
Gratuity amount.
Currency associated with the transaction.
Three-letter ISO currency code.
Type of cardholder account used for the transaction.
A list of value added tax amounts.
Detailed amounts associated with the total amount of transaction.
Amount value.
Short description of the amount to display or print.
Identification of the cashier who carried out the transaction.
Cashback amount.
A list of Items purchased with the transaction.
Product code of the item.
Monetary value of purchased product.
Description of the product or item.
Label of the product or service.
Type of tax applied to the product or service.
Unit of measure of the item purchased.
Price per unit of product.
Product quantity.
Indicates whether the transaction process should continue when the app is running in the background.
Additional information associated with the sale transaction.
Attendance context of the transaction.
Acquirer manager password for transaction verification.
PaymentResult represents a payment response returned through the SDK result callback. After confirming the final response, use response and the related transaction fields to determine the payment outcome.
Copy from Request.
Copy from Request.
Unique identification of the partner that is the recipient of the message exchange.
For example, the POS SN
Result of the requested transaction.
Detail of the response. This field will be gradually replaced by respReason in future versions.
Additional information to be logged for further examination.
Custom status field returned in the transaction result.
When you receive the terminal result through the SDK callback interface and PaymentResult.response = SUCC, you can obtain additional transaction details (including reference numbers returned by the payment channel) to support your business requirements.
The following fields are defined, and the availability of each field depends on the capabilities provided by the payment application.
Total transaction amount.
Transaction time. timestamp: A particular point in the progression of time in a calendar year expressed in the yyyyMMddHHmmss format.
Currency associated with the transaction.
Three-letter ISO currency code.
Type of cardholder account used for the transaction.
Gratuity amount.
Outcome of the authorisation, and actions to perform.
Amount requested to be authorised.
Amount authorised for the payment transaction.
Masked PAN to be printed on payment receipts or displayed to the cardholder.
Brand of the card.
For example: Visa, MasterCard, CUP, JCB, DinersClub, AmericaExpress.
Payment instrument entry mode requested by the Sale System.
Identification of the cashier who carried out the transaction.
A list of value added tax amounts.
Detailed amounts associated with the total amount of transaction.
Amount value.
Short description of the amount to display or print.
Identification of the invoice.
Short name of the acquirer.
Unique identification of the merchant.
Name of the merchant.
Identification of the POI.
For example: Terminal ID.
Identification of the transaction given by the Issuer.
Unique identification of the reconciliation period between the acceptor and the acquirer.
For example: Batch Number.
POI identification of the transaction in an unambiguous way.
Cashback amount.
Customer or Merchant payment receipt.
Various receipts.
Destination of the message.
Content or reference of the message.
Maximum number of characters allowed is 20000.
Additional information associated with the sale transaction.
PaymentParam param = PaymentParam.newBuilder()
.transactionReference("500001")
.totalAmount("99.99")
.build();
RetailerManager.provideFinancialService()
.newPaymentExchange(param)
.startAsyncExchange(new Exchange.RetailerSDKCallback<PaymentResult>() {
@Override
public void onError(int code, String msg) {
// Called when a non-transaction request error occurs
}
@Override
public void onResult(PaymentResult result) {
// Handle payment result.
}
});using PayExplorerConnect;
public void HandlePaymentError(int code, string message)
{
// Called when a non-transaction request error occurs
}
public void HandlePaymentResult(PaymentResult result)
{
// Handle payment result.
}
public string StartPayment()
{
// Replace the sample values with your transaction data.
PaymentParam param = new PaymentParam.Builder()
.TransactionReference("500001")
.TotalAmount("99.99")
.Build();
string exchangeId = RetailerManager
.ProvideFinancialService()
.NewPaymentExchange(param)
.StartAsyncExchange(HandlePaymentResult, HandlePaymentError);
return exchangeId;
}#import <PayExplorerConnect/RetailerManager.h>
#import <PayExplorerConnect/PaymentParam+Builder.h>
PaymentParam *params = [PaymentParam makeWithBuilder:^(PaymentParamBuilder *builder) {
builder.transactionReference(@"500001");
builder.totalAmount(@"99.99");
}];
[[RetailerManager sharedManager] payment:params block:^(NSString *exchangeId) {
// Save the exchange ID to track this request.
} result:^(id result, NSInteger errcode, NSString *msg) {
if (errcode != 0 && result == nil) {
// Handle request error.
return;
}
PaymentResult *paymentResult = (PaymentResult *)result;
// Handle payment result.
}];