Use the Invoicing API to create, send, and manage invoices. You can also use the API or webhooks to track invoice payments. When you send an invoice to a customer, the invoice moves from draft to payable state. PayPal then emails the customer a link to the invoice on the PayPal website. Customers with a PayPal account can log in and pay the invoice with PayPal. Alternatively, customers can pay as a guest with a debit card or credit card. For more information, see the Invoicing Overview and the Invoicing Integration Guide.
Records a payment for the invoice. If no payment is due, the invoice is marked as PAID
. Otherwise, the invoice is marked as PARTIALLY PAID
.
The details of the payment to record against the invoice.
payment_id | string <= 22 characters The ID for a PayPal payment transaction. Required for the | ||||||||||||||||||
note | string <= 2000 characters A note associated with an external cash or check payment. | ||||||||||||||||||
payment_date | string <ppaas_date_notime_v2> (date_no_time) = 10 characters ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|... The stand-alone date, in Internet date and time format. To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard | ||||||||||||||||||
method required | string (payment_method) The payment mode or method through which the invoicer can accept the payment.
| ||||||||||||||||||
object (Money) The currency and amount for a financial transaction, such as a balance or payment due. | |||||||||||||||||||
object (contact_information) The contact information of the user. Includes name and address. |
A successful request returns the HTTP 200 Created
status code and a reference to the recorded payment.
{- "method": "BANK_TRANSFER",
- "payment_date": "2018-05-01",
- "amount": {
- "currency_code": "USD",
- "value": "10.00"
}
}
{- "payment_id": "EXTR-86F38350LX4353815"
}
Generates the next invoice number that is available to the merchant. The next invoice number uses the prefix and suffix from the last invoice number and increments the number by one. For example, the next invoice number after INVOICE-1234
is INVOICE-1235
.
A successful request returns the HTTP 200 OK
status code and a JSON response body that shows the next invoice number.
{ }
{- "invoice_number": "ee0044"
}
Deletes an external refund, by invoice ID and transaction ID.
A successful request returns the HTTP 204 No Content
status code with no JSON response body.
{ }
Shows details for an invoice, by ID.
A successful request returns the HTTP 200 OK
status code and a JSON response body that shows invoice details.
{- "id": "INV2-Z56S-5LLA-Q52L-CPZ5",
- "status": "DRAFT",
- "detail": {
- "invoice_number": "#123",
- "reference": "deal-ref",
- "invoice_date": "2018-11-12",
- "currency_code": "USD",
- "note": "Thank you for your business.",
- "term": "No refunds after 30 days.",
- "memo": "This is a long contract",
- "payment_term": {
- "term_type": "NET_10",
- "due_date": "2018-11-22"
}, - "metadata": {
- "create_time": "2018-11-12T08:00:20Z",
}
}, - "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": "merchant@example.com",
- "phones": [
- {
- "country_code": "001",
- "national_number": "4085551234",
- "phone_type": "MOBILE"
}
], - "tax_id": "ABcNkWSfb5ICTt73nD3QON1fnnpgNKBy-Jb5SeuGj185MNNw6g",
- "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": "bill-me@example.com",
- "phones": [
- {
- "country_code": "001",
- "national_number": "4884551234",
- "phone_type": "HOME"
}
], - "additional_info_value": "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"
}
}
}
], - "items": [
- {
- "name": "Yoga Mat",
- "description": "Elastic mat to practice yoga.",
- "quantity": "1",
- "unit_amount": {
- "currency_code": "USD",
- "value": "50.00"
}, - "tax": {
- "name": "Sales Tax",
- "percent": "7.25",
- "tax_note": "Reduced tax rate",
- "amount": {
- "currency_code": "USD",
- "value": "3.27"
}
}, - "discount": {
- "percent": "5",
- "amount": {
- "currency_code": "USD",
- "value": "2.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",
- "amount": {
- "currency_code": "USD",
- "value": "0.34"
}
}, - "discount": {
- "amount": {
- "currency_code": "USD",
- "value": "5.00"
}
}, - "unit_of_measure": "QUANTITY"
}
], - "configuration": {
- "partial_payment": {
- "allow_partial_payment": true,
- "minimum_amount_due": {
- "currency_code": "USD",
- "value": "20.00"
}
}, - "allow_tip": true,
- "tax_calculated_after_discount": true,
- "tax_inclusive": false,
- "template_id": "TEMP-19V05281TU309413B"
}, - "amount": {
- "currency_code": "USD",
- "value": "74.21",
- "breakdown": {
- "item_total": {
- "currency_code": "USD",
- "value": "60.00"
}, - "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",
- "amount": {
- "currency_code": "USD",
- "value": "0.73"
}
}
}, - "discount": {
- "item_discount": {
- "currency_code": "USD",
- "value": "-7.50"
}, - "invoice_discount": {
- "percent": "5",
- "amount": {
- "currency_code": "USD",
- "value": "-2.63"
}
}
}, - "tax_total": {
- "currency_code": "USD",
- "value": "4.34"
}
}
}, - "due_amount": {
- "currency_code": "USD",
- "value": "74.21"
}, - "links": [
- {
- "rel": "self",
- "method": "GET"
}, - {
- "rel": "send",
- "method": "POST"
}, - {
- "rel": "replace",
- "method": "PUT"
}, - {
- "rel": "delete",
- "method": "DELETE"
}, - {
- "rel": "record-payment",
- "method": "POST"
}, - {
- "rel": "qr-code",
- "method": "POST"
}
]
}
Fully updates an invoice, by ID. In the JSON request body, include a complete invoice
object. This call does not support partial updates.
Notes:.
- API caller can change/modify recipient only 2 times in 72 hours.
A representation of changes to make in the invoice.
A successful request returns the HTTP 200 OK
status code. A JSON response body that shows invoice details is returned if you set prefer=return=representation
.
{- "id": "INV2-C82X-JNN9-Y6S5-CNXW",
- "status": "DRAFT",
- "detail": {
- "invoice_number": "#123",
- "reference": "deal-refernce-update",
- "invoice_date": "2018-11-12",
- "currency_code": "USD",
- "note": "Thank you for your business.",
- "term": "No refunds after 30 days.",
- "memo": "This is a long contract",
- "payment_term": {
- "term_type": "NET_10",
- "due_date": "2018-11-22"
}
}, - "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": "merchant@example.com",
- "phones": [
- {
- "country_code": "001",
- "national_number": "4085551234",
- "phone_type": "MOBILE"
}
], - "website": "www.test.com",
- "tax_id": "ABcNkWSfb5ICTt73nD3QON1fnnpgNKBy-Jb5SeuGj185MNNw6g",
- "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": "bill-me@example.com",
- "phones": [
- {
- "country_code": "001",
- "national_number": "4884551234",
- "phone_type": "HOME"
}
], - "additional_info_value": "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"
}
}
}
], - "items": [
- {
- "name": "Yoga Mat",
- "description": "Elastic mat to practice yoga.",
- "quantity": "1",
- "unit_amount": {
- "currency_code": "USD",
- "value": "50.00"
}, - "tax": {
- "name": "Sales Tax",
- "percent": "7.25",
- "tax_note": "Reduced tax rate",
- "amount": {
- "currency_code": "USD",
- "value": "3.27"
}
}, - "discount": {
- "percent": "5",
- "amount": {
- "currency_code": "USD",
- "value": "2.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",
- "amount": {
- "currency_code": "USD",
- "value": "0.34"
}
}, - "discount": {
- "amount": {
- "currency_code": "USD",
- "value": "5.00"
}
}, - "unit_of_measure": "QUANTITY"
}
], - "configuration": {
- "partial_payment": {
- "allow_partial_payment": true,
- "minimum_amount_due": {
- "currency_code": "USD",
- "value": "20.00"
}
}, - "allow_tip": true,
- "tax_calculated_after_discount": true,
- "tax_inclusive": false,
- "template_id": "TEMP-19V05281TU309413B"
}, - "amount": {
- "currency_code": "USD",
- "value": "74.21",
- "breakdown": {
- "item_total": {
- "currency_code": "USD",
- "value": "60.00"
}, - "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",
- "amount": {
- "currency_code": "USD",
- "value": "0.73"
}
}
}, - "discount": {
- "item_discount": {
- "currency_code": "USD",
- "value": "-7.50"
}, - "invoice_discount": {
- "percent": "5",
- "amount": {
- "currency_code": "USD",
- "value": "-2.63"
}
}
}, - "tax_total": {
- "currency_code": "USD",
- "value": "4.34"
}
}
}
}
{- "id": "INV2-C82X-JNN9-Y6S5-CNXW",
- "status": "DRAFT",
- "detail": {
- "invoice_number": "#123",
- "reference": "deal-refernce-update",
- "invoice_date": "2018-11-12",
- "currency_code": "USD",
- "note": "Thank you for your business.",
- "term": "No refunds after 30 days.",
- "memo": "This is a long contract",
- "payment_term": {
- "term_type": "NET_10",
- "due_date": "2018-11-22"
}, - "metadata": {
- "create_time": "2018-11-12T08:00:20Z",
}
}, - "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": "merchant@example.com",
- "phones": [
- {
- "country_code": "001",
- "national_number": "4085551234",
- "phone_type": "MOBILE"
}
], - "tax_id": "ABcNkWSfb5ICTt73nD3QON1fnnpgNKBy-Jb5SeuGj185MNNw6g",
- "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": "bill-me@example.com",
- "phones": [
- {
- "country_code": "001",
- "national_number": "4884551234",
- "phone_type": "HOME"
}
], - "additional_info_value": "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"
}
}
}
], - "items": [
- {
- "name": "Yoga Mat",
- "description": "Elastic mat to practice yoga.",
- "quantity": "1",
- "unit_amount": {
- "currency_code": "USD",
- "value": "50.00"
}, - "tax": {
- "name": "Sales Tax",
- "percent": "7.25",
- "amount": {
- "currency_code": "USD",
- "value": "3.27"
}
}, - "discount": {
- "percent": "5",
- "amount": {
- "currency_code": "USD",
- "value": "2.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",
- "amount": {
- "currency_code": "USD",
- "value": "0.34"
}
}, - "discount": {
- "amount": {
- "currency_code": "USD",
- "value": "5.00"
}
}, - "unit_of_measure": "QUANTITY"
}
], - "configuration": {
- "partial_payment": {
- "allow_partial_payment": true,
- "minimum_amount_due": {
- "currency_code": "USD",
- "value": "20.00"
}
}, - "allow_tip": true,
- "tax_calculated_after_discount": true,
- "tax_inclusive": false,
- "template_id": "TEMP-19V05281TU309413B"
}, - "amount": {
- "currency_code": "USD",
- "value": "74.21",
- "breakdown": {
- "item_total": {
- "currency_code": "USD",
- "value": "60.00"
}, - "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",
- "amount": {
- "currency_code": "USD",
- "value": "0.73"
}
}
}, - "discount": {
- "item_discount": {
- "currency_code": "USD",
- "value": "-7.50"
}, - "invoice_discount": {
- "percent": "5",
- "amount": {
- "currency_code": "USD",
- "value": "-2.63"
}
}
}, - "tax_total": {
- "currency_code": "USD",
- "value": "4.34"
}
}
}, - "due_amount": {
- "currency_code": "USD",
- "value": "74.21"
}, - "links": [
- {
- "rel": "self",
- "method": "GET"
}, - {
- "rel": "send",
- "method": "POST"
}, - {
- "rel": "replace",
- "method": "PUT"
}, - {
- "rel": "delete",
- "method": "DELETE"
}
]
}
Deletes a draft or scheduled invoice, by ID. Deletes invoices in the draft or scheduled state only. For invoices that have already been sent, you can cancel the invoice. After you delete a draft or scheduled invoice, you can no longer use it or show its details. However, you can reuse its invoice number.
A successful request returns the HTTP 204 No Content
status code with no JSON response body.
{ }
Creates a draft invoice. To move the invoice from a draft to payable state, you must send the invoice.
In the JSON request body, include invoice details including merchant information. The invoice
object must include an items
array.
Note: The merchant that you specify in an invoice must have a PayPal account in good standing..
The invoice details which includes all information of the invoice like items, billing information.
OK
{- "detail": {
- "invoice_number": "#123",
- "reference": "deal-ref",
- "invoice_date": "2018-11-12",
- "currency_code": "USD",
- "note": "Thank you for your business.",
- "term": "No refunds after 30 days.",
- "memo": "This is a long contract",
- "payment_term": {
- "term_type": "NET_10",
- "due_date": "2018-11-22"
}
}, - "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": "merchant@example.com",
- "phones": [
- {
- "country_code": "001",
- "national_number": "4085551234",
- "phone_type": "MOBILE"
}
], - "website": "www.test.com",
- "tax_id": "ABcNkWSfb5ICTt73nD3QON1fnnpgNKBy- Jb5SeuGj185MNNw6g",
- "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": "bill-me@example.com",
- "phones": [
- {
- "country_code": "001",
- "national_number": "4884551234",
- "phone_type": "HOME"
}
], - "additional_info_value": "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"
}
}
}
], - "items": [
- {
- "name": "Yoga Mat",
- "description": "Elastic mat to practice yoga.",
- "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",
- "tax_note": "Reduced tax rate"
}, - "discount": {
- "amount": {
- "currency_code": "USD",
- "value": "5.00"
}
}, - "unit_of_measure": "QUANTITY"
}
], - "configuration": {
- "partial_payment": {
- "allow_partial_payment": true,
- "minimum_amount_due": {
- "currency_code": "USD",
- "value": "20.00"
}
}, - "allow_tip": true,
- "tax_calculated_after_discount": true,
- "tax_inclusive": false,
- "template_id": "TEMP-19V05281TU309413B"
}, - "amount": {
- "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"
}
}
}
}
}
{- "id": "INV2-Z56S-5LLA-Q52L-CPZ5",
- "status": "DRAFT",
- "detail": {
- "invoice_number": "#123",
- "reference": "deal-ref",
- "invoice_date": "2018-11-12",
- "currency_code": "USD",
- "note": "Thank you for your business.",
- "term": "No refunds after 30 days.",
- "memo": "This is a long contract",
- "payment_term": {
- "term_type": "NET_10",
- "due_date": "2018-11-22"
}, - "metadata": {
- "create_time": "2018-11-12T08:00:20Z",
}
}, - "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": "merchant@example.com",
- "phones": [
- {
- "country_code": "001",
- "national_number": "4085551234",
- "phone_type": "MOBILE"
}
], - "tax_id": "ABcNkWSfb5ICTt73nD3QON1fnnpgNKBy-Jb5SeuGj185MNNw6g",
- "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": "bill-me@example.com",
- "phones": [
- {
- "country_code": "001",
- "national_number": "4884551234",
- "phone_type": "HOME"
}
], - "additional_info_value": "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"
}
}
}
], - "items": [
- {
- "name": "Yoga Mat",
- "description": "Elastic mat to practice yoga.",
- "quantity": "1",
- "unit_amount": {
- "currency_code": "USD",
- "value": "50.00"
}, - "tax": {
- "name": "Sales Tax",
- "percent": "7.25",
- "amount": {
- "currency_code": "USD",
- "value": "3.27",
- "tax_note": "Reduced tax rate"
}
}, - "discount": {
- "percent": "5",
- "amount": {
- "currency_code": "USD",
- "value": "2.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",
- "amount": {
- "currency_code": "USD",
- "value": "0.34",
- "tax_note": "Reduced tax rate"
}
}, - "discount": {
- "amount": {
- "currency_code": "USD",
- "value": "5.00"
}
}, - "unit_of_measure": "QUANTITY"
}
], - "configuration": {
- "partial_payment": {
- "allow_partial_payment": true,
- "minimum_amount_due": {
- "currency_code": "USD",
- "value": "20.00"
}
}, - "allow_tip": true,
- "tax_calculated_after_discount": true,
- "tax_inclusive": false,
- "template_id": "TEMP-19V05281TU309413B"
}, - "amount": {
- "currency_code": "USD",
- "value": "74.21",
- "breakdown": {
- "item_total": {
- "currency_code": "USD",
- "value": "60.00"
}, - "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",
- "amount": {
- "currency_code": "USD",
- "value": "0.73",
- "tax_note": "Reduced tax rate"
}
}
}, - "discount": {
- "item_discount": {
- "currency_code": "USD",
- "value": "-7.50"
}, - "invoice_discount": {
- "percent": "5",
- "amount": {
- "currency_code": "USD",
- "value": "-2.63"
}
}
}, - "tax_total": {
- "currency_code": "USD",
- "value": "4.34"
}
}
}, - "due_amount": {
- "currency_code": "USD",
- "value": "74.21"
}, - "links": [
- {
- "rel": "self",
- "method": "GET"
}, - {
- "rel": "send",
- "method": "POST"
}, - {
- "rel": "replace",
- "method": "PUT"
}, - {
- "rel": "delete",
- "method": "DELETE"
}, - {
- "rel": "record-payment",
- "method": "POST"
}, - {
- "rel": "qr-code",
- "method": "POST"
}
]
}
Lists invoices. To filter the invoices that appear in the response, you can specify one or more optional query parameters.
A successful request returns the HTTP 200 OK
status code and a JSON response body that lists invoices with details.
{ }
{- "total_items": 2,
- "total_pages": 1,
- "items": [
- {
- "id": "INV2-Z56S-5LLA-Q52L-CPZ5",
- "status": "DRAFT",
- "detail": {
- "invoice_number": "#123",
- "reference": "deal-ref",
- "invoice_date": "2018-11-12",
- "currency_code": "USD",
- "note": "Thank you for your business.",
- "term": "No refunds after 30 days.",
- "memo": "This is a long contract",
- "payment_term": {
- "term_type": "NET_10",
- "due_date": "2018-11-22"
}, - "metadata": {
- "create_time": "2018-11-12T08:00:20Z",
}
}, - "invoicer": {
- "email_address": "merchant@example.com"
}, - "primary_recipients": [
- {
- "billing_info": {
- "email_address": "bill-me@example.com"
}
}
], - "amount": {
- "currency_code": "USD",
- "value": "74.21"
}, - "links": [
- {
- "rel": "self",
- "method": "GET"
}, - {
- "rel": "send",
- "method": "POST"
}, - {
- "rel": "replace",
- "method": "PUT"
}, - {
- "rel": "delete",
- "method": "DELETE"
}
]
}, - {
- "id": "INV2-NP6M-C9A8-ZBDA-3TEX",
- "status": "SCHEDULED",
- "detail": {
- "invoice_number": "0001",
- "invoice_date": "2018-05-14",
- "currency_code": "USD",
- "payment_term": {
- "due_date": "2018-05-15"
}, - "metadata": {
- "create_time": "2018-05-15T17:24:12Z"
}
}, - "invoicer": {
- "email_address": "merchant@example.com"
}, - "primary_recipients": [
- {
- "billing_info": {
- "email_address": "recipient@example.com"
}
}
], - "amount": {
- "currency_code": "USD",
- "value": "32.00"
}, - "links": [
- {
- "rel": "self",
- "method": "GET"
}, - {
- "rel": "replace",
- "method": "PUT"
}, - {
- "rel": "delete",
- "method": "DELETE"
}, - {
- "rel": "record-payment",
- "method": "POST"
}
]
}
], - "links": [
- {
- "rel": "self",
- "method": "GET"
}
]
}
Shows details for a template, by ID.
A successful request returns the HTTP 200 OK
status code and a JSON response body that shows template details.
{- "id": "TEMP-19V05281TU309413B",
- "name": "reference-temp",
- "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",
- "currency_code": "USD",
- "note": "Thank you for your business.",
- "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",
}
], - "payment_term": {
- "term_type": "NET_10"
}, - "metadata": {
- "create_time": "2018-12-03T03:38:46z"
}
}, - "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": "merchant@example.com",
- "phones": [
- {
- "country_code": "001",
- "national_number": "4085551234",
- "phone_type": "MOBILE"
}
], - "website": "www.test.com",
- "tax_id": "ABcNkWSfb5ICTt73nD3QON1fnnpgNKBy-Jb5SeuGj185MNNw6g",
- "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": "bill-me@example.com",
- "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": [
- "inform-me@example.com"
], - "items": [
- {
- "id": "ITEM-9R873787D1610780X",
- "name": "Yoga Mat",
- "description": "new watch",
- "quantity": "1",
- "unit_amount": {
- "currency_code": "USD",
- "value": "50.00"
}, - "tax": {
- "id": "TAX-9R873787D1610780X",
- "name": "Sales Tax",
- "percent": "7.25",
- "tax_note": "Reduced tax rate",
- "amount": {
- "currency_code": "USD",
- "value": "3.27"
}
}, - "discount": {
- "percent": "5",
- "amount": {
- "currency_code": "USD",
- "value": "2.5"
}
}, - "unit_of_measure": "QUANTITY"
}, - {
- "id": "ITEM-4XD34145EH4061035",
- "name": "Yoga T Shirt",
- "quantity": "1",
- "unit_amount": {
- "currency_code": "USD",
- "value": "10.00"
}, - "tax": {
- "id": "TAX-4XD34145EH4061035",
- "name": "Sales Tax",
- "percent": "7.25",
- "amount": {
- "currency_code": "USD",
- "value": "0.34"
}
}, - "discount": {
- "amount": {
- "currency_code": "USD",
- "value": "5.00"
}
}, - "unit_of_measure": "QUANTITY"
}
], - "amount": {
- "currency_code": "USD",
- "value": "74.21",
- "breakdown": {
- "item_total": {
- "currency_code": "USD",
- "value": "60.00"
}, - "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",
- "amount": {
- "currency_code": "USD",
- "value": "0.73"
}
}
}, - "discount": {
- "item_discount": {
- "currency_code": "USD",
- "value": "-7.50"
}, - "invoice_discount": {
- "percent": "5",
- "amount": {
- "currency_code": "USD",
- "value": "-2.63"
}
}
}, - "tax_total": {
- "currency_code": "USD",
- "value": "4.34"
}
}
}
}, - "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,
- "links": [
- {
- "rel": "self",
- "method": "GET"
}, - {
- "rel": "delete",
- "method": "DELETE"
}, - {
- "rel": "replace",
- "method": "PUT"
}
]
}
Fully updates a template, by ID. In the JSON request body, include a complete template
object. This call does not support partial updates.
A representation of changes to make in the template.
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
.
{- "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-reference-value",
- "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",
}
], - "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": "merchant@example.com",
- "phones": [
- {
- "country_code": "001",
- "national_number": "4085551234",
- "phone_type": "MOBILE"
}
], - "website": "www.test.com",
- "tax_id": "ABcNkWSfb5ICTt73nD3QON1fnnpgNKBy-Jb5SeuGj185MNNw6g",
- "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": "bill-me@example.com",
- "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": [
- "inform-me@example.com"
], - "items": [
- {
- "name": "Yoga Mat",
- "description": "new watch",
- "quantity": "1",
- "unit_amount": {
- "currency_code": "USD",
- "value": "50.00"
}, - "tax": {
- "name": "Sales Tax",
- "percent": "7.25",
- "tax_note": "Reduced tax rate"
}, - "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
}
{- "id": "TEMP-19V05281TU309413B",
- "name": "reference-temp",
- "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-reference-value",
- "currency_code": "USD",
- "note": "Thank you for your business.",
- "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",
}
], - "payment_term": {
- "term_type": "NET_10"
}, - "metadata": {
- "create_time": "2018-12-03T03:38:46z"
}
}, - "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": "merchant@example.com",
- "phones": [
- {
- "country_code": "001",
- "national_number": "4085551234",
- "phone_type": "MOBILE"
}
], - "website": "www.test.com",
- "tax_id": "ABcNkWSfb5ICTt73nD3QON1fnnpgNKBy-Jb5SeuGj185MNNw6g",
- "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": "bill-me@example.com",
- "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": [
- "inform-me@example.com"
], - "items": [
- {
- "id": "ITEM-9R873787D1610780X",
- "name": "Yoga Mat",
- "description": "new watch",
- "quantity": "1",
- "unit_amount": {
- "currency_code": "USD",
- "value": "50.00"
}, - "tax": {
- "id": "TAX-9R873787D1610780X",
- "name": "Sales Tax",
- "percent": "7.25",
- "amount": {
- "currency_code": "USD",
- "value": "3.27"
}
}, - "discount": {
- "percent": "5",
- "amount": {
- "currency_code": "USD",
- "value": "2.5"
}
}, - "unit_of_measure": "QUANTITY"
}, - {
- "id": "ITEM-4XD34145EH4061035",
- "name": "Yoga T Shirt",
- "quantity": "1",
- "unit_amount": {
- "currency_code": "USD",
- "value": "10.00"
}, - "tax": {
- "id": "TAX-4XD34145EH4061035",