Billing dunning
billing.payment.v1.DunningService/GetCustomerDunning (38-payments-and-tax.md, API Surface, Dunning; Customer dunning state). The same state the Customer object carries as dunning; a send_invoice Customer is always none.
BearerAuthAuthorization<token>Access token as "Bearer "
customer_id*stringThe Customer id
A customer_dunning object: { status, started_at, invoice_ids, next_action }
application/json- response
id?stringID is its prefixed id.
object?stringObject names the kind: customer, invoice, contract, …
curl -X GET 'https://api.us.pontive.com/v1/billing/customers/string/dunning'{ "id": "string", "object": "string"}billing.payment.v1.DunningService/RetryCustomerDunning (38-payments-and-tax.md, API Surface, Dunning). Tries every overdue invoice at once, oldest first, as the client; the schedule does not move.
BearerAuthAuthorization<token>Access token as "Bearer "
customer_id*stringThe Customer id
X-Idempotency-Key?stringIdempotency key
The customer_dunning object after the retries
application/json- response
curl -X POST 'https://api.us.pontive.com/v1/billing/customers/string/dunning/retry'{}billing.payment.v1.DunningService/GetDunningPolicy (38-payments-and-tax.md, API Surface, Dunning; Dunning policy). The instance's policy, with 38's defaults until it is changed.
BearerAuthAuthorization<token>Access token as "Bearer "
A DunningPolicy object
application/json- response
id?stringID is its prefixed id.
object?stringObject names the kind: customer, invoice, contract, …
curl -X GET 'https://api.us.pontive.com/v1/billing/dunning-policy'{ "id": "string", "object": "string"}billing.payment.v1.DunningService/UpdateDunningPolicy (38-payments-and-tax.md, API Surface, Dunning; Dunning policy). A field left out keeps its value; retries and steps replace their lists; send_invoice is merged field by field, and null turns a field off (null on send_invoice turns every field in it off). More than 6 retries or 20 steps is field_too_long and changes nothing.
BearerAuthAuthorization<token>Access token as "Bearer "
X-Idempotency-Key?stringIdempotency key
If-Match?stringThe ETag the document was read with, checked by billing-svc in the update: a stale one is refused 412 precondition_failed (D42)
The updated DunningPolicy object
application/json- response
curl -X PATCH 'https://api.us.pontive.com/v1/billing/dunning-policy'{}