Skip to main content

Payment App to App

Inter-App Communication

Complete the order collection through the App-to-App method

1. Interface Protocol


1.1 Sale

  • Action: Sale

Request Params

VariableTypeRequiredDescription
actionenumYActions: Sale, Void, Refund, ...
referenceIDStringYReference ID: Every time a transaction request is initiated, it is crucial to ensure the uniqueness of this ID. Failure to do so will render any subsequent operations on the transaction invalid.
customerOrderIDStringNThe order ID of the customer's transaction
paymentMethodenumNPayment methods:
-credit_card,
-fps,
-octopus.
-consumer_presented_qr_code,
If the payment method is transmitted, it will directly redirect to the target page
currencyStringYExample: HKD / USD / RMB
amountStringYSale amount
printenumNYES/NO: To define whether the transaction is printed or not. YES means to print, and NO means not to print. default is YES
callbackStringNWhen Softpos finishes processing a sale, use this Deep Link to pass the response parameters.
This parameter requires the address to be encoded (URLEncoder)
Example:

String callback = "merchantpos://public/payment/result";

String encodedCallback = URLEncoder.encode(callback, "UTF-8");

Uri uri = Uri.parse(
"wondermpos://public/payment?action=Sale&...&callback=" + encodedCallback
);

wondermpos://public/payment?action=Sale&referenceID=5debf769-49d7-4c9b-b6f4-8a9d90e1a874&customerOrderID=123&currency=HKD&amount=100.00&callback={encodedCallback}

Response Params

VariableTypeRequiredDescription
statusStringYResponse status: Success / Failed
errorCodeStringY
errorMessageStringY
customerOrderIDStringNThe order ID of the customer's transaction
currencyStringNExample: HKD / USD / RMB
amountStringNSale amount
paymentMethodStringNPayment method
paymentEntryTypeStringNPayment entry types, Example: contactless
rrnStringNReceiver Reference Number
brnStringNBindo Reference Number
transactionTypeStringNTransaction type: Sale / PreAuth / Void / Refund
transactionTimeDatetimeNTransaction Time
creditCardObjectN
creditCard.panPrefix6DigitsStringYFirst 6 digits of the credit card number
creditCard.panLast4DigitsStringYLast 4 digits of the credit card number
creditCard.panHashStringYSHA512
creditCard.panTokenStringY

1.2 PreAuth

  • Action: PreAuth

Request Params

VariableTypeRequiredDescription
actionenumYActions: Sale, Void, Refund, ...
referenceIDStringYReference ID: Every time a transaction request is initiated, it is crucial to ensure the uniqueness of this ID. Failure to do so will render any subsequent operations on the transaction invalid.
customerOrderIDStringNThe order ID of the customer's transaction
paymentMethodenumNPayment methods:
-credit_card
currencyStringYExample: HKD / USD / RMB
amountStringYSale amount
printenumNYES/NO: To define whether the transaction is printed or not. YES means to print, and NO means not to print. default is YES
callbackStringNWhen Softpos finishes processing a sale, use this Deep Link to pass the response parameters.
This parameter requires the address to be encoded (URLEncoder)
Example:

String callback = "merchantpos://public/payment/result";

String encodedCallback = URLEncoder.encode(callback, "UTF-8");

Uri uri = Uri.parse(
"wondermpos://public/payment?action=PreAuth&...&callback=" + encodedCallback
);

wondermpos://public/payment?action=PreAuth&referenceID=5debf769-49d7-4c9b-b6f4-8a9d90e1a874&customerOrderID=123&currency=HKD&amount=100.00&callback={encodedCallback}

Response Params

VariableTypeRequiredDescription
statusStringYResponse status: Success / Failed
errorCodeStringY
errorMessageStringY
customerOrderIDStringNThe order ID of the customer's transaction
currencyStringNExample: HKD / USD / RMB
amountStringNSale amount
paymentMethodStringNPayment method
paymentEntryTypeStringNPayment entry types, Example: contactless
rrnStringNReceiver Reference Number
brnStringNBindo Reference Number
transactionTypeStringNTransaction type: Sale / PreAuth / Void / Refund
transactionTimeDatetimeNTransaction Time
creditCardObjectN
creditCard.panPrefix6DigitsStringYFirst 6 digits of the credit card number
creditCard.panLast4DigitsStringYLast 4 digits of the credit card number
creditCard.panHashStringYSHA512
creditCard.panTokenStringY

1.3 Void

  • Action: Void

Request Params

VariableTypeRequiredDescription
actionenumYActions: Sale, Void, Refund, ...
pwdStringYVoid password. It is currently the Store ID
orgReferenceIDStringYThe reference ID that was carried during the transaction made at that time.
printenumNYES/NO: To define whether the transaction is printed or not. YES means to print, and NO means not to print. default is YES
callbackStringNWhen Softpos finishes processing a void, use this Deep Link to pass the response parameters.
This parameter requires the address to be encoded (URLEncoder)
Example:

String callback = "merchantpos://public/payment/result";

String encodedCallback = URLEncoder.encode(callback, "UTF-8");

Uri uri = Uri.parse(
"wondermpos://public/payment?action=Void&...&callback=" + encodedCallback
);

wondermpos://public/payment?action=Void&pwd=123456&orgReferenceID=5debf769-49d7-4c9b-b6f4-8a9d90e1a874&callback={encodedCallback}

Response Params

VariableTypeRequiredDescription
statusStringYResponse status: Success / Failed
errorCodeStringY
errorMessageStringY

1.4 Refund

  • Action: Refund

Request Params

VariableTypeRequiredDescription
actionenumYActions: Sale, Void, Refund, ...
pwdStringYVoid password. It is currently the Store ID
referenceIDStringYReference ID: Every time a transaction request is initiated, it is crucial to ensure the uniqueness of this ID. Failure to do so will render any subsequent operations on the transaction invalid.
orgReferenceIDStringYThe reference ID that was carried during the transaction made at that time.
currencyStringYExample: HKD / USD / RMB
amountStringYRefund amount
printenumNYES/NO: To define whether the transaction is printed or not. YES means to print, and NO means not to print. default is YES
callbackStringNWhen Softpos finishes processing a refund, use this Deep Link to pass the response parameters.
This parameter requires the address to be encoded (URLEncoder)
Example:

String callback = "merchantpos://public/payment/result";

String encodedCallback = URLEncoder.encode(callback, "UTF-8");

Uri uri = Uri.parse(
"wondermpos://public/payment?action=Refund&...&callback=" + encodedCallback
);

wondermpos://public/payment?action=Refund&pwd=123456&referenceID=5debf769-49d7-4c9b-b6f4-8a9d90e1a874&orgReferenceID=4b02c099-4dc9-4b30-bd2c-27bf3223df6b&currency=HKD&amount=100.00&callback={encodedCallback}

Response Params

VariableTypeRequiredDescription
statusStringYResponse status: Success / Failed
errorCodeStringY
errorMessageStringY

1.5 Query Transaction Status

  • Action: TransactionStatus

Request Params

VariableTypeRequiredDescription
actionenumYActions: Sale, Void, Refund, ...
pwdStringYVoid password. It is currently the Store ID
targetReferenceIDStringYThe reference ID that was carried during the transaction made at that time.
callbackStringNWhen Softpos finishes processing a refund, use this Deep Link to pass the response parameters.
This parameter requires the address to be encoded (URLEncoder)
Example:

String callback = "merchantpos://public/payment/result";

String encodedCallback = URLEncoder.encode(callback, "UTF-8");

Uri uri = Uri.parse(
"wondermpos://public/payment?action=TransactionStatus&...&callback=" + encodedCallback
);

wondermpos://public/payment?action=TransactionStatus&pwd=123456&targetReferenceID=4b02c099-4dc9-4b30-bd2c-27bf3223df6b&callback={encodedCallback}

Response Params

This interface supports querying transactions related to Sale, Void, Refund, etc.
The response results can be referred to the relevant interfaces.