The Settlement API allows you to manage batch settlements, view settlement history, and send settlement reports.
Settlement History
Retrieves a paginated list of settlement batches.
GET /api/openapi/v1/settlement
Authorization: Bearer {jwt}
Accept: application/jsonParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | true | Bearer Token |
| createdStart | query | string | false | Start of the creation time range. yyyy-MM-dd (UTC), or an ISO 8601 timestamp with time zone (e.g. 2024-07-19T00:00:00+08:00) |
| createdEnd | query | string | false | End of the creation time range. Same formats as createdStart; a date-only value includes the whole day |
| batchId | query | string | false | Filter by batch ID |
| pageSize | query | number | false | Default 20 |
| pageNumber | query | number | false | Default 1 |
Response
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens in a new tab) | Success | Wrapper: Response<T> |
Example Response (200)
{
"msg": "SUCCESS",
"code": 0,
"data": {
"current": 1,
"total": 50,
"pages": 3,
"size": 20,
"cursorStarting": "B001234",
"cursorEnding": "B001215",
"records": [
{
"paymentAmt": 15000,
"profileName": "Batch#12",
"profileMessage": "MS_ENABLER",
"refundCount": 2,
"uuid": "S20230615123456",
"acquirerMid": "123456789012345",
"mchName": "Demo Merchant",
"voidAmt": 1000,
"batchId": "B001234",
"createdAt": "2023-06-15T15:30:45+0000",
"currency": "USD",
"acquirerTid": "10001234",
"state": 1,
"paymentCount": 15,
"refundAmt": 2000,
"updatedAt": "2023-06-15T16:45:12+0000",
"voidCount": 1
}
]
}
}state values:
| Code | Meaning |
|---|---|
| 0 | Open |
| 1 | Settled |
| 2 | Failed |
| 3 | In progress |
Settlement Detail
Retrieves detailed information for a specific settlement batch.
GET /api/openapi/v1/settlement/{batchId}
Authorization: Bearer {jwt}
Accept: application/jsonParameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | true | Bearer Token |
| batchId | path | string | true | Batch ID |
Response
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens in a new tab) | Success | Wrapper: Response<T> |
Example Response (200)
{
"msg": "SUCCESS",
"code": 0,
"data": {
"paymentAmt": 15000,
"profileName": "Batch#12",
"profileMessage": "MS_ENABLER",
"refundCount": 2,
"uuid": "S20230615123456",
"acquirerMid": "123456789012345",
"mchName": "Demo Merchant",
"voidAmt": 1000,
"batchId": "B001234",
"transactions": [
{
"amount": 5000,
"transType": "SALE",
"count": 5,
"paymentMethod": "VISA"
},
{
"amount": 10000,
"transType": "SALE",
"count": 10,
"paymentMethod": "MASTERCARD"
},
{
"amount": 2000,
"transType": "REFUND",
"count": 2,
"paymentMethod": "VISA"
}
],
"createdAt": "2023-06-15T15:30:45+0000",
"currency": "USD",
"acquirerTid": "10001234",
"state": 1,
"paymentCount": 15,
"refundAmt": 2000,
"voidCount": 1
}
}Process Settlement
Initiates the settlement process for a specified batch.
POST /api/openapi/v1/settlement/settle
Content-Type: application/json
Authorization: Bearer {jwt}Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | true | Bearer Token |
| batchId | body | string | true | Batch ID to settle |
Request Body Example
{
"batchId": "B001234"
}Response
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens in a new tab) | Success | Wrapper: Response<T> |
Example Response (200)
{
"msg": "SUCCESS",
"code": 0,
"data": {
"batchId": "B001234"
}
}Send Settlement Report Email
Sends a settlement report to the specified email address.
POST /api/openapi/v1/settlement/email
Content-Type: application/json
Authorization: Bearer {jwt}Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| Authorization | header | string | true | Bearer Token |
| batchIds | body | string | true | JSON array of batch IDs |
| body | string | true | Email recipient address | |
| mchId | body | string | true | Merchant ID |
Request Body Example
{
"batchIds": "[{\"batchId\": \"B001234\"}, {\"batchId\": \"B001235\"}]",
"email": "[email protected]",
"mchId": "M12345"
}Response
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens in a new tab) | Success | Wrapper: Response<T> |
Example Response (200)
{
"msg": "SUCCESS",
"code": 0
}