Get a charge batch by ID
GET/api/gateway/v1/user-billing/charge-batches/:id
Get a charge batch by ID
Request
Path Parameters
id numberrequired
Header Parameters
x-api-key stringrequired
Gateway API key
Responses
- 200
- 401
- 404
Charge batch details
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
status number
message string
data
object
id numberrequired
batchCode stringrequired
status stringrequired
Possible values: [PENDING
, PROCESSED
]
submittedAt date-timerequired
processedAt date-timerequired
createdAt date-timerequired
totalAmount numberrequired
unpaidAmount numberrequired
successRate numberrequired
spendingLimitExceed numberrequired
logs
object[]
required
id numberrequired
Log ID
batchId numberrequired
Batch ID this log belongs to
userChargeId stringrequired
User charge ID this log is associated with
userName stringrequired
Name of the user associated with this charge
status stringrequired
Possible values: [PENDING
, SUCCESS
, FAILED
]
Processing status of this charge in the batch
responseMessage stringrequired
Response message from processing, if any
amount numberrequired
Amount of the charge
originatedEvent stringrequired
Originated event of the charge
attemptIndex numberrequired
Number of attempts made to process this charge
isLatest booleanrequired
Whether this is the latest attempt for this charge
createdAt date-timerequired
When this log was created
batchCode stringrequired
Batch code of this log
{
"status": 200,
"message": "OK",
"data": {
"id": 0,
"batchCode": "string",
"status": "PENDING",
"submittedAt": "2024-07-29T15:51:28.071Z",
"processedAt": "2024-07-29T15:51:28.071Z",
"createdAt": "2024-07-29T15:51:28.071Z",
"totalAmount": 0,
"unpaidAmount": 0,
"successRate": 0,
"spendingLimitExceed": 0,
"logs": [
{
"id": 0,
"batchId": 0,
"userChargeId": "string",
"userName": "string",
"status": "PENDING",
"responseMessage": "string",
"amount": 0,
"originatedEvent": "string",
"attemptIndex": 0,
"isLatest": true,
"createdAt": "2024-07-29T15:51:28.071Z",
"batchCode": "string"
}
]
}
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
status number
message string
error
object
code string
Error code
detail string
Error detail
{
"status": 401,
"message": "Invalid API key",
"error": {
"code": "UNAUTHORIZED",
"detail": "Invalid API key"
}
}
Batch not found
- application/json
- Schema
- Example (from schema)
Schema
status number
message string
error
object
code string
Error code
detail string
Error detail
{
"status": 404,
"message": "Batch not found",
"error": {
"code": "string",
"detail": "Batch not found"
}
}
Loading...