Skip to Content
Docs
API referenceManagement API

Billing dunning

GET
/billing/customers/{customer_id}/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.

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

customer_id*string

The Customer id

Response Body

A customer_dunning object: { status, started_at, invoice_ids, next_action }

application/json
  1. response
id?string

ID is its prefixed id.

object?string

Object names the kind: customer, invoice, contract, …

Example Request
curl -X GET 'https://api.us.pontive.com/v1/billing/customers/string/dunning'
Example Response
{  "id": "string",  "object": "string"}
POST
/billing/customers/{customer_id}/dunning/retry

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.

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Path Parameters

customer_id*string

The Customer id

Header Parameters

X-Idempotency-Key?string

Idempotency key

Response Body

The customer_dunning object after the retries

application/json
  1. response
Example Request
curl -X POST 'https://api.us.pontive.com/v1/billing/customers/string/dunning/retry'
Example Response
{}
GET
/billing/dunning-policy

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.

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Response Body

A DunningPolicy object

application/json
  1. response
id?string

ID is its prefixed id.

object?string

Object names the kind: customer, invoice, contract, …

Example Request
curl -X GET 'https://api.us.pontive.com/v1/billing/dunning-policy'
Example Response
{  "id": "string",  "object": "string"}
PATCH
/billing/dunning-policy

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.

Authorization

BearerAuth
headerAuthorization<token>

Access token as "Bearer "

Header Parameters

X-Idempotency-Key?string

Idempotency key

If-Match?string

The ETag the document was read with, checked by billing-svc in the update: a stale one is refused 412 precondition_failed (D42)

Response Body

The updated DunningPolicy object

application/json
  1. response
Example Request
curl -X PATCH 'https://api.us.pontive.com/v1/billing/dunning-policy'
Example Response
{}