Invoice Rendering Templates

Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates can be created from within the Dashboard, and they can be used over the API when creating invoices.

Was this section helpful?YesNo
Retrieve an invoice rendering template
GET/v1/invoice_rendering_templates/:id
List all invoice rendering templates
GET/v1/invoice_rendering_templates
Archive an invoice rendering template
POST/v1/invoice_rendering_templates/:id/archive
Unarchive an invoice rendering template
POST/v1/invoice_rendering_templates/:id/unarchive

The Invoice Rendering Template object

Attributes

  • idstring

    Unique identifier for the object.

  • objectstring

    String representing the object’s type. Objects of the same type share the same value.

  • createdtimestamp

    Time at which the object was created. Measured in seconds since the Unix epoch.

  • livemodeboolean

    If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.

  • metadatanullable object

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

  • nicknamenullable string

    A brief description of the template, hidden from customers

  • statusenum

    The status of the template, one of active or archived.

    Possible enum values
    active
    archived
  • versioninteger

    Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering

The Invoice Rendering Template object
{
"id": "inrtem_abc",
"object": "invoice_rendering_template",
"nickname": "My Invoice Template",
"status": "active",
"version": 1,
"created": 1678942624,
"livemode": false
}

Retrieve an invoice rendering template

Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions.

Parameters

No parameters.

Returns

Returns an invoice_payment object if a valid invoice payment ID and matching invoice ID were provided. Otherwise, this call raises an error.

curl https://api.stripe.com/v1/invoice_rendering_templates/inrtem_abc \
-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
}