Recipe

Handle payment.failed webhooks

A payment.failed webhook needs a humane, correct response. Read the failure_code to understand why, trigger a supportive outreach rather than a punitive one, and reconcile against the live loan state — never assume the payment stayed failed.

2 min read

failure_codeWhy it failed
ReconcileRe-read the loan
SupportiveNot punitive

Read the reason

The payment.failed payload carries a failure_code such as insufficient_funds. Branch your response on it.

Respond supportively

An insufficient-funds failure is a moment for hardship-aware signposting, not pressure. Trigger a gentle reminder and surface support options rather than an aggressive dunning sequence.

Reconcile against live state

Because webhooks are unordered, a later payment.succeeded (a retry that cleared) may already have superseded the failure. Re-read the loan before acting on money or status.

Frequently asked questions

Should I immediately chase a failed payment?

No. Read the failure_code, respond supportively, and reconcile against live state first — the payment may already have cleared on retry.

How do I know the failure was not superseded?

Re-fetch the loan and its latest payment state. Webhooks are unordered, so never treat payment.failed as final without confirming current state.

How should my response differ by failure_code?

An insufficient_funds failure calls for gentle, hardship-aware messaging and a reminder ahead of the next collection; a technical_error needs no customer contact at all, since it retries automatically; and a disputed_by_customer should pause dunning and flag the account for review. Branch on the code — see the failure-reason reference.

Funding for UK limited companies

Credicorp lends to your company, not to you personally — short-term working capital with no personal guarantee. See what your business could access.