Request Payload
: Send | the following parameters as a JSON object in the request body:
{
"products": {
"0": {
"name": "Charge QA",
"productId": null,
"rate": 1500,150,
"tax": "0",
"amount": 1500150
}
},
"grandTotal": 1500,150,
"additionalText" : "My additional Text for charge"capture"
}
Validation Rules
Make sure your request meets the following requirements:
Field |
Type |
Description |
products.*.name |
string |
Required Name of the product. |
Response Structure
products.*.productId |
:
string |
Optional Unique identifier for the product. |
products.*rate |
numeric |
Required Rate per unit of the product. |
products.*.tax |
numeric |
Required Tax rate must be (e.g., 0 , 12 , 15 , 25 ), Unless you have other configuration. |
products.*.amount |
numeric |
Required Total amount for the product line item. |
grandTotal |
numeric |
**Required** Grand total of the captured amount. |
additionalText |
string |
**Optional** Captured note. |
Response
A successful request will return a 202 OK status with the following JSON payload:
// Success
{
"status_code": 202,
"status_message": "OK",
"message": "reservationChargedSuccessfully",
"is_data": true,
"data": {
"uuid": "String"
}
}
//
ErrorsAPI returns a 404 error, it means requested order with RESERVATION_UUID could not be found in our system.
{
"status_code": 404,
"status_message": "Not Found",
"message": "reservationNotFound",
"is_data": false,
"data": null
}
API return a 417 error, it means request payload validation failed.
{
"status_code": 417,
"status_message": "Client Error",
"message": "payloadValidationErrors",
"is_error": true,
"errors": "Array"
}
API returns a 510 error, it means something failed on the server side
{
"status_code": 404,510,
"status_message": "NotExecution Found"Exception Occurred",
"message": "reservationNotFound"Something Went Wrong",
"is_data"is_error": false,true,
"data"errors": null"Array"
}
Others rejections errors
{
"status_code": 404,
"status_message": "Not Found",
"message": "paymentCardNotFound",
"is_data": false,
"data": null
}
{
"status_code": 400,
"status_message": "Conflict of Business Logic",
"message": "paymentChargeRunwayExceed",
"is_data": false,
"data": null
}
{
"status_code": 400,
"status_message": "Conflict of Business Logic",
"message": "paymentChargeDeadlineExceed",
"is_data": false,
"data": null
}
{
"status_code": 500,
"status_message": "Internal Dependency Error",
"message": "internalErrorOccurredPleaseTryAgainLater",
"is_error": true,
"errors": "Array"
}
{
"status_code": 510,
"status_message": "Execution Exception Occurred",
"message": "somethingWentWrong",
"is_error": true,
"errors": "Array"
}
|