Introducing the Chargebee CLI

List invoice retry contexts

Returns invoices together with the retry segment and retry settings locked on them when their dunning started.

Pass invoice_id[is] to read the context of one invoice, or retry_segment_id[is] to list every invoice locked on a segment. A segment that has since been deleted still returns its invoices.

Each entry pairs the invoice with its invoice_retry_context, since invoices on the same segment can carry different locked settings.

Prerequisites & Constraints

  • Retry segments are enabled for the site. Otherwise, the list is empty.

Implementation Notes

Pass at least one of invoice_id[is] or retry_segment_id[is]. Otherwise, the API returns an invalid_request error.

An invoice that is not in auto_collect dunning has no context, so filtering by its invoice_id returns an empty list.

Sample Request

Sample Result[JSON]

URL Format

GET https://[site].chargebee.com/api/v2/invoice_retry_contexts

Input Parameters

limit
optional, integer, default=10, min=1, max=100

The number of resources to be returned.

offset
optional, string, max chars=1000

Determines your position in the list for pagination. To ensure that the next page is retrieved correctly, always set offset to the value of next_offset obtained in the previous iteration of the API call.

Filter Params

For operator usages, see the Pagination and Filtering section.
invoice_id[<operator>]

optional, string filter

Identifier of the invoice whose context is to be returned. Returns at most one entry.

Supported operators : is

Example → invoice_id[is] = "__demo_inv__17"

Constraints

  • Either invoice_id[is] or retry_segment_id[is] must be passed. Otherwise, the API returns an invalid_request error.
Supported operators: is
Example → INV-001
retry_segment_id[<operator>]

optional, string filter

Identifier of the retry segment. Returns every invoice locked on this segment, including invoices locked before the segment was edited or deleted.

Supported operators : is

Example → retry_segment_id[is] = "__test__KyVkSOVWbgWtUY"

Constraints

  • Either invoice_id[is] or retry_segment_id[is] must be passed. Otherwise, the API returns an invalid_request error.
Supported operators: is
Example → rs_high_value
invoice

Parameters for invoice

pass parameters as invoice[<param name>][<operator>]

Returns

next_offset
optional, string, max chars=1000

This attribute is returned only if more resources are present. To fetch the next set of resources use this value for the input parameter offset.

Invoice object

Resource object representing invoice

Invoice retry context object

Resource object representing invoice retry context