List all invoice rendering templates 

List all templates, ordered by creation date, with the most recently created template appearing first.

Parameters

No parameters.

More parameters

  • ending_beforestring

  • limitinteger

  • starting_afterstring

Returns

A dictionary with a data property that contains an array of up to limit templates, starting after template starting_after. Each entry in the array is a separate template object. If no more templates are available, the resulting array will be empty.

GET /v1/invoice_rendering_templates
curl -G https://api.stripe.com/v1/invoice_rendering_templates \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d limit=3
Response
{
"object": "list",
"url": "/v1/invoice_rendering_templates",
"has_more": false,
"data": [
{
"id": "inrtem_abc",
"object": "invoice_rendering_template",
"nickname": "My Invoice Template",
"status": "active",
"version": 1,
"created": 1678942624,
"livemode": false
}
]
}

Archive an invoice rendering template 

Updates the status of an invoice rendering template to ‘archived’ so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it.

Parameters

No parameters.

Returns

The updated template object is returned if successful. Otherwise, this call raises an error.

POST /v1/invoice_rendering_templates/:id/archive
curl -X POST https://api.stripe.com/v1/invoice_rendering_templates/inrtem_abc/archive \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:"
Response
{
"id": "inrtem_abc",
"object": "invoice_rendering_template",
"nickname": "My Invoice Template",
"status": "active",
"version": 1,
"created": 1678942624,
"livemode": false
}

Unarchive an invoice rendering template 

Unarchive an invoice rendering template so it can be used on new Stripe objects again.

Parameters

No parameters.

Returns

The updated template object is returned if successful. Otherwise, this call raises an error.

POST /v1/invoice_rendering_templates/:id/unarchive
curl -X POST https://api.stripe.com/v1/invoice_rendering_templates/inrtem_abc/unarchive \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:"
Response
{
"id": "inrtem_abc",
"object": "invoice_rendering_template",
"nickname": "My Invoice Template",
"status": "active",
"version": 1,
"created": 1678942624,
"livemode": false
}

Alerts 

A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests.

Meters 

Meters specify how to aggregate meter events over a billing period. Meter events represent the actions that customers take in your system. Meters attach to prices and form the basis of the bill.

Related guide: Usage based billing