View as Markdown
API Spec (JSON)
API Spec (YAML)
Compact modeHides field descriptions and other prose for a more compact, scannable view of the API reference.Deprecation notice: TheCreates an invoice template. You can use details from this template to create an invoice. You can create up to 50 templates./v1/invoicesendpoint is deprecated. Use the/v2/invoicesendpoint instead. For details, see PayPal Invoicing Basic Integration.
Note: Every merchant starts with three PayPal system templates that are optimized for the unit type billed. The template includes `Quantity`, `Hours`, and `Amount`.
Client CredentialsToken URLhttps://api-m.sandbox.paypal.com/v1/oauth2/tokenInheaderScopes
https://uri.paypal.com/services/invoicingapplication/json
TypeScript Definitions
Use the request body type in TypeScript.
template_dataobject<template-data>Optionalmerchant_infoobject<merchant-info>Requiredaddressobject<address>Optionalcountry_codestringRequiredNote: The country code for Great Britain is `GB` and not `UK` as is used in that country's top-level domain names. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
statestringOptionalphoneobject<phone>Optionalfaxobject<phone>Optionalbilling_infoobject<billing-info>[]OptionalNote: This value is an array with only one element.
phoneobject<phone>Optionaladdressobject<address>Optionalcountry_codestringRequiredNote: The country code for Great Britain is `GB` and not `UK` as is used in that country's top-level domain names. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
statestringOptionallanguageenumOptionalshipping_infoobject<shipping-info>Optionaladdressobject<address>Optionalcountry_codestringRequiredNote: The country code for Great Britain is `GB` and not `UK` as is used in that country's top-level domain names. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
statestringOptionalcc_infoarray<email>Optionalitemsobject<invoice-item>[]Optionalunit_priceobject<currency>RequiredvaluestringRequiredtaxobject<tax>Optionaldiscountobject<discount>Optionalamountobject<currency>OptionalvaluestringRequiredpayment_termobject<payment-term>Optionaldiscountobject<discount>Optionalamountobject<currency>OptionalvaluestringRequiredshipping_costobject<shipping-cost>Optionalamountobject<currency>OptionalvaluestringRequiredtaxobject<tax>Optionalcustomobject<custom-amount>Optionalamountobject<currency>OptionalvaluestringRequiredminimum_amount_dueobject<currency>OptionalvaluestringRequiredattachmentsobject<file-attachment>[]Optionalsettingsobject<template-settings>[]Optionaldisplay_preferenceobject<template-settings-metadata>Optionalapplication/json
application/json
curl -X POST "https://example.com/v1/invoicing/templates" \ -H "Content-Type: application/json" \ -d '{}'{ "template_id": "string", "name": "string", "default": true, "template_data": { "merchant_info": { "email": "user@example.com", "business_name": "string", "first_name": "string", "last_name": "string", "address": { "line1": "string", "line2": "string", "city": "string", "country_code": "string", "postal_code": "string", "state": "string", "phone": "string" }, "phone": { "country_code": "str", "national_number": "string" }, "fax": { "country_code": "str", "national_number": "string" }, "website": "http://example.com", "tax_id": "string", "additional_info": "string" }, "billing_info": [ { "email": "user@example.com", "phone": { "country_code": "str", "national_number": "string" }, "first_name": "string", "last_name": "string", "business_name": "string", "address": { "line1": "string", "line2": "string", "city": "string", "country_code": "string", "postal_code": "string", "state": "string", "phone": "string" }, "language": "da_DK", "additional_info": "string" } ], "shipping_info": { "first_name": "string", "last_name": "string", "business_name": "string", "address": { "line1": "string", "line2": "string", "city": "string", "country_code": "string", "postal_code": "string", "state": "string", "phone": "string" } }, "cc_info": [ "user@example.com" ], "items": [ { "name": "string", "description": "string", "quantity": 0, "unit_price": { "currency": "string", "value": "string" }, "tax": { "name": "string", "percent": 0, "amount": { "currency": "string", "value": "string" }, "tax_note": "string" }, "date": "2019-08-24", "discount": { "percent": 0, "amount": { "currency": "string", "value": "string" } }, "unit_of_measure": "QUANTITY" } ], "payment_term": { "term_type": "DUE_ON_RECEIPT", "due_date": "2019-08-24" }, "reference": "string", "discount": { "percent": 0, "amount": { "currency": "string", "value": "string" } }, "shipping_cost": { "amount": { "currency": "string", "value": "string" }, "tax": { "name": "string", "percent": 0, "amount": { "currency": "string", "value": "string" }, "tax_note": "string" } }, "custom": { "label": "string", "amount": { "currency": "string", "value": "string" } }, "allow_partial_payment": false, "minimum_amount_due": { "currency": "string", "value": "string" }, "tax_calculated_after_discount": false, "tax_inclusive": false, "terms": "string", "note": "string", "merchant_memo": "string", "logo_url": "http://example.com", "total_amount": { "currency": "string", "value": "string" }, "attachments": [ { "name": "string", "url": "http://example.com" } ] }, "settings": [ { "field_name": "items.quantity", "display_preference": { "hidden": false } } ], "unit_of_measure": "HOURS", "custom": true, "links": [ { "href": "string", "rel": "string", "method": "GET", "title": "string", "mediaType": "string", "encType": "application/json", "schema": { "additionalItems": {}, "dependencies": {}, "items": {}, "patternProperties": {}, "properties": {}, "allOf": [ {} ], "anyOf": [ {} ], "oneOf": [ {} ], "not": {}, "links": [ {} ], "fragmentResolution": "string", "media": { "type": "string", "binaryEncoding": "string" }, "pathStart": "http://example.com" }, "targetSchema": { "additionalItems": {}, "dependencies": {}, "items": {}, "patternProperties": {}, "properties": {}, "allOf": [ {} ], "anyOf": [ {} ], "oneOf": [ {} ], "not": {}, "links": [ {} ], "fragmentResolution": "string", "media": { "type": "string", "binaryEncoding": "string" }, "pathStart": "http://example.com" } } ]}