API Version
- Current Version: v1
- URL Format:
https://{domainName}/v1/{endpoint}
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.Digital signature in format:
algorithm=SHA256withRSA, keyVersion=1, signature=****. Comma-separated key=value pairs:algorithm: the only valid value isSHA256withRSA(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 theClient-Idis used.signature: the signature value of the request. See Call an API via adding a signature.
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.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 standardizedresult object:
resultStatus is F, U or A, resultCode is an error code and resultMessage an error message to use for error handling. See Error Codes.
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