Transaction Query
ENDPOINT
GET
https://open.sunbay.us/v1/transaction/queryThe Transaction Query API is used to query detailed information and status of specified transactions. This API is a general-purpose interface that supports not only semi-integration business but also online business.
Parameters
Header parameters
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | Y | Bearer Token authentication, format: Bearer {your_api_key} Example: "Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc" |
X-Client-Request-Id | string(64) | Y | Request unique identifier, used to prevent duplicate requests and issue tracking. UUID format is recommended, each request must use a unique Request ID Example: "550e8400-e29b-41d4-a716-446655440000" |
X-Timestamp | string | Y | Request timestamp, Unix timestamp (milliseconds), 13 digits. The deviation between the request timestamp and server time cannot exceed ±10 minutes Pattern: ^[0-9]{13}$Example: "1701234567890" |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
appId | string(32) | Y | Application ID Example: "app_123456" |
merchantId | string(32) | Y | Merchant ID Example: "mch_789012" |
transactionId | string(64) | N | SUNBAY Nexus transaction ID, choose one between this and transactionRequestId. When both exist, transactionId takes priority Example: "TXN20231119001" |
transactionRequestId | string(32) | N | Transaction request ID, choose one between this and transactionId. When both exist, transactionId takes priority Example: "PAY_REQ_20231119001" |
Code Examples
cURLbash
Response parameters
| Name | Type | Required | Description |
|---|---|---|---|
code | string(16) | Y | Response code, 0 indicates success Example: "0" |
msg | string(128) | N | Response description Example: "Query successful" |
traceId | string(64) | Y | Trace ID for troubleshooting Example: "TRACE123456789" |
data | object | Y |
Last updated on