v1

latestOpenAPI 3.0.42026-07-2286621993.2 KB
invoices

Generate QR code

Generates a QR code for an invoice, by ID. The QR code is a PNG image in <a href="https://www.base64encode.org/">Base64-encoded</a> 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 <a href="#invoices_create">create an invoice</a> and <a href="#invoices_send">send an invoice</a> to move the invoice from a draft to payable state. Do not include an email address if you do not want the invoice emailed.

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

Path parameters

invoice_idstring required

The ID of the draft invoice to delete.

Request body

widthinteger

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

heightinteger

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

actionstring

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

Response

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