Keys and Parameters
scenarioCode
When using the Unified Payment API, merchants need to pass in a scenarioCode
to specify the payment scenario as needed.
Online Payments
Parameter | Description |
---|---|
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. Payment Methods
|
Create a UnionPay/Alipay online web order | Used for Alipay and UnionPay payments on the PC end, after creating an order, redirect to the returned Payment MethodUsing |
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. Payment MethodUsing |
Create a Native JSAPI order | To use the Native JSAPI, the WeChat Official Account needs to be verified, and the binding of the Payment MethodAfter obtaining the |
Create a H5 order | Note: Additional application is required for WeChat H5 payment Payment MethodUsing |
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. Payment MethodAfter 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. Payment MethodAfter obtaining the |
The credit card order CREDIT_CARD | 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. |
In-store Payments
Parameter | Description |
---|---|
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. Payment MethodThe 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. Payment MethodMerchants use a barcode scanner to scan the customer's payment code to complete the payment. |
paymentStatus
The payment status returned by querying a payment order.
Parameter | Description |
---|---|
PAYMENT_IN_PROCESS | Waiting for payment to be completed |
CLOSED | Payment order is closed |
FAILED | Order creation is failed or payment is failed |
SUCCESS | Payment succeeded |
PARTIAL_REFUND | Partially refunded |
FULL_REFUND | Fully refunded |
refundStatus
The refund status of an order returned by querying a refund order.
Parameter | Description |
---|---|
REFUND_IN_PROCESS | The refund is being processed |
SUCCESS | Refund submission succeeded AND refund processing succeeded |
FAILED | Refund submission failed OR refund processing failed |
resultCode
Description code of business processing result
Parameter | Description |
---|---|
PAYMENT_IN_PROCESS | Payment is processing |
ORDER_MISMATCH | Order ID does not match the merchant |
ORDER_PAID | Order has been paid |
SYSTEMERROR | The system encounters an internal exception/error. |
INVALID_MERCHANT_CODE | Invalid merchant code or no corresponding merchant found |
SIGN_TIMEOUT | Signature timeout, the 'time' field differs from the server time by more than 5 minutes |
INVALID_SIGN | Invalid signature |
PARAM_INVALID | The parameters do not meet the requirements, and specific details can be referred to in the resultMessage field |
INVALID_METHOD_TYPE | Invalid payment channel name. Please check the case sensitivity |
EXIST_PROCESSING_REFUND | This order has a refund request being processed, please try again later |
REFUND_VALID_DATE_EXCEED | 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. |
REFUND_NEED_REVIEW | Your refund request has been submitted. Please wait for the system to review it. Contact customer service at 1-855-937-7888 |
INVALID_REFUND_AMOUNT | Refund amount is incorrect. Please modify and try again. |
REFUND_NOT_ENOUGH_BALANCE | You do not have enough unsettled balance to complete the refund. If you have any questions, please contact AlphaPay at 1-855-937-7888 |
FULL_REFUND_COMPLETED | This order has been fully refunded. |
INVALID_PAYMENT_CODE | Payment code is invalid |
resultStatus
The status of an API call, currently having: S
F
U
S
: API call succeeded.F
: API call failed, theresultMessage
field 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 aPAYMENT_IN_PROCESS
status after submitting a payment order, the query interface can be used to confirm the status of the payment result.