Skip to main content
POST /v1/payments/pay Initiates a payment request. Rebell handles the payment scenario according to the request parameters. Supported scenarios: Mini App direct pay (cashier payment), Mini App auth capture, and Mini App agreement pay. In the cashier payment scenario the merchant calls this API to create the order; Rebell returns the cashier page URL (redirectActionForm.redirectUrl), and the Mini Program opens it with my.tradePay so the user can complete the payment.

Request Parameters

string
required
Payment product code assigned by Rebell:
  • 51051000101000000011: Mini App direct pay
  • 51051000101000000012: Mini App auth capture
  • 51051000101000100031: Mini App agreement pay
Max length: 32 characters
string
required
Merchant-generated unique ID of the payment. Used for idempotency control: requests with the same paymentRequestId that reached a final status (S or F) always return the same result.Max length: 64 characters
object
required
Order amount, displayed in the user’s consumption records and payment result page. See Amount. Example: {"currency": "EUR", "value": "10000"}
string
Payment authorization code generated by the wallet, such as the accessToken in the agreement pay scenario (from applyToken).Max length: 128 characters
string
Merchant-defined time at which the payment order is closed, in ISO 8601 format.
string
Merchant URL that receives the payment result notification (notifyPayment).Max length: 1024 characters
string
Merchant-defined redirect URL. In the cashier payment scenario, after the user finishes paying on the cashier page, Rebell redirects back to the merchant using this URL.Max length: 1024 characters
string
Agreement pay only. Merchant URL to which Rebell sends a cashier URL (notifyCashierUrl) when the payment is still not completed after 48 hours. This happens only when the payment failed because the payment method was disabled or the user’s per-agreement limit was reached, and the user’s agreement is still valid.Max length: 1024 characters
object
Order details including merchant, buyer, and environment information. See Order. Order information is used only for the user’s payment result page, transaction history and regulatory reporting; the amount in order is not used for fund operations.For Mini Program and in-app payment flows, order.env is required and must include:
  • terminalType: APP
  • osType: IOS or ANDROID
object
Agreement pay: the amount the user authorizes the merchant to charge per agreement payment, in the smallest currency unit (euro cents). See Amount. Example: {"currency":"EUR","value":"1000"}
string
Subscription payments: the service expiry date, which merchants must set on every payment request. It is shown to the user on the contract page; Rebell does not validate it, so the merchant must keep it accurate. Format: yyyy-MM-dd
string
Subscription payments: the next payment date, which merchants must set on every payment request. It is shown to the user on the authorization details page; Rebell does not verify it, so the merchant must keep it accurate. Format: yyyy-MM-dd
string
JSON-formatted extension data.Max length: 2048 charactersExample: "{\"channelSource\":\"MERCHANT_MP\",\"miniAppId\":\"12312312312\"}"

Response Parameters

object
required
Standard result object with resultCode, resultStatus, resultMessage
string
Echo of the merchant-provided request identifier.
string
Wallet-generated unique payment ID.Max length: 64 characters
string
Payment success time in ISO 8601 format.
object
Redirect instruction returned when the payment requires an H5 cashier step (e.g. direct pay and auth-capture flows with MOBILE_H5 channel source).
Double-encode the sign parameter before rendering redirectUrl as a QR code.The H5 cashier page decodes the URL once before parsing query parameters. Base64 characters in sign that are percent-encoded as %2B (+), %2F (/), or %3D (=) become +, /, = after that decode — but + is then parsed as a space, causing a PUB_VERIFY_SIGN_ERROR.Fix: replace those characters with their double-percent equivalents so they survive the H5 decode intact:
This is only needed when embedding the URL in a QR code. For direct browser redirects (window.location.href = redirectUrl), use the URL as-is.

Result Handling

Result Codes

Sample: Cashier Payment

A user buys a 100 EUR item in a Mini Program:
1

Create the order

The Mini Program creates an order on the merchant server.
2

Call pay

The merchant server calls /v1/payments/pay with a paymentNotifyUrl.
3

Receive payment details

Rebell returns paymentId and redirectActionForm (resultStatus = A).
4

Open the cashier

The merchant server passes the payment details to the Mini Program, which calls my.tradePay with the redirectUrl as paymentUrl.
5

Get the result

When the payment reaches a final status, Rebell notifies the merchant server at paymentNotifyUrl, and the Rebell app returns the result to the Mini Program.

Request

Response

resultStatus = A means the payment was accepted; it becomes successful after the user completes payment on the cashier page.