Invoices

Use the /invoices resource to create, update, and send invoices and invoice reminders. To manage invoices, you can also list invoices, show details for invoices, delete draft invoices, and cancel sent invoices. You can also record payments for invoices to mark them as fully or partially paid, or record refunds for invoices to mark them as fully or partially refunded. You can create QR codes for invoices that can be scanned, viewed, and paid by a mobile phone.

The invoice object

Attributes

The invoice details which includes all information of the invoice like items, billing information.

idstring · max: 30Read-onlyOptional

The ID of the invoice.

parent_idstring · max: 30Read-onlyOptional

The parent ID to an invoice that defines the group invoice to which the invoice is related.

statusstring · enumRead-onlyOptional

The status of the invoice.

Possible values:
additional_recipientsstring · ppaas_common_email_address_v2[] · max: 100Optional

An array of one or more CC: emails to which notifications are sent. If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.Note: Valid values are email addresses in the additional_recipients value associated with the invoice.

The invoice object

List invoices

get
/v2/invoicing/invoices

Lists invoices. To filter the invoices that appear in the response, you can specify one or more optional query parameters.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : For Reading the invoice details.
Authorizations
OAuth2clientCredentialsRequired

Oauth 2.0 authentication

Token URL:
Query parameters
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
total_requiredbooleanOptional

Indicates whether the to show total_pages and total_items in the response.

Default: false
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)$
Responses
chevron-right
200

A successful request returns the HTTP 200 OK status code and a JSON response body that lists invoices with details.

get
/v2/invoicing/invoices

Create draft invoice

post
/v2/invoicing/invoices

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.

.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : For managing (Create, Update, Delete) invoice.
Authorizations
OAuth2clientCredentialsRequired

Oauth 2.0 authentication

Token URL:
Body

The invoice details which includes all information of the invoice like items, billing information.

idstring · max: 30Read-onlyOptional

The ID of the invoice.

parent_idstring · max: 30Read-onlyOptional

The parent ID to an invoice that defines the group invoice to which the invoice is related.

statusstring · enumRead-onlyOptional

The status of the invoice.

Possible values:
additional_recipientsstring · ppaas_common_email_address_v2[] · max: 100Optional

An array of one or more CC: emails to which notifications are sent. If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.Note: Valid values are email addresses in the additional_recipients value associated with the invoice.

Responses
post
/v2/invoicing/invoices

Send invoice

post
/v2/invoicing/invoices/{invoice_id}/send

Sends or schedules an invoice, by ID, to be sent to a customer. The action depends on the invoice issue date:

  • If the invoice issue date is current or in the past, sends the invoice immediately.

  • If the invoice issue date is in the future, schedules the invoice to be sent on that date.

To suppress the merchant's email notification, set the send_to_invoicer body parameter to false. To send the invoice through a share link and not through PayPal, set the send_to_recipient parameter to false in the notification object. The send_to_recipient parameter does not apply to a future issue date because the invoice is scheduled to be sent through PayPal on that date.

Notes:

  • After you send an invoice, resending it has no effect.

  • To send a notification for updates, update the invoice and set the send_to_recipient body parameter to true.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : For managing (Create, Update, Delete) invoice.
Authorizations
OAuth2clientCredentialsRequired

Oauth 2.0 authentication

Token URL:
Path parameters
invoice_idstringRequired

The ID of the draft invoice to delete.

Body

The email or SMS notification to send to the invoicer or payer on sending an invoice.

subjectstring · max: 4000Optional

The subject of the email that is sent as a notification to the recipient.

notestring · max: 4000Optional

A note to the payer.

send_to_invoicerbooleanOptional

Indicates whether to send a copy of the email to the merchant.

Default: false
send_to_recipientbooleanOptional

Indicates whether to send a copy of the email to the recipient.

Default: true
additional_recipientsstring · ppaas_common_email_address_v2[] · max: 100Optional

An array of one or more CC: emails to which notifications are sent. If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.Note: Valid values are email addresses in the additional_recipients value associated with the invoice.

Responses
chevron-right
200

A successful request returns the HTTP 200 OK when the invoice issue date is current date.

post
/v2/invoicing/invoices/{invoice_id}/send

Send invoice reminder

post
/v2/invoicing/invoices/{invoice_id}/remind

Sends a reminder to the payer about an invoice, by ID. In the JSON request body, include a notification object that defines the subject of the reminder and other details.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : For managing (Create, Update, Delete) invoice.
Authorizations
OAuth2clientCredentialsRequired

Oauth 2.0 authentication

Token URL:
Path parameters
invoice_idstringRequired

The ID of the draft invoice to delete.

Body

The email or SMS notification to send to the invoicer or payer on sending an invoice.

subjectstring · max: 4000Optional

The subject of the email that is sent as a notification to the recipient.

notestring · max: 4000Optional

A note to the payer.

send_to_invoicerbooleanOptional

Indicates whether to send a copy of the email to the merchant.

Default: false
send_to_recipientbooleanOptional

Indicates whether to send a copy of the email to the recipient.

Default: true
additional_recipientsstring · ppaas_common_email_address_v2[] · max: 100Optional

An array of one or more CC: emails to which notifications are sent. If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.Note: Valid values are email addresses in the additional_recipients value associated with the invoice.

Responses
post
/v2/invoicing/invoices/{invoice_id}/remind

No content

Cancel sent invoice

post
/v2/invoicing/invoices/{invoice_id}/cancel

Cancels a sent invoice, by ID, and, optionally, sends a notification about the cancellation to the payer, merchant, and CC: emails.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : For managing (Create, Update, Delete) invoice.
Authorizations
OAuth2clientCredentialsRequired

Oauth 2.0 authentication

Token URL:
Path parameters
invoice_idstringRequired

The ID of the draft invoice to delete.

Body

The email or SMS notification to send to the invoicer or payer on sending an invoice.

subjectstring · max: 4000Optional

The subject of the email that is sent as a notification to the recipient.

notestring · max: 4000Optional

A note to the payer.

send_to_invoicerbooleanOptional

Indicates whether to send a copy of the email to the merchant.

Default: false
send_to_recipientbooleanOptional

Indicates whether to send a copy of the email to the recipient.

Default: true
additional_recipientsstring · ppaas_common_email_address_v2[] · max: 100Optional

An array of one or more CC: emails to which notifications are sent. If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.Note: Valid values are email addresses in the additional_recipients value associated with the invoice.

Responses
post
/v2/invoicing/invoices/{invoice_id}/cancel

No content

Record payment for invoice

post
/v2/invoicing/invoices/{invoice_id}/payments

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.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : For managing (Create, Update, Delete) invoice.
Authorizations
OAuth2clientCredentialsRequired

Oauth 2.0 authentication

Token URL:
Path parameters
invoice_idstringRequired

The ID of the draft invoice to delete.

Body

The payment details of the invoice. Includes payment type, method, date, discount, and transaction type.

typestring · enumRead-onlyOptional

The payment type in an invoicing flow which can be PayPal or an external cash or check payment.

Possible values:
payment_idstring · max: 22Optional

The ID for a PayPal payment transaction. Required for the PAYPAL payment type.

payment_datestring · ppaas_date_notime_v2 · min: 10 · max: 10Optional

The date when the invoice was paid, in Internet date and time format. For example, yyyy-MM-dd z.

Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$
methodstring · enumRequired

The payment mode or method through which the invoicer can accept the payment.

Possible values:
notestring · max: 2000Optional

A note associated with an external cash or check payment.

Responses
chevron-right
200

A successful request returns the HTTP 200 Created status code and a reference to the recorded payment.

post
/v2/invoicing/invoices/{invoice_id}/payments

Delete external payment

delete
/v2/invoicing/invoices/{invoice_id}/payments/{transaction_id}

Deletes an external payment, by invoice ID and transaction ID.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : For managing (Create, Update, Delete) invoice.
Authorizations
OAuth2clientCredentialsRequired

Oauth 2.0 authentication

Token URL:
Path parameters
invoice_idstringRequired

The ID of the draft invoice to delete.

transaction_idstringRequired

The ID of the external refund transaction to delete.

Responses
delete
/v2/invoicing/invoices/{invoice_id}/payments/{transaction_id}

No content

Record refund for invoice

post
/v2/invoicing/invoices/{invoice_id}/refunds

Records a refund for the invoice. If all payments are refunded, the invoice is marked as REFUNDED. Otherwise, the invoice is marked as PARTIALLY REFUNDED.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : For managing (Create, Update, Delete) invoice.
Authorizations
OAuth2clientCredentialsRequired

Oauth 2.0 authentication

Token URL:
Path parameters
invoice_idstringRequired

The ID of the draft invoice to delete.

Body

The refund details of the invoice. Includes the refund type, date, amount, and method.

typestring · enumRead-onlyOptional

The PayPal refund type. Indicates whether the refund was paid through PayPal or externally in the invoicing flow. The record refund method supports the EXTERNAL refund type. The PAYPAL refund type is supported for backward compatibility.

Possible values:
refund_idstring · max: 22Read-onlyOptional

The ID for a PayPal payment transaction. Required for the PAYPAL payment type.

refund_datestring · ppaas_date_notime_v2 · min: 10 · max: 10Optional

The date when the invoice was refunded, in Internet date format. For example, 2014-02-27.

Pattern: ^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$
methodstring · enumRequired

The payment mode or method through which the invoicer can accept the payments.

Possible values:
Responses
chevron-right
200

A successful request returns the HTTP 200 Created status code and a reference to the recorded refund.

post
/v2/invoicing/invoices/{invoice_id}/refunds

Delete external refund

delete
/v2/invoicing/invoices/{invoice_id}/refunds/{transaction_id}

Deletes an external refund, by invoice ID and transaction ID.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : For managing (Create, Update, Delete) invoice.
Authorizations
OAuth2clientCredentialsRequired

Oauth 2.0 authentication

Token URL:
Path parameters
invoice_idstringRequired

The ID of the draft invoice to delete.

transaction_idstringRequired

The ID of the external refund transaction to delete.

Responses
delete
/v2/invoicing/invoices/{invoice_id}/refunds/{transaction_id}

No content

Generate QR code

post
/v2/invoicing/invoices/{invoice_id}/generate-qr-code

Generates a QR code for an invoice, by ID. The QR code is a PNG image in Base64-encodedarrow-up-right format that corresponds to the invoice ID. You can generate a QR code for an invoice and add it to a paper or PDF invoice. When customers use their mobile devices to scan the QR code, they are redirected to the PayPal mobile payment flow where they can view the invoice and pay online with PayPal or a credit card. Before you get a QR code, you must create an invoice and send an invoice to move the invoice from a draft to payable state. Do not include an email address if you do not want the invoice emailed.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : For managing (Create, Update, Delete) invoice.
Authorizations
OAuth2clientCredentialsRequired

Oauth 2.0 authentication

Token URL:
Path parameters
invoice_idstringRequired

The ID of the draft invoice to delete.

Body

The configuration for a QR code.

widthinteger · min: 150 · max: 500Optional

The width, in pixels, of the QR code image. Value is from 150 to 500.

Default: 500
heightinteger · min: 150 · max: 500Optional

The height, in pixels, of the QR code image. Value is from 150 to 500.

Default: 500
actionstring · max: 7Optional

The type of URL for which to generate a QR code. Valid values are pay and details.

Default: payPattern: (?i)^(pay|details)$
Responses
chevron-right
200

A successful request returns the HTTP 200 OK status code and a JSON response body that shows the QR code as a PNG image.

No content

post
/v2/invoicing/invoices/{invoice_id}/generate-qr-code

No content

Generate invoice number

post
/v2/invoicing/generate-next-invoice-number

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.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : For managing (Create, Update, Delete) invoice.
Authorizations
OAuth2clientCredentialsRequired

Oauth 2.0 authentication

Token URL:
Responses
chevron-right
200

A successful request returns the HTTP 200 OK status code and a JSON response body that shows the next invoice number.

application/json
post
/v2/invoicing/generate-next-invoice-number

Show invoice details

get
/v2/invoicing/invoices/{invoice_id}

Shows details for an invoice, by ID.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : For Reading the invoice details.
Authorizations
OAuth2clientCredentialsRequired

Oauth 2.0 authentication

Token URL:
Path parameters
invoice_idstringRequired

The ID of the draft invoice to delete.

Responses
chevron-right
200

A successful request returns the HTTP 200 OK status code and a JSON response body that shows invoice details.

application/json
get
/v2/invoicing/invoices/{invoice_id}

Fully update invoice

put
/v2/invoicing/invoices/{invoice_id}

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

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : For managing (Create, Update, Delete) invoice.
Authorizations
OAuth2clientCredentialsRequired

Oauth 2.0 authentication

Token URL:
Path parameters
invoice_idstringRequired

The ID of the draft invoice to delete.

Query parameters
send_to_recipientbooleanOptional

Indicates whether to send the invoice update notification to the recipient.

Default: true
send_to_invoicerbooleanOptional

Indicates whether to send the invoice update notification to the merchant.

Default: true
Body

The invoice details which includes all information of the invoice like items, billing information.

idstring · max: 30Read-onlyOptional

The ID of the invoice.

parent_idstring · max: 30Read-onlyOptional

The parent ID to an invoice that defines the group invoice to which the invoice is related.

statusstring · enumRead-onlyOptional

The status of the invoice.

Possible values:
additional_recipientsstring · ppaas_common_email_address_v2[] · max: 100Optional

An array of one or more CC: emails to which notifications are sent. If you omit this parameter, a notification is sent to all CC: email addresses that are part of the invoice.Note: Valid values are email addresses in the additional_recipients value associated with the invoice.

Responses
chevron-right
200

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.

put
/v2/invoicing/invoices/{invoice_id}

Delete invoice

delete
/v2/invoicing/invoices/{invoice_id}

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.

chevron-right
lockRequired scopes
This endpoint requires the following scopes:
  • : For managing (Create, Update, Delete) invoice.
Authorizations
OAuth2clientCredentialsRequired

Oauth 2.0 authentication

Token URL:
Path parameters
invoice_idstringRequired

The ID of the draft invoice to delete.

Responses
delete
/v2/invoicing/invoices/{invoice_id}

No content

Last updated

Was this helpful?