Skip to content

Getting Started

Environment Setup

Before you begin, make sure you have completed the Set Up Test Environment step.

Testhttps://p-gate-uat.checus.com/aggregate-pay/api/gateway/<PATH>
Productionhttps://pay-gate-hk-prod.checus.com/aggregate-pay/api/gateway/<PATH>

Interaction Flow

Key APIs

InteractionDirectionAPI / Method
Place order via Payment APIMerchant -> Checus/orderAndPay
Async notification to merchantChecus -> Merchant/collectResultNotifyUrl
Query transaction resultMerchant -> Checus/orderQuery

Integration Steps

1. Create a payment session

Call orderAndPay API to create a payment (POST).

In hosted checkout you can choose:

  • No specific payment method: display all available payment methods.
  • Specified payment method: display only the method indicated in the request.

Common Parameter Description

Regardless of the payment method your users choose, the following basic fields must be included in the request:

  • outTradeNo: Merchant system order number (unique)
  • totalAmount: Amount
  • currency: Currency
  • country: User's country
  • userId: User identifier
  • frontCallbackUrl: URL to redirect the user after payment completion
  • notifyUrl: Callback URL for payment result notifications (can also be configured in the Merchant Management Platform)
  • integrate: Fixed value to Hosted_Checkout
  • expireTime: Order closure time in seconds. Default range: 1800–86400; values outside this range will be automatically adjusted

Specific Payment Method Selection

GoalDescriptionIllustrationConfiguration
Display all payment methodsShow all available payment methodsDo not pass the paymentDetail field
Limit by payment type without specifying providerFor example, restrict to online banking; the checkout will display T-Pay, SberPay, etc.Set paymentDetail.paymentMethodType, e.g., "NET_BANKING"
Limit to specific payment providerFor example, only show SberPaySet paymentDetail.targetOrg, e.g. "SBERBANK"
Limit to card paymentsFor example, display all card payments onlySet paymentDetail.paymentMethodType = "CARD"

2. Redirect to Checus checkout

After a successful orderAndPay API call, redirect the customer to the returned redirectUrl to complete payment.

3. Redirect to the Payment Result Page

After the user completes the payment, Checus will display a result page. When the user clicks Return or Close button, they will be redirected to the frontCallbackUrl you specified in the request. Please ensure that this URL is accessible from external browsers.

Redirect Logic Comparison (frontCallbackUrl)

Redirect formFlowRecommendationProsCons
In-page H5 to AppDetects and launches app after page load (via URL Scheme / App Link) RecommendedControllable and flexibleComplex, multi-scenario support needed
App Link / Universal Link (http/https)System auto-opens app, fallback to web if failed RecommendedSupports fallback, better user experienceRequires app configuration
Standard H5 (http/https)Stays on browser page Not recommendedSimple implementationCannot open app, poor UX
URL Scheme (scheme://)Tries to open app, blank if failed Not recommendedSimple implementationNo fallback, blank screen risk

Checus Appended Parameters

When redirecting to frontCallbackUrl, Checus will automatically append the following parameters:

  • outTradeNo: Merchant order ID
  • tradeToken: Checus order ID
  • status: current order status (for display only, not for updating order state)

Do not rely on status parameter to update the merchant order. Always use Payment Result Notification or Query API to ensure accurate transaction results.

4. Retrieve Payment Result

Method 1. Payment Result Notification

After the payment is completed, Checus will send a Payment Result Notification to collectResultNotifyUrl API endpoint.

The notification may be retried multiple times until a successful response is returned.

Configure webhook URL via:

  • Via API request: Provide the notifyUrl parameter in the /orderAndPay request. Applies to this order only.
  • Via Merchant Plantform: Configure a global callback URL in the Plateform. Applies to all orders.

You must return a success response once the notification is processed.

If no response or a failure is returned, Checus will retry according to the following schedule: 0s / 30s / 300s / 600s / 3600s / 43200s (up to 6 attempts).

Method 2. Active Query

If no notification is received, or the order status remains unclear, you may actively call the Order Query /orderQuery to retrieve the payment result.

You should use the code field to determine whether the query request itself was successful, and use data.status to determine the payment status.

Do not rely on code, msg, or data.resultMsg to determine payment status.

Refer to the Error Code List for troubleshooting in case of errors.

Payment Status Codes List

StatusDescription
SUCCESSPayment succeeded
PENDINGWaiting for payment
FAILEDPayment failed
CLOSEDTimed out, order closed

Released under the MIT License.