Keys and Parameters
When using the Unified Payment API, merchants need to pass in a
scenarioCode to specify the payment scenario as needed.
Create a QR Code order
QR Code orders are suitable for payment via PC and mobile browsers. Customer pay by scanning QR code with WeChat or Alipay.
Create a UnionPay/Alipay web order
Used for Alipay and UnionPay payments on the PC end, after creating an order, redirect to the returned
Create a JSAPI order
JSAPI is suitable for making payments through web pages opened within the WeChat or Alipay app. After placing an order, the user is redirected to the AlphaPay payment page and to complete payment.
Create a Native JSAPI order
To use the Native JSAPI, the WeChat Official Account needs to be verified, and the binding of the
After obtaining the
Create a H5 order
Note: Additional application is required for WeChat H5 payment
Create a SDK order
This approach is designed for mobile APP to initiate payment requests using WeChat/Alipay/UnionPay SDK. After creating an order through the API, the WeChat/Alipay/UnionPay SDK parameters will be returned, which are then passed to the corresponding SDK to initiate payment requests. The payment result is returned directly by the WeChat/Alipay/UnionPay client.
It is highly recommended to call the AlphaPay order query API to confirm the completion of payment after obtaining the payment result, then continue to proceed with the subsequent process. So that to avoid any funding loss caused by automatic cancellation due to timeouts.
After obtaining the
Click to download UnionPay SDK, demo and user guidance: Android, IOS. Pass the acquired
Create a mini-programs order
To integrate with WeChat mini-program, the overseas entity authentication process must be completed, and the authenticated entity must be consistent with the merchant entity registered on AlphaPay. This approach is used to initiate payment in mini-programs by passing the parameters returned by the API after creating an order. This interface supports WeChat and Alipay mini-programs.
After obtaining the
|The credit card order ||Merchants can integrate credit card payment method on their website, where users can input card number, expiration date, CVV, and other information to complete the payment.|
Create an offline QR code payment - Show QR code
Offline QR Code payment is used to integrate with cashier terminals without a scaner. After placing an order, the QR code URL and image scr is obtained. The QR code image will be displayed on the cashier terminals l screen. The customer uses the corresponding payment client to scan the QR code and complete the payment.
The customers scan the generated QR code by using the WeChat or Alipay mobile app to access the AlphaPay payment page.
Create a offline payment - Scan payment code
The offline payment order interface is used for docking with cashier terminals equipped with scanners. After the merchant enters the amount, the customer is required to present the payment code, and a scanner is used to scan the code, then the scanned content and amount are submitted together to complete the payment operation. The offline payment order interface is now compatible with WeChat, Alipay, and UnionPay QuickPass.
Merchants use a barcode scanner to scan the customer's payment code to complete the payment.
The payment status returned by querying a payment order.
|Waiting for payment to be completed|
|Payment order is closed|
|Order creation is failed or payment is failed|
The refund status of an order returned by querying a refund order.
|The refund is being processed|
|Refund submission succeeded AND refund processing succeeded|
|Refund submission failed OR refund processing failed|
Description code of business processing result
|Payment is processing|
|Order ID does not match the merchant|
|Order has been paid|
|The system encounters an internal exception/error.|
|Invalid merchant code or no corresponding merchant found|
|Signature timeout, the 'time' field differs from the server time by more than 5 minutes|
|The parameters do not meet the requirements, and specific details can be referred to in the resultMessage field|
|Invalid payment channel name. Please check the case sensitivity|
|This order has a refund request being processed, please try again later|
|The refund request is invalid as it has exceeded the valid date, which allows refunds up to one year from the date of the order.|
|Your refund request has been submitted. Please wait for the system to review it. Contact customer service at 1-855-937-7888|
|Refund amount is incorrect. Please modify and try again.|
|You do not have enough unsettled balance to complete the refund. If you have any questions, please contact AlphaPay at 1-855-937-7888|
|This order has been fully refunded.|
|Payment code is invalid|
The status of an API call, currently having:
S: API call succeeded.
F: API call failed, the
resultMessagefield will provide a detailed description of the error, which could be caused by either the merchant or the platform, when an error occurs during API invocation.
U: In cases where the handling result is unknown or in an intermediate state. Such as receiving a
PAYMENT_IN_PROCESSstatus after submitting a payment order, the query interface can be used to confirm the status of the payment result.