On this page
No Headings
Deprecation notice: TheCreates a draft invoice. To move the invoice from a draft to payable state, you must send the invoice./v1/invoicesendpoint is deprecated. Use the/v2/invoicesendpoint instead. For details, see PayPal Invoicing Basic Integration.
invoice object must include an items array.Note: The merchant that you specify in an invoice must have a PayPal account in good standing..
Oauth 2.0 authentication
Client CredentialsToken URLhttps://api-m.paypal.com/v1/oauth2/tokenInheaderScopes
https://uri.paypal.com/services/invoicingapplication/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
curl -X POST "https://api-m.paypal.com/v1/invoicing/v1/invoicing/invoices" \ -H "Content-Type: application/json" \ -d '{ "merchant_info": {} }'{
"id": "string",
"number": "string",
"status": "DRAFT",
"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": [
{
"email": "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"
}
],
"invoice_date": "2019-08-24",
"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"
},
"payments": [
{
"type": "PAYPAL",
"transaction_id": "string",
"transaction_type": "SALE",
"date": "2019-08-24T14:15:22Z",
"method": "BANK_TRANSFER",
"note": "string",
"amount": {
"currency": "string",
"value": "string"
}
}
],
"refunds": [
{
"type": "PAYPAL",
"transaction_id": "string",
"date": "2019-08-24T14:15:22Z",
"note": "string",
"amount": {
"currency": "string",
"value": "string"
}
}
],
"metadata": {
"created_date": "2019-08-24T14:15:22Z",
"created_by": "string",
"cancelled_date": "2019-08-24T14:15:22Z",
"cancelled_by": "string",
"last_updated_date": "2019-08-24T14:15:22Z",
"last_updated_by": "string",
"first_sent_date": "2019-08-24T14:15:22Z",
"last_sent_date": "2019-08-24T14:15:22Z",
"last_sent_by": "string",
"payer_view_url": "http://example.com"
},
"paid_amount": {
"paypal": {
"currency": "string",
"value": "string"
},
"other": {
"currency": "string",
"value": "string"
}
},
"refunded_amount": {
"paypal": {
"currency": "string",
"value": "string"
},
"other": {
"currency": "string",
"value": "string"
}
},
"attachments": [
{
"name": "string",
"url": "http://example.com"
}
],
"allow_tip": false,
"template_id": "PayPal system template",
"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"
}
}
]
}{
"name": "string",
"debug_id": "string",
"message": "string",
"information_link": "string",
"details": [
{
"field": "string",
"issue": "string"
}
]
}The invoice number. If you omit this value, the default is the number that the API automatically increments from the last number.
length <= 25The merchant information, such as business name, email, address, and so on.
An array of billing information for the invoice recipient.Note: This value is an array with only one element.
1 <= items <= 1The shipping information for the recipient of the invoice.
An array of email addresses to which PayPal sends a copy of the invoice.
An array of invoice line item information.
items <= 100The invoice date as specified by the sender, in Internet date and time format.
dateThe payment due date of the invoice. If you include due_date, the term_type value is ignored.
The reference data, such as PO number.
length <= 60The item discount, as a percent or an amount value.
The shipping amount, as a percent or an amount value.
The custom amount to apply to an invoice. If you include a label, you must include a custom amount.
Indicates whether the invoice allows a partial payment. If false, the invoice must be paid in full. If true, the invoice allows partial payments.Note: This feature is not available for merchants in India, Brazil, or Israel.
falseThe currency and amount of the item unit price. Value is from -1000000 to 1000000. Supports up to two decimal places.
Indicates whether the tax is calculated before or after a discount. If false, the tax is calculated before a discount. If true, the tax is calculated after a discount.
falseIndicates whether the unit price includes tax.
falseThe general terms of the invoice.
length <= 4000A note to the invoice recipient. The note also appears on the invoice notification email.
length <= 4000A private bookkeeping memo for the merchant.
length <= 500The full URL to an external logo image. The logo must not be larger than 250 pixels wide by 90 pixels high. The logo must be stored on a secure server.
urilength <= 4000Indicates whether the invoice enables the customer to enter a tip amount during payment. If true, the invoice shows a tip amount field so that the customer can enter a tip amount. If false, the invoice does not show a tip amount field.Note: This feature is not available for merchants in Hong Kong, Taiwan, India, or Japan.
falseThis value is only used to determine the layout to display on the create or edit invoice experience, such as which fields to show and hide. It does not impact the view of the invoice that the customer receives.Note: If you are just using the Invoicing APIs to create and send invoices, leave this field blank. The template_id is only needed if you use the Invoicing API to build a full invoicing solution that includes templates.
"PayPal system template"