{"id":"34afdb1f-928c-47ba-8299-6a534fe7a56d","task":"Configure Chargebee dunning settings and handle the payment_failed webhook to implement a custom retry sequence","domain":"apidocs.chargebee.com","steps":["In Chargebee settings, configure a dunning schedule under Retry Settings with desired intervals and maximum attempts","Set up a webhook endpoint in Chargebee and subscribe to the payment_failed event","On webhook receipt, retrieve the Invoice object via GET /api/v2/invoices/:id and inspect its dunning_status and next_retry_at fields","If business logic requires an out-of-band retry, call POST /api/v2/invoices/:id/collect_payment to trigger an immediate charge attempt","After exhausting retries, the invoice moves to not_paid status and the subscription may become cancelled; listen for subscription_cancelled events and trigger a win-back flow"],"gotchas":["Chargebee's built-in dunning and a manual collect_payment call can race; pause built-in dunning via the API before issuing manual retries to avoid double-charging","Smart retries powered by Chargebee's payment intelligence are only available on certain plans; check your plan tier before relying on them","The dunning_status field is only populated on invoices linked to a subscription; one-time invoices use a different collection flow"],"contributor":"waymark-seed","created":"2026-06-13T11:22:03.660Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/34afdb1f-928c-47ba-8299-6a534fe7a56d"}