On this page
No Headings
Last updated: June 26, 2026
The Invoicing REST API supports search, refunds, templates, reminders, and more.
This page describes a few ways you can customize an invoice. Refer to the Invoicing API reference to see everything you can do with the Invoicing API.
You can also make test calls to the Invoicing API with the PayPal API Executor.
When a buyer uses a mobile device to scan the QR code, they're redirected to the PayPal mobile payment flow to view the invoice and pay online with PayPal or another payment type.
To generate a QR code, first create and send an invoice.
If you don't want PayPal to email the invoice notification to your buyer when you create it, because you want to send a QR code, set send_to_recipient in the Send invoice request to false. This parameter updates the invoice status to UNPAID and does not send the email notification.
Copy the invoice ID returned when you create the invoice.
To create a QR code for your invoice, copy the following code and modify it.
API endpoint used: Generate QR code
curl -v -X POST https://api-m.sandbox.paypal.com/v2/invoicing/invoices/{INVOICE-ID}/generate-qr-code \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ACCESS-TOKEN' \
-H 'PayPal-Partner-Attribution-Id: BN-CODE' \
-H 'PayPal-Auth-Assertion: AUTH-ASSERTION-JWT'After you copy the code in the sample request, modify the following:
ACCESS-TOKEN to your access token.BN-CODE to your PayPal Attribution ID to receive revenue attribution. To find your BN code, see Code and Credential Reference.AUTH-ASSERTION-JWT to your PayPal-Auth-Assertion token.INVOICE-ID to the invoice ID that was returned when you created the invoice.A successful response results in:
200 OK.To test your QR code, complete these steps:
To include a field that enables the customer to add a tip as a flat amount or percent of the total due, set the allow_tip parameter to true.
Note: If the customer adds a tip, it shows up on the invoice and in the payment notification email.
To enable the customer to make a partial payment, set the allow_partial_payment parameter to true.
When you enable a partial payment, you can also set the minimum_amount_due parameter to the minimum amount due value.
A webhook is an HTTP callback that receives notification messages for events. See configure webhooks for more details.
PayPal APIs use webhooks for event notification. Most invoice-related actions, including invoice payments, trigger invoicing webhook events:
INVOICING.INVOICE.CANCELLED | A merchant or customer cancels an invoice. | Cancel invoice |
|---|---|---|
INVOICING.INVOICE.CREATED | An invoice is created. | Create draft invoice |
INVOICING.INVOICE.PAID | An invoice is paid, partially paid, or payment is made and is pending. | Mark invoice as paid |
INVOICING.INVOICE.REFUNDED | An invoice is refunded or partially refunded. | Mark invoice as refunded |
INVOICING.INVOICE.SCHEDULED | An invoice is scheduled. | Send invoice |
INVOICING.INVOICE.UPDATED | An invoice is updated. | Update invoice |