Mark a transaction declined
POST/api/v3/transaction/:transaction_id/_action/decline
If ChargeOver is unable to get informaton back about NSF payments from your ACH payment gateway, you can use this API call to manually mark a transaction as declined via the API.
Optionally, you can specify values for the gateway_msg
, gateway_err_code
, and gateway_err_detail
fields to supply more information about the failed transaction.
For the gateway_msg
field, you can put the message from your gateway about why the transaction failed. For instance, if a transaction failed because of insufficient funds, you could put "Insufficient Funds"
in for this field.
If you are not sure what error code to use for the gateway_err_code
field, you can view our list of payment processor error codes here.
Request
- application/json
Body
Responses
- 200
- 400
- 401
Action completed successfully
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 200,
"status": "OK",
"message": "",
"details": {},
"response": true
}
Bad request
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 400,
"status": "Error",
"message": "Missing or invalid parameter.",
"details": {},
"response": false
}
Authentication error
- application/json
- Schema
- Example (from schema)
- Example 1
Schema
{
"code": 0,
"status": "string",
"message": "string",
"details": {},
"response": true
}
{
"code": 401,
"status": "Error",
"message": "Invalid or incorrect authorization [Missing (basic) authorization header.]",
"details": {},
"response": false
}