Templates

Use the /templates resource to create, list, show details for, update, and delete invoice templates. Use the /templates resource when you create a third-party invoicing application. For instance, a business can create a template with predefined invoice data. Later, the business can select the template to populate the invoice data.

Note: To upload a logo to display on an invoice, you can use the Template Settings dashboard to create a template. When you create an invoice, you can use the URI for that logo.

The template object

Attributes

The template with invoice details to load with all captured fields.

idstring · max: 30Read-onlyOptional

The ID of the template.

namestring · min: 1 · max: 500Optional

The template name.Note: The template name must be unique.

default_templatebooleanOptional

Indicates whether this template is the default template. A invoicer can have one default template.

unit_of_measurestring · enumOptional

The unit of measure for the template. Value is quantity, hours, or amount.

Possible values:
standard_templatebooleanRead-onlyOptional

Indicates whether this template is a invoicer-created custom template. The system generates non-custom templates.

The template object

{
  "id": "text",
  "name": "text",
  "default_template": true,
  "template_info": {
    "detail": {
      "reference": "text",
      "currency_code": "text",
      "note": "text",
      "terms_and_conditions": "text",
      "memo": "text",
      "attachments": [
        {
          "id": "text",
          "reference_url": "https://example.com",
          "content_type": "text",
          "create_time": "text",
          "size": "text"
        }
      ],
      "payment_term": {
        "term_type": "DUE_ON_RECEIPT"
      },
      "metadata": {
        "create_time": "text",
        "created_by": "text",
        "last_update_time": "text",
        "last_updated_by": "text"
      }
    },
    "invoicer": {
      "business_name": "text",
      "name": {
        "prefix": "text",
        "given_name": "text",
        "surname": "text",
        "middle_name": "text",
        "suffix": "text",
        "alternate_full_name": "text",
        "full_name": "text"
      },
      "address": {
        "address_line_1": "text",
        "address_line_2": "text",
        "address_line_3": "text",
        "admin_area_4": "text",
        "admin_area_3": "text",
        "admin_area_2": "text",
        "admin_area_1": "text",
        "postal_code": "text",
        "country_code": "text",
        "address_details": {
          "street_number": "text",
          "street_name": "text",
          "street_type": "text",
          "delivery_service": "text",
          "building_name": "text",
          "sub_building": "text"
        }
      },
      "email_address": "text",
      "phones": [
        {
          "country_code": "text",
          "national_number": "text",
          "extension_number": "text",
          "phone_type": "FAX"
        }
      ],
      "website": "https://example.com",
      "tax_id": "text",
      "additional_notes": "text",
      "logo_url": "https://example.com"
    },
    "primary_recipients": [
      {
        "billing_info": {
          "business_name": "text",
          "name": {
            "prefix": "text",
            "given_name": "text",
            "surname": "text",
            "middle_name": "text",
            "suffix": "text",
            "alternate_full_name": "text",
            "full_name": "text"
          },
          "address": {
            "address_line_1": "text",
            "address_line_2": "text",
            "address_line_3": "text",
            "admin_area_4": "text",
            "admin_area_3": "text",
            "admin_area_2": "text",
            "admin_area_1": "text",
            "postal_code": "text",
            "country_code": "text",
            "address_details": {
              "street_number": "text",
              "street_name": "text",
              "street_type": "text",
              "delivery_service": "text",
              "building_name": "text",
              "sub_building": "text"
            }
          },
          "email_address": "text",
          "phones": [
            {
              "country_code": "text",
              "national_number": "text",
              "extension_number": "text",
              "phone_type": "FAX"
            }
          ],
          "additional_info": "text",
          "language": "text"
        },
        "shipping_info": {
          "business_name": "text",
          "name": {
            "prefix": "text",
            "given_name": "text",
            "surname": "text",
            "middle_name": "text",
            "suffix": "text",
            "alternate_full_name": "text",
            "full_name": "text"
          },
          "address": {
            "address_line_1": "text",
            "address_line_2": "text",
            "address_line_3": "text",
            "admin_area_4": "text",
            "admin_area_3": "text",
            "admin_area_2": "text",
            "admin_area_1": "text",
            "postal_code": "text",
            "country_code": "text",
            "address_details": {
              "street_number": "text",
              "street_name": "text",
              "street_type": "text",
              "delivery_service": "text",
              "building_name": "text",
              "sub_building": "text"
            }
          }
        }
      }
    ],
    "additional_recipients": [
      "text"
    ],
    "items": [
      {
        "id": "text",
        "name": "text",
        "description": "text",
        "quantity": "text",
        "unit_amount": {
          "currency_code": "text",
          "value": "text"
        },
        "tax": {
          "name": "text",
          "percent": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        },
        "item_date": "text",
        "discount": {
          "percent": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        },
        "unit_of_measure": "QUANTITY"
      }
    ],
    "configuration": {
      "tax_calculated_after_discount": true,
      "tax_inclusive": false,
      "allow_tip": false,
      "partial_payment": {
        "allow_partial_payment": false,
        "minimum_amount_due": {
          "currency_code": "text",
          "value": "text"
        }
      }
    },
    "amount": {
      "currency_code": "text",
      "value": "text",
      "breakdown": {
        "item_total": {
          "currency_code": "text",
          "value": "text"
        },
        "discount": {
          "invoice_discount": {
            "percent": "text",
            "amount": {
              "currency_code": "text",
              "value": "text"
            }
          },
          "item_discount": {
            "currency_code": "text",
            "value": "text"
          }
        },
        "tax_total": {
          "currency_code": "text",
          "value": "text"
        },
        "shipping": {
          "amount": {
            "currency_code": "text",
            "value": "text"
          },
          "tax": {
            "name": "text",
            "percent": "text",
            "amount": {
              "currency_code": "text",
              "value": "text"
            }
          }
        },
        "custom": {
          "label": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        }
      }
    },
    "due_amount": {
      "currency_code": "text",
      "value": "text"
    }
  },
  "settings": {
    "template_item_settings": [
      {
        "field_name": "ITEMS_QUANTITY",
        "display_preference": {
          "hidden": false
        }
      }
    ],
    "template_subtotal_settings": [
      {
        "field_name": "DISCOUNT",
        "display_preference": {
          "hidden": false
        }
      }
    ]
  },
  "unit_of_measure": "QUANTITY",
  "standard_template": true,
  "links": [
    {
      "href": "text",
      "rel": "text",
      "method": "GET"
    }
  ]
}

List templates

get

Lists merchant-created templates with associated details. The associated details include the emails, addresses, and phone numbers from the user's PayPal profile. The user can select which values to show in the business information section of their template.

Authorizations
Query parameters
fieldsstringOptional

The fields to return in the response. Value is all or none. To return only the template name, ID, and default attributes, specify none.

Default: allPattern: (?i)^(all|none)$
pageinteger · min: 1 · max: 1000Optional

The page number to be retrieved, for the list of templates. So, a combination of page=1 and page_size=20 returns the first 20 templates. A combination of page=2 and page_size=20 returns the next 20 templates.

Default: 1
page_sizeinteger · min: 1 · max: 100Optional

The maximum number of templates to return in the response.

Default: 20
Responses
200
A successful request returns the HTTP `200 OK` status code and a JSON response body that lists invoices.
get
GET /v2/invoicing/templates HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "addresses": [
    {
      "address_line_1": "text",
      "address_line_2": "text",
      "address_line_3": "text",
      "admin_area_4": "text",
      "admin_area_3": "text",
      "admin_area_2": "text",
      "admin_area_1": "text",
      "postal_code": "text",
      "country_code": "text",
      "address_details": {
        "street_number": "text",
        "street_name": "text",
        "street_type": "text",
        "delivery_service": "text",
        "building_name": "text",
        "sub_building": "text"
      }
    }
  ],
  "emails": "text",
  "phones": [
    {
      "country_code": "text",
      "national_number": "text",
      "extension_number": "text",
      "phone_type": "FAX"
    }
  ],
  "templates": [
    {
      "id": "text",
      "name": "text",
      "default_template": true,
      "template_info": {
        "detail": {
          "reference": "text",
          "currency_code": "text",
          "note": "text",
          "terms_and_conditions": "text",
          "memo": "text",
          "attachments": [
            {
              "id": "text",
              "reference_url": "https://example.com",
              "content_type": "text",
              "create_time": "text",
              "size": "text"
            }
          ],
          "payment_term": {
            "term_type": "DUE_ON_RECEIPT"
          },
          "metadata": {
            "create_time": "text",
            "created_by": "text",
            "last_update_time": "text",
            "last_updated_by": "text"
          }
        },
        "invoicer": {
          "business_name": "text",
          "name": {
            "prefix": "text",
            "given_name": "text",
            "surname": "text",
            "middle_name": "text",
            "suffix": "text",
            "alternate_full_name": "text",
            "full_name": "text"
          },
          "address": {
            "address_line_1": "text",
            "address_line_2": "text",
            "address_line_3": "text",
            "admin_area_4": "text",
            "admin_area_3": "text",
            "admin_area_2": "text",
            "admin_area_1": "text",
            "postal_code": "text",
            "country_code": "text",
            "address_details": {
              "street_number": "text",
              "street_name": "text",
              "street_type": "text",
              "delivery_service": "text",
              "building_name": "text",
              "sub_building": "text"
            }
          },
          "email_address": "text",
          "phones": [
            {
              "country_code": "text",
              "national_number": "text",
              "extension_number": "text",
              "phone_type": "FAX"
            }
          ],
          "website": "https://example.com",
          "tax_id": "text",
          "additional_notes": "text",
          "logo_url": "https://example.com"
        },
        "primary_recipients": [
          {
            "billing_info": {
              "business_name": "text",
              "name": {
                "prefix": "text",
                "given_name": "text",
                "surname": "text",
                "middle_name": "text",
                "suffix": "text",
                "alternate_full_name": "text",
                "full_name": "text"
              },
              "address": {
                "address_line_1": "text",
                "address_line_2": "text",
                "address_line_3": "text",
                "admin_area_4": "text",
                "admin_area_3": "text",
                "admin_area_2": "text",
                "admin_area_1": "text",
                "postal_code": "text",
                "country_code": "text",
                "address_details": {
                  "street_number": "text",
                  "street_name": "text",
                  "street_type": "text",
                  "delivery_service": "text",
                  "building_name": "text",
                  "sub_building": "text"
                }
              },
              "email_address": "text",
              "phones": [
                {
                  "country_code": "text",
                  "national_number": "text",
                  "extension_number": "text",
                  "phone_type": "FAX"
                }
              ],
              "additional_info": "text",
              "language": "text"
            },
            "shipping_info": {
              "business_name": "text",
              "name": {
                "prefix": "text",
                "given_name": "text",
                "surname": "text",
                "middle_name": "text",
                "suffix": "text",
                "alternate_full_name": "text",
                "full_name": "text"
              },
              "address": {
                "address_line_1": "text",
                "address_line_2": "text",
                "address_line_3": "text",
                "admin_area_4": "text",
                "admin_area_3": "text",
                "admin_area_2": "text",
                "admin_area_1": "text",
                "postal_code": "text",
                "country_code": "text",
                "address_details": {
                  "street_number": "text",
                  "street_name": "text",
                  "street_type": "text",
                  "delivery_service": "text",
                  "building_name": "text",
                  "sub_building": "text"
                }
              }
            }
          }
        ],
        "additional_recipients": [
          "text"
        ],
        "items": [
          {
            "id": "text",
            "name": "text",
            "description": "text",
            "quantity": "text",
            "unit_amount": {
              "currency_code": "text",
              "value": "text"
            },
            "tax": {
              "name": "text",
              "percent": "text",
              "amount": {
                "currency_code": "text",
                "value": "text"
              }
            },
            "item_date": "text",
            "discount": {
              "percent": "text",
              "amount": {
                "currency_code": "text",
                "value": "text"
              }
            },
            "unit_of_measure": "QUANTITY"
          }
        ],
        "configuration": {
          "tax_calculated_after_discount": true,
          "tax_inclusive": false,
          "allow_tip": false,
          "partial_payment": {
            "allow_partial_payment": false,
            "minimum_amount_due": {
              "currency_code": "text",
              "value": "text"
            }
          }
        },
        "amount": {
          "currency_code": "text",
          "value": "text",
          "breakdown": {
            "item_total": {
              "currency_code": "text",
              "value": "text"
            },
            "discount": {
              "invoice_discount": {
                "percent": "text",
                "amount": {
                  "currency_code": "text",
                  "value": "text"
                }
              },
              "item_discount": {
                "currency_code": "text",
                "value": "text"
              }
            },
            "tax_total": {
              "currency_code": "text",
              "value": "text"
            },
            "shipping": {
              "amount": {
                "currency_code": "text",
                "value": "text"
              },
              "tax": {
                "name": "text",
                "percent": "text",
                "amount": {
                  "currency_code": "text",
                  "value": "text"
                }
              }
            },
            "custom": {
              "label": "text",
              "amount": {
                "currency_code": "text",
                "value": "text"
              }
            }
          }
        },
        "due_amount": {
          "currency_code": "text",
          "value": "text"
        }
      },
      "settings": {
        "template_item_settings": [
          {
            "field_name": "ITEMS_QUANTITY",
            "display_preference": {
              "hidden": false
            }
          }
        ],
        "template_subtotal_settings": [
          {
            "field_name": "DISCOUNT",
            "display_preference": {
              "hidden": false
            }
          }
        ]
      },
      "unit_of_measure": "QUANTITY",
      "standard_template": true,
      "links": [
        {
          "href": "text",
          "rel": "text",
          "method": "GET"
        }
      ]
    }
  ],
  "links": [
    {
      "href": "text",
      "rel": "text",
      "method": "GET"
    }
  ]
}

Create template

post

Creates an invoice template. You can use details from this template to create an invoice. You can create up to 50 templates.

Note: Every merchant starts with three PayPal system templates that are optimized for the unit type billed. The template includes Quantity, Hours, and Amount.

Authorizations
Body

The template with invoice details to load with all captured fields.

idstring · max: 30Read-onlyOptional

The ID of the template.

namestring · min: 1 · max: 500Optional

The template name.Note: The template name must be unique.

default_templatebooleanOptional

Indicates whether this template is the default template. A invoicer can have one default template.

unit_of_measurestring · enumOptional

The unit of measure for the template. Value is quantity, hours, or amount.

Possible values:
standard_templatebooleanRead-onlyOptional

Indicates whether this template is a invoicer-created custom template. The system generates non-custom templates.

Responses
201
A successful request returns the HTTP `201 Created` status code. A JSON response body that shows template details is returned if you set prefer=return=representation.
post
POST /v2/invoicing/templates HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 3713

{
  "name": "text",
  "default_template": true,
  "template_info": {
    "detail": {
      "reference": "text",
      "currency_code": "text",
      "note": "text",
      "terms_and_conditions": "text",
      "memo": "text",
      "attachments": [
        {
          "id": "text",
          "reference_url": "https://example.com",
          "content_type": "text",
          "create_time": "text",
          "size": "text"
        }
      ],
      "payment_term": {
        "term_type": "DUE_ON_RECEIPT"
      },
      "metadata": {}
    },
    "invoicer": {
      "business_name": "text",
      "name": {
        "prefix": "text",
        "given_name": "text",
        "surname": "text",
        "middle_name": "text",
        "suffix": "text",
        "alternate_full_name": "text",
        "full_name": "text"
      },
      "address": {
        "address_line_1": "text",
        "address_line_2": "text",
        "address_line_3": "text",
        "admin_area_4": "text",
        "admin_area_3": "text",
        "admin_area_2": "text",
        "admin_area_1": "text",
        "postal_code": "text",
        "country_code": "text",
        "address_details": {
          "street_number": "text",
          "street_name": "text",
          "street_type": "text",
          "delivery_service": "text",
          "building_name": "text",
          "sub_building": "text"
        }
      },
      "email_address": "text",
      "phones": [
        {
          "country_code": "text",
          "national_number": "text",
          "extension_number": "text",
          "phone_type": "FAX"
        }
      ],
      "website": "https://example.com",
      "tax_id": "text",
      "additional_notes": "text",
      "logo_url": "https://example.com"
    },
    "primary_recipients": [
      {
        "billing_info": {
          "business_name": "text",
          "name": {
            "prefix": "text",
            "given_name": "text",
            "surname": "text",
            "middle_name": "text",
            "suffix": "text",
            "alternate_full_name": "text",
            "full_name": "text"
          },
          "address": {
            "address_line_1": "text",
            "address_line_2": "text",
            "address_line_3": "text",
            "admin_area_4": "text",
            "admin_area_3": "text",
            "admin_area_2": "text",
            "admin_area_1": "text",
            "postal_code": "text",
            "country_code": "text",
            "address_details": {
              "street_number": "text",
              "street_name": "text",
              "street_type": "text",
              "delivery_service": "text",
              "building_name": "text",
              "sub_building": "text"
            }
          },
          "email_address": "text",
          "phones": [
            {
              "country_code": "text",
              "national_number": "text",
              "extension_number": "text",
              "phone_type": "FAX"
            }
          ],
          "additional_info": "text",
          "language": "text"
        },
        "shipping_info": {
          "business_name": "text",
          "name": {
            "prefix": "text",
            "given_name": "text",
            "surname": "text",
            "middle_name": "text",
            "suffix": "text",
            "alternate_full_name": "text",
            "full_name": "text"
          },
          "address": {
            "address_line_1": "text",
            "address_line_2": "text",
            "address_line_3": "text",
            "admin_area_4": "text",
            "admin_area_3": "text",
            "admin_area_2": "text",
            "admin_area_1": "text",
            "postal_code": "text",
            "country_code": "text",
            "address_details": {
              "street_number": "text",
              "street_name": "text",
              "street_type": "text",
              "delivery_service": "text",
              "building_name": "text",
              "sub_building": "text"
            }
          }
        }
      }
    ],
    "additional_recipients": [
      "text"
    ],
    "items": [
      {
        "name": "text",
        "description": "text",
        "quantity": "text",
        "unit_amount": {
          "currency_code": "text",
          "value": "text"
        },
        "tax": {
          "name": "text",
          "percent": "text"
        },
        "item_date": "text",
        "discount": {
          "percent": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        },
        "unit_of_measure": "QUANTITY"
      }
    ],
    "configuration": {
      "tax_calculated_after_discount": true,
      "tax_inclusive": false,
      "allow_tip": false,
      "partial_payment": {
        "allow_partial_payment": false,
        "minimum_amount_due": {
          "currency_code": "text",
          "value": "text"
        }
      }
    },
    "amount": {
      "currency_code": "text",
      "value": "text",
      "breakdown": {
        "item_total": {
          "currency_code": "text",
          "value": "text"
        },
        "discount": {
          "invoice_discount": {
            "percent": "text",
            "amount": {
              "currency_code": "text",
              "value": "text"
            }
          },
          "item_discount": {
            "currency_code": "text",
            "value": "text"
          }
        },
        "tax_total": {
          "currency_code": "text",
          "value": "text"
        },
        "shipping": {
          "amount": {
            "currency_code": "text",
            "value": "text"
          },
          "tax": {
            "name": "text",
            "percent": "text"
          }
        },
        "custom": {
          "label": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        }
      }
    }
  },
  "settings": {
    "template_item_settings": [
      {
        "field_name": "ITEMS_QUANTITY",
        "display_preference": {
          "hidden": false
        }
      }
    ],
    "template_subtotal_settings": [
      {
        "field_name": "DISCOUNT",
        "display_preference": {
          "hidden": false
        }
      }
    ]
  },
  "unit_of_measure": "QUANTITY"
}
{
  "id": "text",
  "name": "text",
  "default_template": true,
  "template_info": {
    "detail": {
      "reference": "text",
      "currency_code": "text",
      "note": "text",
      "terms_and_conditions": "text",
      "memo": "text",
      "attachments": [
        {
          "id": "text",
          "reference_url": "https://example.com",
          "content_type": "text",
          "create_time": "text",
          "size": "text"
        }
      ],
      "payment_term": {
        "term_type": "DUE_ON_RECEIPT"
      },
      "metadata": {
        "create_time": "text",
        "created_by": "text",
        "last_update_time": "text",
        "last_updated_by": "text"
      }
    },
    "invoicer": {
      "business_name": "text",
      "name": {
        "prefix": "text",
        "given_name": "text",
        "surname": "text",
        "middle_name": "text",
        "suffix": "text",
        "alternate_full_name": "text",
        "full_name": "text"
      },
      "address": {
        "address_line_1": "text",
        "address_line_2": "text",
        "address_line_3": "text",
        "admin_area_4": "text",
        "admin_area_3": "text",
        "admin_area_2": "text",
        "admin_area_1": "text",
        "postal_code": "text",
        "country_code": "text",
        "address_details": {
          "street_number": "text",
          "street_name": "text",
          "street_type": "text",
          "delivery_service": "text",
          "building_name": "text",
          "sub_building": "text"
        }
      },
      "email_address": "text",
      "phones": [
        {
          "country_code": "text",
          "national_number": "text",
          "extension_number": "text",
          "phone_type": "FAX"
        }
      ],
      "website": "https://example.com",
      "tax_id": "text",
      "additional_notes": "text",
      "logo_url": "https://example.com"
    },
    "primary_recipients": [
      {
        "billing_info": {
          "business_name": "text",
          "name": {
            "prefix": "text",
            "given_name": "text",
            "surname": "text",
            "middle_name": "text",
            "suffix": "text",
            "alternate_full_name": "text",
            "full_name": "text"
          },
          "address": {
            "address_line_1": "text",
            "address_line_2": "text",
            "address_line_3": "text",
            "admin_area_4": "text",
            "admin_area_3": "text",
            "admin_area_2": "text",
            "admin_area_1": "text",
            "postal_code": "text",
            "country_code": "text",
            "address_details": {
              "street_number": "text",
              "street_name": "text",
              "street_type": "text",
              "delivery_service": "text",
              "building_name": "text",
              "sub_building": "text"
            }
          },
          "email_address": "text",
          "phones": [
            {
              "country_code": "text",
              "national_number": "text",
              "extension_number": "text",
              "phone_type": "FAX"
            }
          ],
          "additional_info": "text",
          "language": "text"
        },
        "shipping_info": {
          "business_name": "text",
          "name": {
            "prefix": "text",
            "given_name": "text",
            "surname": "text",
            "middle_name": "text",
            "suffix": "text",
            "alternate_full_name": "text",
            "full_name": "text"
          },
          "address": {
            "address_line_1": "text",
            "address_line_2": "text",
            "address_line_3": "text",
            "admin_area_4": "text",
            "admin_area_3": "text",
            "admin_area_2": "text",
            "admin_area_1": "text",
            "postal_code": "text",
            "country_code": "text",
            "address_details": {
              "street_number": "text",
              "street_name": "text",
              "street_type": "text",
              "delivery_service": "text",
              "building_name": "text",
              "sub_building": "text"
            }
          }
        }
      }
    ],
    "additional_recipients": [
      "text"
    ],
    "items": [
      {
        "id": "text",
        "name": "text",
        "description": "text",
        "quantity": "text",
        "unit_amount": {
          "currency_code": "text",
          "value": "text"
        },
        "tax": {
          "name": "text",
          "percent": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        },
        "item_date": "text",
        "discount": {
          "percent": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        },
        "unit_of_measure": "QUANTITY"
      }
    ],
    "configuration": {
      "tax_calculated_after_discount": true,
      "tax_inclusive": false,
      "allow_tip": false,
      "partial_payment": {
        "allow_partial_payment": false,
        "minimum_amount_due": {
          "currency_code": "text",
          "value": "text"
        }
      }
    },
    "amount": {
      "currency_code": "text",
      "value": "text",
      "breakdown": {
        "item_total": {
          "currency_code": "text",
          "value": "text"
        },
        "discount": {
          "invoice_discount": {
            "percent": "text",
            "amount": {
              "currency_code": "text",
              "value": "text"
            }
          },
          "item_discount": {
            "currency_code": "text",
            "value": "text"
          }
        },
        "tax_total": {
          "currency_code": "text",
          "value": "text"
        },
        "shipping": {
          "amount": {
            "currency_code": "text",
            "value": "text"
          },
          "tax": {
            "name": "text",
            "percent": "text",
            "amount": {
              "currency_code": "text",
              "value": "text"
            }
          }
        },
        "custom": {
          "label": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        }
      }
    },
    "due_amount": {
      "currency_code": "text",
      "value": "text"
    }
  },
  "settings": {
    "template_item_settings": [
      {
        "field_name": "ITEMS_QUANTITY",
        "display_preference": {
          "hidden": false
        }
      }
    ],
    "template_subtotal_settings": [
      {
        "field_name": "DISCOUNT",
        "display_preference": {
          "hidden": false
        }
      }
    ]
  },
  "unit_of_measure": "QUANTITY",
  "standard_template": true,
  "links": [
    {
      "href": "text",
      "rel": "text",
      "method": "GET"
    }
  ]
}

Show template details

get

Shows details for a template, by ID.

Authorizations
Path parameters
template_idstringRequired

The ID of the template to delete.

Responses
200
A successful request returns the HTTP `200 OK` status code and a JSON response body that shows template details.
get
GET /v2/invoicing/templates/{template_id} HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
  "default_template": true,
  "template_info": {
    "configuration": {
      "tax_calculated_after_discount": true,
      "tax_inclusive": false,
      "allow_tip": true,
      "partial_payment": {
        "allow_partial_payment": true,
        "minimum_amount_due": {
          "currency_code": "USD",
          "value": "20.00"
        }
      }
    },
    "detail": {
      "reference": "deal-ref",
      "note": "Thank you for your business.",
      "currency_code": "USD",
      "terms_and_conditions": "No refunds after 30 days.",
      "memo": "This is a long contract",
      "attachments": [
        {
          "id": "Screen Shot 2018-11-23 at 16.45.01.png",
          "reference_url": "https://api-m.paypal.com/invoice/payerView/attachments/RkG9ggQbd4Mwm1tYdcF6uuixfFTFq32bBdbE1VbtQLdKSoS2ZOYpfjw9gPp7eTrZmVaFaDWzixHXm-OXWHbmigHigHzURDxJs8IIKqcqP8jawnBEZcraEAPVMULxf5iTyOSpAUc2ugW0PWdwDbM6mg-guFAUyj3Z98H7htWNjQY95jb9heOlcSXUe.sbDUR9smAszzzJoA1NXT6rEEegwQ&version=1&sig=JNODB0xEayW8txMQm6ZsIwDnd4eh3hd6ijiRLi4ipHE"
        }
      ],
      "payment_term": {
        "term_type": "NET_10"
      }
    },
    "invoicer": {
      "name": {
        "given_name": "David",
        "surname": "Larusso"
      },
      "address": {
        "address_line_1": "1234 First Street",
        "address_line_2": "337673 Hillside Court",
        "admin_area_2": "Anytown",
        "admin_area_1": "CA",
        "postal_code": "98765",
        "country_code": "US"
      },
      "email_address": "[email protected]",
      "phones": [
        {
          "country_code": "001",
          "national_number": "4085551234",
          "phone_type": "MOBILE"
        }
      ],
      "website": "www.test.com",
      "tax_id": "ABcNkWSfb5ICTt73nD3QON1fnnpgNKBy-Jb5SeuGj185MNNw6g",
      "logo_url": "https://example.com/logo.PNG",
      "additional_notes": "2-4"
    },
    "primary_recipients": [
      {
        "billing_info": {
          "name": {
            "given_name": "Stephanie",
            "surname": "Meyers"
          },
          "address": {
            "address_line_1": "1234 Main Street",
            "admin_area_2": "Anytown",
            "admin_area_1": "CA",
            "postal_code": "98765",
            "country_code": "US"
          },
          "email_address": "[email protected]",
          "phones": [
            {
              "country_code": "001",
              "national_number": "4884551234",
              "phone_type": "MOBILE"
            }
          ],
          "additional_info": "add-info"
        },
        "shipping_info": {
          "name": {
            "given_name": "Stephanie",
            "surname": "Meyers"
          },
          "address": {
            "address_line_1": "1234 Main Street",
            "admin_area_2": "Anytown",
            "admin_area_1": "CA",
            "postal_code": "98765",
            "country_code": "US"
          }
        }
      }
    ],
    "additional_recipients": [
      "[email protected]"
    ],
    "items": [
      {
        "name": "Yoga Mat",
        "description": "new watch",
        "quantity": "1",
        "unit_amount": {
          "currency_code": "USD",
          "value": "50.00"
        },
        "tax": {
          "name": "Sales Tax",
          "percent": "7.25"
        },
        "discount": {
          "percent": "5"
        },
        "unit_of_measure": "QUANTITY"
      },
      {
        "name": "Yoga T Shirt",
        "quantity": "1",
        "unit_amount": {
          "currency_code": "USD",
          "value": "10.00"
        },
        "tax": {
          "name": "Sales Tax",
          "percent": "7.25"
        },
        "discount": {
          "amount": {
            "currency_code": "USD",
            "value": "5.00"
          }
        },
        "unit_of_measure": "QUANTITY"
      }
    ],
    "amount": {
      "currency_code": "USD",
      "value": "74.21",
      "breakdown": {
        "custom": {
          "label": "Packing Charges",
          "amount": {
            "currency_code": "USD",
            "value": "10.00"
          }
        },
        "shipping": {
          "amount": {
            "currency_code": "USD",
            "value": "10.00"
          },
          "tax": {
            "name": "Sales Tax",
            "percent": "7.25"
          }
        },
        "discount": {
          "invoice_discount": {
            "percent": "5"
          }
        }
      }
    }
  },
  "settings": {
    "template_item_settings": [
      {
        "field_name": "ITEMS_DATE",
        "display_preference": {
          "hidden": true
        }
      },
      {
        "field_name": "ITEMS_DISCOUNT",
        "display_preference": {
          "hidden": false
        }
      },
      {
        "field_name": "ITEMS_TAX",
        "display_preference": {
          "hidden": false
        }
      },
      {
        "field_name": "ITEMS_DESCRIPTION",
        "display_preference": {
          "hidden": false
        }
      },
      {
        "field_name": "ITEMS_QUANTITY",
        "display_preference": {
          "hidden": true
        }
      }
    ],
    "template_subtotal_settings": [
      {
        "field_name": "CUSTOM",
        "display_preference": {
          "hidden": false
        }
      },
      {
        "field_name": "DISCOUNT",
        "display_preference": {
          "hidden": false
        }
      },
      {
        "field_name": "SHIPPING",
        "display_preference": {
          "hidden": false
        }
      }
    ]
  },
  "unit_of_measure": "QUANTITY",
  "standard_template": false
}

Fully update template

put

Fully updates a template, by ID. In the JSON request body, include a complete template object. This call does not support partial updates.

Authorizations
Path parameters
template_idstringRequired

The ID of the template to delete.

Body

The template with invoice details to load with all captured fields.

idstring · max: 30Read-onlyOptional

The ID of the template.

namestring · min: 1 · max: 500Optional

The template name.Note: The template name must be unique.

default_templatebooleanOptional

Indicates whether this template is the default template. A invoicer can have one default template.

unit_of_measurestring · enumOptional

The unit of measure for the template. Value is quantity, hours, or amount.

Possible values:
standard_templatebooleanRead-onlyOptional

Indicates whether this template is a invoicer-created custom template. The system generates non-custom templates.

Responses
200
A successful request returns the HTTP `200 OK` status code. A JSON response body that shows template details is returned if you set prefer=return=representation.
application/json
put
PUT /v2/invoicing/templates/{template_id} HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 3713

{
  "name": "text",
  "default_template": true,
  "template_info": {
    "detail": {
      "reference": "text",
      "currency_code": "text",
      "note": "text",
      "terms_and_conditions": "text",
      "memo": "text",
      "attachments": [
        {
          "id": "text",
          "reference_url": "https://example.com",
          "content_type": "text",
          "create_time": "text",
          "size": "text"
        }
      ],
      "payment_term": {
        "term_type": "DUE_ON_RECEIPT"
      },
      "metadata": {}
    },
    "invoicer": {
      "business_name": "text",
      "name": {
        "prefix": "text",
        "given_name": "text",
        "surname": "text",
        "middle_name": "text",
        "suffix": "text",
        "alternate_full_name": "text",
        "full_name": "text"
      },
      "address": {
        "address_line_1": "text",
        "address_line_2": "text",
        "address_line_3": "text",
        "admin_area_4": "text",
        "admin_area_3": "text",
        "admin_area_2": "text",
        "admin_area_1": "text",
        "postal_code": "text",
        "country_code": "text",
        "address_details": {
          "street_number": "text",
          "street_name": "text",
          "street_type": "text",
          "delivery_service": "text",
          "building_name": "text",
          "sub_building": "text"
        }
      },
      "email_address": "text",
      "phones": [
        {
          "country_code": "text",
          "national_number": "text",
          "extension_number": "text",
          "phone_type": "FAX"
        }
      ],
      "website": "https://example.com",
      "tax_id": "text",
      "additional_notes": "text",
      "logo_url": "https://example.com"
    },
    "primary_recipients": [
      {
        "billing_info": {
          "business_name": "text",
          "name": {
            "prefix": "text",
            "given_name": "text",
            "surname": "text",
            "middle_name": "text",
            "suffix": "text",
            "alternate_full_name": "text",
            "full_name": "text"
          },
          "address": {
            "address_line_1": "text",
            "address_line_2": "text",
            "address_line_3": "text",
            "admin_area_4": "text",
            "admin_area_3": "text",
            "admin_area_2": "text",
            "admin_area_1": "text",
            "postal_code": "text",
            "country_code": "text",
            "address_details": {
              "street_number": "text",
              "street_name": "text",
              "street_type": "text",
              "delivery_service": "text",
              "building_name": "text",
              "sub_building": "text"
            }
          },
          "email_address": "text",
          "phones": [
            {
              "country_code": "text",
              "national_number": "text",
              "extension_number": "text",
              "phone_type": "FAX"
            }
          ],
          "additional_info": "text",
          "language": "text"
        },
        "shipping_info": {
          "business_name": "text",
          "name": {
            "prefix": "text",
            "given_name": "text",
            "surname": "text",
            "middle_name": "text",
            "suffix": "text",
            "alternate_full_name": "text",
            "full_name": "text"
          },
          "address": {
            "address_line_1": "text",
            "address_line_2": "text",
            "address_line_3": "text",
            "admin_area_4": "text",
            "admin_area_3": "text",
            "admin_area_2": "text",
            "admin_area_1": "text",
            "postal_code": "text",
            "country_code": "text",
            "address_details": {
              "street_number": "text",
              "street_name": "text",
              "street_type": "text",
              "delivery_service": "text",
              "building_name": "text",
              "sub_building": "text"
            }
          }
        }
      }
    ],
    "additional_recipients": [
      "text"
    ],
    "items": [
      {
        "name": "text",
        "description": "text",
        "quantity": "text",
        "unit_amount": {
          "currency_code": "text",
          "value": "text"
        },
        "tax": {
          "name": "text",
          "percent": "text"
        },
        "item_date": "text",
        "discount": {
          "percent": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        },
        "unit_of_measure": "QUANTITY"
      }
    ],
    "configuration": {
      "tax_calculated_after_discount": true,
      "tax_inclusive": false,
      "allow_tip": false,
      "partial_payment": {
        "allow_partial_payment": false,
        "minimum_amount_due": {
          "currency_code": "text",
          "value": "text"
        }
      }
    },
    "amount": {
      "currency_code": "text",
      "value": "text",
      "breakdown": {
        "item_total": {
          "currency_code": "text",
          "value": "text"
        },
        "discount": {
          "invoice_discount": {
            "percent": "text",
            "amount": {
              "currency_code": "text",
              "value": "text"
            }
          },
          "item_discount": {
            "currency_code": "text",
            "value": "text"
          }
        },
        "tax_total": {
          "currency_code": "text",
          "value": "text"
        },
        "shipping": {
          "amount": {
            "currency_code": "text",
            "value": "text"
          },
          "tax": {
            "name": "text",
            "percent": "text"
          }
        },
        "custom": {
          "label": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        }
      }
    }
  },
  "settings": {
    "template_item_settings": [
      {
        "field_name": "ITEMS_QUANTITY",
        "display_preference": {
          "hidden": false
        }
      }
    ],
    "template_subtotal_settings": [
      {
        "field_name": "DISCOUNT",
        "display_preference": {
          "hidden": false
        }
      }
    ]
  },
  "unit_of_measure": "QUANTITY"
}
{
  "id": "text",
  "name": "text",
  "default_template": true,
  "template_info": {
    "detail": {
      "reference": "text",
      "currency_code": "text",
      "note": "text",
      "terms_and_conditions": "text",
      "memo": "text",
      "attachments": [
        {
          "id": "text",
          "reference_url": "https://example.com",
          "content_type": "text",
          "create_time": "text",
          "size": "text"
        }
      ],
      "payment_term": {
        "term_type": "DUE_ON_RECEIPT"
      },
      "metadata": {
        "create_time": "text",
        "created_by": "text",
        "last_update_time": "text",
        "last_updated_by": "text"
      }
    },
    "invoicer": {
      "business_name": "text",
      "name": {
        "prefix": "text",
        "given_name": "text",
        "surname": "text",
        "middle_name": "text",
        "suffix": "text",
        "alternate_full_name": "text",
        "full_name": "text"
      },
      "address": {
        "address_line_1": "text",
        "address_line_2": "text",
        "address_line_3": "text",
        "admin_area_4": "text",
        "admin_area_3": "text",
        "admin_area_2": "text",
        "admin_area_1": "text",
        "postal_code": "text",
        "country_code": "text",
        "address_details": {
          "street_number": "text",
          "street_name": "text",
          "street_type": "text",
          "delivery_service": "text",
          "building_name": "text",
          "sub_building": "text"
        }
      },
      "email_address": "text",
      "phones": [
        {
          "country_code": "text",
          "national_number": "text",
          "extension_number": "text",
          "phone_type": "FAX"
        }
      ],
      "website": "https://example.com",
      "tax_id": "text",
      "additional_notes": "text",
      "logo_url": "https://example.com"
    },
    "primary_recipients": [
      {
        "billing_info": {
          "business_name": "text",
          "name": {
            "prefix": "text",
            "given_name": "text",
            "surname": "text",
            "middle_name": "text",
            "suffix": "text",
            "alternate_full_name": "text",
            "full_name": "text"
          },
          "address": {
            "address_line_1": "text",
            "address_line_2": "text",
            "address_line_3": "text",
            "admin_area_4": "text",
            "admin_area_3": "text",
            "admin_area_2": "text",
            "admin_area_1": "text",
            "postal_code": "text",
            "country_code": "text",
            "address_details": {
              "street_number": "text",
              "street_name": "text",
              "street_type": "text",
              "delivery_service": "text",
              "building_name": "text",
              "sub_building": "text"
            }
          },
          "email_address": "text",
          "phones": [
            {
              "country_code": "text",
              "national_number": "text",
              "extension_number": "text",
              "phone_type": "FAX"
            }
          ],
          "additional_info": "text",
          "language": "text"
        },
        "shipping_info": {
          "business_name": "text",
          "name": {
            "prefix": "text",
            "given_name": "text",
            "surname": "text",
            "middle_name": "text",
            "suffix": "text",
            "alternate_full_name": "text",
            "full_name": "text"
          },
          "address": {
            "address_line_1": "text",
            "address_line_2": "text",
            "address_line_3": "text",
            "admin_area_4": "text",
            "admin_area_3": "text",
            "admin_area_2": "text",
            "admin_area_1": "text",
            "postal_code": "text",
            "country_code": "text",
            "address_details": {
              "street_number": "text",
              "street_name": "text",
              "street_type": "text",
              "delivery_service": "text",
              "building_name": "text",
              "sub_building": "text"
            }
          }
        }
      }
    ],
    "additional_recipients": [
      "text"
    ],
    "items": [
      {
        "id": "text",
        "name": "text",
        "description": "text",
        "quantity": "text",
        "unit_amount": {
          "currency_code": "text",
          "value": "text"
        },
        "tax": {
          "name": "text",
          "percent": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        },
        "item_date": "text",
        "discount": {
          "percent": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        },
        "unit_of_measure": "QUANTITY"
      }
    ],
    "configuration": {
      "tax_calculated_after_discount": true,
      "tax_inclusive": false,
      "allow_tip": false,
      "partial_payment": {
        "allow_partial_payment": false,
        "minimum_amount_due": {
          "currency_code": "text",
          "value": "text"
        }
      }
    },
    "amount": {
      "currency_code": "text",
      "value": "text",
      "breakdown": {
        "item_total": {
          "currency_code": "text",
          "value": "text"
        },
        "discount": {
          "invoice_discount": {
            "percent": "text",
            "amount": {
              "currency_code": "text",
              "value": "text"
            }
          },
          "item_discount": {
            "currency_code": "text",
            "value": "text"
          }
        },
        "tax_total": {
          "currency_code": "text",
          "value": "text"
        },
        "shipping": {
          "amount": {
            "currency_code": "text",
            "value": "text"
          },
          "tax": {
            "name": "text",
            "percent": "text",
            "amount": {
              "currency_code": "text",
              "value": "text"
            }
          }
        },
        "custom": {
          "label": "text",
          "amount": {
            "currency_code": "text",
            "value": "text"
          }
        }
      }
    },
    "due_amount": {
      "currency_code": "text",
      "value": "text"
    }
  },
  "settings": {
    "template_item_settings": [
      {
        "field_name": "ITEMS_QUANTITY",
        "display_preference": {
          "hidden": false
        }
      }
    ],
    "template_subtotal_settings": [
      {
        "field_name": "DISCOUNT",
        "display_preference": {
          "hidden": false
        }
      }
    ]
  },
  "unit_of_measure": "QUANTITY",
  "standard_template": true,
  "links": [
    {
      "href": "text",
      "rel": "text",
      "method": "GET"
    }
  ]
}

Delete template

delete

Deletes a template, by ID.

Authorizations
Path parameters
template_idstringRequired

The ID of the template to delete.

Responses
204
A successful request returns the HTTP `204 No Content` status code with no JSON response body.
delete
DELETE /v2/invoicing/templates/{template_id} HTTP/1.1
Host: api-m.sandbox.paypal.com
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

No content

Was this helpful?