Skip to Content
API ReferenceTransactionsIn-Person PaymentsClosed Batch Query

Batch Close List

ENDPOINT
GET
https://open.sunbay.us/v1/settlement/batch-close-list

The Batch Close List API is used to query closed (settled) batch records. You can filter results by payment channel and time range. If no time range is specified, the API returns data from the last 7 days by default. The maximum query span is 30 days.

Parameters

Header parameters

NameTypeRequiredDescription
Authorization
stringYes
Bearer Token authentication, format: Bearer {your_api_key}
Example: "Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"
X-Client-Request-Id
string(64)Yes
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
stringYes
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

NameTypeRequiredDescription
appId
string(32)Yes
Application ID
Pattern: ^[a-zA-Z0-9_\-]+$
Example: "app_123456"
merchantId
string(32)Yes
Merchant ID
Pattern: ^[a-zA-Z0-9_\-]+$
Example: "mch_789012"
terminalSn
string(32)Yes
Payment terminal serial number. The payment terminal device serial number provided by SUNBAY
Pattern: ^[a-zA-Z0-9_\-]+$
Example: "T1234567890"
channelCode
string(32)No
Payment channel code. If specified, only returns batches for this channel. See Payment Channel
Example: "TSYS"
startTime
stringNo
Query start time, ISO 8601 format. startTime and endTime must both be present. The time span cannot exceed 30 days. If not specified, defaults to the last 7 days
Format: date-time
Example: "2026-08-01T00:00:00+00:00"
endTime
stringNo
Query end time, ISO 8601 format. startTime and endTime must both be present. The time span cannot exceed 30 days. If not specified, defaults to the last 7 days
Format: date-time
Example: "2026-08-31T23:59:59+00:00"

Code Examples

cURLbash

Response parameters

NameTypeRequiredDescription
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
objectY
Last updated on