Payment capability

Users can trigger the super app cashier page on a mini program. The payment process and user experience on the mini program are similar to those of the native app.

Prerequisites

This capability is open to a merchant with a valid business license that is verified by Claro. The merchant website should be accessible and provide clear business content and complete product information.

User experience

The overall payment process includes the following steps:

  1. A user selects a product in the mini program and places an order.
  2. The user confirms the purchase and enters the payment page that is triggered by the mini program.
  3. The user confirms the payee and amount on the checkout page, then confirms the payment.
  4. The payment success page is displayed.

Procedures

To develop the payment capability, follow the steps below:

1. Create a mini program

The merchant/ISV gets started with the workspace and publishes a mini program in the Mini Program Platform. For more information, see the product guide overview and the developer guide.

2. Add features (Optional)

By default, the payment capability is available. For other features, you need to add a feature and define the details according to your business requirements. For more information, see Features.

3. Call APIs

image.png

  1. The Super APP user creates a payment order in a mini program.
  2. The merchant or ISV server creates the order by calling the /v2/payments/pay OpenAPI from the super app server.
  3. The super app server returns parameters such as checkout URL to the mini program.
  4. The mini program calls the tradePay JSAPI by triggering the Super APP payment process and other return parameters and then gets the response.
  5. The user confirms the payment. Then the super app server calls the /v2/payments/notifyPayment OpenAPI and sends the order status notification to the min program server.
  6. The user is redirected to the payment result page in the mini program.

Note:

API list

JSAPI

Description

my.tradePay

Trigger the cashier page from the Super APP.

OpenAPI

Description

/v2/payments/{apiName}

For details, see the Open APIs for Merchants chapter.

More information

Capabilities

JSAPIs

Open APIs

Developing Mini Program

Using Mini Program Platform

Features