Overview

Prerequisite

Before starting API integration, merchants need to sign a contract with AlphaPay for related products. For assistance, please contact AlphaPay Business Team.

Generate an RSA key for signature in the merchant dashboard, please refer to the Signature Algorithm for details. Once configured, you can proceed with development and testing.

Currency Codes

CAD USD

API Domain

CAD: https://openapi.alphapay.ca
USD: https://openapi.alphapay.com

Payment Scenarios

Channel Differentiation

Based on different scenarioCode, channel was distributed to Offline and Online channels. This distinction is made as following to avoid confusion:

  • Online Channel: ONLINE_QRCODE ONLINE_WEB JSAPI NATIVE_JSAPI ONLINE_WAP APP MINI_APP CREDIT_CARD
  • Offline Channel: OFFLINE_QRCODE OFFLINE

Differences between scenarioCode:

  • JSAPI/NATIVE_JSAPI can only be used in the webpage opened in WeChat/Alipay Client. ONLINE_WAP can redirect customers to WeChat/Alipay/UnionPay and initiate payment from any mobile browser including WebView in App.
  • ONLINE_WEB will redirect customers to UnionPay/Alipay official payment page. They can scan the QR Code displayed on the webpage or sign in to their accounts to complete the payment. ONLINE_QRCODE allows merchants to generate a QR code for customers to scan to pay using their WeChat/Alipay clients.

API Rules

  • All payment orders are initiated by a unified payment API. Merchants need to pass in the corresponding scenarioCode according to the different business scenarios;
  • ONLINE_QRCODE will return paymentUrl for generating the QR Code, paymentQRImage which is the base64 encoded QR Code image and payUrl for redirecting customers to AlphaPay payment page;
  • It is required to generate a new signature for each request;
  • After creating each order, merchants are required to poll the status of the order repeatedly using the Order Inquiry API until the order is either paid or expired.
  • Each unpaid order will be valid for 5 minutes. The validity period of an order can be modified in the merchant dashboard: Settings > Payment Settings > Order Expiry Time;
  • When creating payment and refund of orders, it is required to ensure the uniqueness of the order ID;
  • All amount figures are based on the minimum denomination unit of a given currency. Take CAD as an example, 100 means 1.00CAD。