QUANTITY, HOURS, and AMOUNT billing.
Templates API
Templates are managed through five endpoints covering the full create, read, update, and delete lifecycle. UsePOST to create a new template, GET to retrieve either a single template by ID or your full list, PUT to fully update an existing template, and DELETE to remove one. All template endpoints are scoped to /v2/invoicing/templates and require a valid Bearer token. For the complete request and response schemas, see the Invoicing API reference.
| Method | Endpoint | Description |
|---|---|---|
POST | /v2/invoicing/templates | Create a new template. |
GET | /v2/invoicing/templates | List all templates. Use ?fields=all for full details or ?fields=none for name, ID, and default flag only. |
GET | /v2/invoicing/templates/{template_id} | Show details for a single template. Use @default as the ID to retrieve the current default template. |
PUT | /v2/invoicing/templates/{template_id} | Fully update a template by ID. Doesn’t support partial updates, so you’ll need to include the complete template object. |
DELETE | /v2/invoicing/templates/{template_id} | Delete a template by ID. Returns HTTP 204 No Content. Can’t be used on PayPal system templates where standard_template is true. |
Template object
The following fields make up the template object.| Field | Type | Required | Description |
|---|---|---|---|
id | string | Read-only | The PayPal-generated template ID (TEMP-XXXXXXXXXXXX). |
name | string | Required | A merchant-defined name for the template. Shown in the dashboard and template list. |
default_template | boolean | Optional | If true, this template is used as the default when creating invoices. Only one template can be the default at a time. Default: false. |
template_info | object | Optional | The invoice details are pre-populated by this template. See template_info for more information. |
settings | array | Optional | Display rules that control which fields are shown or hidden on invoices created from this template. See settings for more information. |
unit_of_measure | string | Optional | The unit of measure for line items. Values: QUANTITY, HOURS, AMOUNT. Default: QUANTITY. |
standard_template | boolean | Read-only | If true, this is a PayPal system template and can’t be deleted. |
links | array | Read-only | HATEOAS links for available actions on the template, for example, self, delete, replace. |
template_info
The invoice data stored in the template shares the same structure as the invoice object. See the most commonly used fields.| Field | Type | Description |
|---|---|---|
detail | object | Default invoice detail including currency_code, note, terms_and_conditions, memo, reference, and attachments. |
invoicer | object | The merchant’s business information, including name, address, email, phone, logo URL, and tax ID. |
primary_recipients | array | Default recipient billing and shipping information. |
items | array | Default line items with name, quantity, unit amount, tax, and unit of measure. |
configuration | object | Default invoice configuration including allow_tip, tax_calculated_after_discount, tax_inclusive, and partial_payment settings. |
amount | object | Default amount breakdown including shipping, custom charges, and discount. |
settings
An array of display rules controlling field visibility on invoices created from this template. Each entry contains afield_name and a display_preference object with a single hidden boolean. Set hidden: true to hide the field, or hidden: false to show it.
Supported field_name values:
| Value | Description |
|---|---|
items.date | The date column on line items. |
items.description | The description column on line items. |
items.discount | The per-item discount field. |
items.tax | The per-item tax field. |
discount | The invoice-level discount field. |
shipping | The shipping charge field. |
custom | The custom charge field, for example, packing fees. |
Create a template
Creates a new invoice template. A successful request returnsHTTP 201 Created and the template object if you set Prefer: return=representation.
Request
Response
id to reference this template when listing, updating, or associating it with an invoice through configuration.template_id.
Quick start using Invoicing API
Create and send your first invoice using the PayPal Invoicing API.
Use cases
See how templates fit into common invoicing workflows.
Reference
Explore the full schema for the template object and all other Invoicing API objects.