Email customers whose charge failed
Tell a set of customers that the charge on their subscription failed, for the Subscription Billing day drawer.
The dunning pipeline sends its own first-decline mail once per failure
streak and records that on the subscription rather than here. This endpoint
does not replace it: a customer the pipeline has already written to is
skipped as already_noticed, which is the only way an operator can see that
it got there first. What remains are the customers it deliberately left
alone.
Every token is answered. A token is sent when the mail was queued and recorded, skipped when the customer must not be mailed — with the reason — or failed when no subscription of that token belongs to the caller.
A subscription with no failed charge on renewal_date is skipped rather
than mailed, so a customer whose charge cleared cannot be told it failed.
Set resend to true to tell the customers who have already been told
anyway. It waives the already_noticed and already_emailed skips and
nothing else, and it defaults to false, so an operator reaches those
customers only by asking for them.
A send whose mail could not be queued is skipped as delivery_failed and
leaves no record behind, so the same customer can be tried again
immediately rather than waiting out the quiet period on a mail that never
went.
Authorizations
Bearer token authentication
Body
Who to tell, and which day's failure the mail is about.
Subscription tokens. Duplicates are collapsed before the batch runs, and the deduplicated count is what the maximum is applied to.
1 - 500 elementsThe renewal date being worked, as YYYY-MM-DD. A subscription with no
failed charge on this date is skipped, so the caller cannot tell a
customer about a failure they did not have.
Whether to tell customers who have already been told, either by the
dunning pipeline or by an earlier operator batch. Defaults to false,
so a caller that omits it cannot mail anyone twice.
When true, only the already_noticed and already_emailed skips are
waived. Every other skip still applies: a subscription with no failed
charge on the date, a customer with no address, and a company with the
mail switched off are passed over either way.
false
Response
Every token answered as sent, skipped, or failed
One entry per token sent, across three lists.