Skip to main content
POST
/
v2
/
invoicing
/
invoices
/
{invoice_id}
/
generate-qr-code
Generate QR code
curl --request POST \
  --url https://api-m.sandbox.paypal.com/v2/invoicing/invoices/{invoice_id}/generate-qr-code \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "width": 400,
  "height": 400
}
'
{
  "name": "INVALID_REQUEST",
  "message": "Request is not well-formed, syntactically incorrect, or violates schema.",
  "details": [
    {
      "issue": "INVALID_INTEGER_MAX_VALUE",
      "field": "<string>",
      "value": "<string>",
      "location": "body",
      "description": "Value exceeds max value."
    }
  ],
  "debug_id": "<string>",
  "links": [
    {
      "href": "<string>",
      "rel": "<string>",
      "method": "GET"
    }
  ]
}

Authorizations

Authorization
string
header
required

Oauth 2.0 authentication

Path Parameters

invoice_id
string
required

The ID of the draft invoice to delete.

Maximum string length: 2147483647

Body

application/json

Optional configuration parameters to adjust QR code width, height and the encoded URL.

The configuration for a QR code.

width
integer
default:500

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

Required range: 150 <= x <= 500
height
integer
default:500

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

Required range: 150 <= x <= 500
action
string
default:pay

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

Maximum string length: 7

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.