This endpoint allows you to fail multiple transactions in one call. The system will mark applicable transactions as failed and replay the loan once (starting from the earliest effective date of the provided transactions).
Security
oauth2(Required scopes: transaction:update) or bearerAuth or apiKeyHeader
Array []
The ACH return code indicating the reason the transaction failed.
Example:"R01"
The transaction failure reason.
Enum:"insufficientFunds""chargeback""accountClosed""invalidAccount""unknownReason""invalidCvv""invalidExpirationDate""avsFailed""networkError""cardDeclined"
The error details returned by the payment processor. Can be any valid JSON object.
Example:
{ "code": "INSUFFICIENT_FUNDS" }
The raw failure reason returned by the payment processor.
Example:"Insufficient Funds. Retry after 24 hours."
POST
- oauth2
- bearerAuth
- apiKeyHeader
curl -i -X POST \
'https://sandboxapi.peach.finance/api/people/{personId}/loans/{loanId}/transactions/fail?sync=false' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '[
{
"achReturnCode": "R01",
"failureReason": "insufficientFunds",
"processorFailureDetails": {
"code": "INSUFFICIENT_FUNDS"
},
"processorFailureReason": "Insufficient Funds. Retry after 24 hours.",
"transactionId": "string"
}
]'Response
{ "message": "string", "status": 0 }