Skip to main content
Mini programs provide a comprehensive set of OpenAPIs enabling developers to integrate various capabilities including payments, user authorization, and messaging. Communication occurs via HTTPS POST requests with structured request/response patterns.

API Version

  • Current Version: v1
  • URL Format: https://{domainName}/v1/{endpoint}
The version is part of the request path, for example https://{domainName}/v1/payments/pay. An interface is uniquely identified by its RESTful path (/{version}/{resource}/{action}).
Different API versions represent distinct interfaces. Ensure you use the correct version for your integration.
{domainName} is the OpenAPI host assigned by Rebell for your environment. See Authentication & Environments for the sandbox and production hosts.

Message Structure

Request Components

All API requests follow this structure:

Request Headers

Header field names are case-insensitive.
string
required
Digital signature in format: algorithm=SHA256withRSA, keyVersion=1, signature=****. Comma-separated key=value pairs:
  • algorithm: the only valid value is SHA256withRSA (case-insensitive). The signing key must be at least 2048 bits.
  • keyVersion: the version of the key used to generate or validate the signature. If omitted, the latest key version associated with the Client-Id is used.
  • signature: the signature value of the request. See Call an API via adding a signature.
string
required
Your assigned client identifier, used to identify your application and associated keys. In the Mini Program OAuth scenario (for example applyToken), the Client-Id is also the OAuth client ID configured for your Mini Program on the Mini Program Platform.
string
required
ISO 8601 timestamp with minimum second accuracy (e.g., 2024-01-10T12:00:00+01:00)
string
application/json; charset=UTF-8

Request Body

The request body is JSON. Its fields depend on the API; see each API’s reference page.

Response Headers

Every response is signed by Rebell and carries the following headers (field names are case-insensitive): Validate the response Signature with the Rebell public key before processing the body.

Response Structure

All responses include a standardized result object:
When resultStatus is F, U or A, resultCode is an error code and resultMessage an error message to use for error handling. See Error Codes.
string
required
Status indicator:
  • S - Success
  • F - Failed
  • U - Unknown
  • A - Accepted (processing)
string
Error or success code (max 64 characters)
string
Detailed description of the result (max 256 characters)

Developer Workflow

1

Understand Requirements

Review API idempotency requirements and authentication specifications
2

Generate Keys

Create a 2048-bit RSA key pair for signing requests
3

Construct Request

Build signed, encoded requests per the message structure specification
4

Send Request

Submit HTTPS POST requests to the appropriate endpoint
5

Validate Response

Verify the response signature using the platform’s public key
6

Handle Result

Process result codes and implement appropriate error handling

Security Requirements

Request Signing

All requests must be digitally signed using RSA-SHA256

Response Validation

Always verify response signatures before processing data

Key Management

Use 2048-bit RSA keys exclusively for the SHA256withRSA algorithm

Message Encoding

Proper encoding prevents character ambiguities during transmission

Next Steps

Idempotency

Learn how to handle retries safely

Message Encoding

Understand encoding requirements

API Signing

Step-by-step signing guide

Data Dictionary

Common data types and models