Once a transaction is captured and the funds are deducted from the customer's account, you can refund the full or partial amount back to them. The payment method associated with the original sale is used to refund the payer.
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.
Global reference of the original sale transaction for the sale system.
Identification of the transaction given by the Issuer.
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.
Identification of the invoice.
Transaction date time of the original sale transaction for the sale system.
POI identification of the transaction in an unambiguous way.
Value assigned by the authorising party.
Full Reversal is initiated to remove an approved transaction from a batch.
Partial Reversals Decreases the total authorized amount of a previously authorized transaction.
Additional information associated with the sale transaction.
Attendance context of the transaction.
Acquirer manager password for transaction verification.
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 RefundResult.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.
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.
Customer or Merchant payment receipt.
Various receipts.
Destination of the message.
Content or reference of the message.
Maximum number of characters allowed is 20000.
Global reference of the original sale transaction for the sale system.
Transaction date time of the original sale transaction for the sale system. Date: A particular point in the progression of time in a calendar year expressed in the yyyyMMdd format.
Additional information associated with the sale transaction.
RefundParam param = RefundParam.newBuilder()
.transactionReference("00000002")
.transactionType(TransactionType.RFND)
.orgTransactionReference("00000001")
.orgTransactionDateTime(new Date(1711421159000L)) //20240326
.totalAmount("49.99")
.build();
RetailerManager.provideFinancialService()
.newRefundExchange(param)
.startAsyncExchange(new Exchange.RetailerSDKCallback<RefundResult>() {
@Override
public void onError(int code, String msg) {
Logger.e(TAG, "refund failed: " + code + ", " + msg);
}
@Override
public void onResult(RefundResult result) {
Logger.i(TAG, "refund result: " + GsonUtils.toJson(result));
}
});using System;
using PayExplorerConnect;
public void HandleRefundError(int code, string message)
{
Console.WriteLine($"Error: {code}, Message: {message}");
}
public void HandleRefundResult(RefundResult result)
{
Console.WriteLine($"Response: {result.Response}");
}
public string StartRefund()
{
// Replace the sample values with your refund data and original payment details.
RefundParam param = new RefundParam.Builder()
.TransactionReference("00000002")
.TransactionType(TransactionType.RFND)
.OrgTransactionReference("00000001")
.OrgTransactionDateTime("2024-03-26T02:45:59.000+0000")
.TotalAmount("49.99")
.Build();
string exchangeId = RetailerManager
.ProvideFinancialService()
.NewRefundExchange(param)
.StartAsyncExchange(HandleRefundResult, HandleRefundError);
return exchangeId;
}#import <PayExplorerConnect/RetailerManager.h>
#import <PayExplorerConnect/RefundParam+Builder.h>
// Use the reference of the original payment.
RefundParam *params = [RefundParam makeWithBuilder:^(RefundParamBuilder *builder) {
builder.transactionReference(@"00000002");
builder.transactionType(TransactionTypeRFND);
builder.orgTransactionReference(@"00000001");
builder.totalAmount(@"49.99");
}];
[[RetailerManager sharedManager] refund: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;
}
RefundResult *refundResult = (RefundResult *)result;
// Handle refund result.
}];