API Reference
Overview
This document provides detailed reference for all Veloraya payment APIs, including endpoints, methods, parameters and response formats.
Base Info
Common request headers
| Header | Type | Required | Description |
|---|---|---|---|
| Content-Type | string | Y | application/json |
| MerchantId | string | Y | Merchant ID |
| Timestamp | string | Y | Timestamp (ms) |
| Nonce | string | Y | Random string |
| Signature | string | Y | Request signature (RSA) |
Common response format
json
{
"code": 200,
"msg": "SUCCESS",
"data": {}
}Payment APIs
1. Payin API
- Endpoint: POST /api/payin
- Description: Create a payin order to receive payments
- Doc: Payin API
2. Payout API
- Endpoint: POST /api/payout
- Description: Create a payout order to make payments
- Doc: Payout API
Query APIs
3. Payin Query API
- Endpoint: POST /api/payin-query
- Description: Query payin order status and details
- Doc: Payin Query API
4. Payout Query API
- Endpoint: POST /api/payout-query
- Description: Query payout order status and details
- Doc: Payout Query API
5. Balance Query API
- Endpoint: GET /api/balance
- Description: Query merchant account balance
- Doc: Balance Query API
6. Payout Bank Query API
- Endpoint: GET /api/bank
- Description: Query available payout bank list
- Doc: Payout Bank Query API
Callback APIs
7. Payin Callback API
- Endpoint: merchant-provided callback URL
- Description: Receive payin order status change notifications
- Doc: Payin Callback API
8. Payout Callback API
- Endpoint: merchant-provided callback URL
- Description: Receive payout order status change notifications
- Doc: Payout Callback API
Signature Verification
9. Signature generation
- Algorithm: RSA (SHA256withRSA)
- Steps: build signing content → UTF-8 encode → RSA sign → Base64 encode
- Doc: Signature Verification
API Categories
By function
| Category | API Name | Endpoint | Description |
|---|---|---|---|
| Payin | Payin API | POST /api/payin | Create payin order |
| Payin | Payin Query | POST /api/payin-query | Query payin order |
| Payout | Payout API | POST /api/payout | Create payout order |
| Payout | Payout Query | POST /api/payout-query | Query payout order |
| Callback | Payin Callback | merchant URL | Payin status notify |
| Callback | Payout Callback | merchant URL | Payout status notify |
Error Handling
Error code categories
| Code range | Type | Handling |
|---|---|---|
| 1000-1999 | System error | Contact support |
| 2000-2999 | Payin error | Check order params |
| 3000-3999 | Payout error | Check beneficiary info |
| 4000-4999 | Query error | Check query params |
See Error Codes for details.
