Record a payment's real-world outcome when the payment provider never reported one, for example a debit order whose result only reached you on a bank statement.
This is a narrowed alternative to update payment: only successful and failed can be recorded, the payment is identified by the path so payment_id is not accepted in the body, and a manually recorded outcome carries no provider code so failure_code is not accepted at all. Sending either field returns a 400.
Not every transition is reachable. A payment already in a final status cannot be changed, with the single exception of reversing a successful payment:
| From | To successful | To failed |
|---|---|---|
pending, submitted, processing | 200 | 200 |
successful | 200, no change | 200, reverses the payment's ledger entry and creates a reversal payment |
failed | 400 | 400 |
cancelled | 400 | 400 |
Correcting a failed payment to successful is therefore not possible over the API.
400The request body is invalid, or the payment's current status cannot be changed.
403Recording a payment outcome is not enabled for the organization, or the caller is missing the payments:external:update permission.
404No such payment, or the caller's user group does not grant access to its policy.