Skip to main content
POST
/
v2
/
invoicing
/
generate-next-invoice-number
Generate invoice number
curl --request POST \
  --url https://api-m.sandbox.paypal.com/v2/invoicing/generate-next-invoice-number \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "fetch_id": "false"
}'
{
  "invoice_number": "<string>",
  "invoice_id": "<string>"
}

Authorizations

Authorization
string
header
required

Oauth 2.0 authentication

Body

application/json

Is the fetch type invoice number or id.

fetch_id
boolean
default:false

Optional to decide the number or ID.

Response

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

The invoice number.

invoice_number
string

The invoice number. If you omit this value, the default is the auto-incremented number from the last number.

Required string length: 1 - 25
invoice_id
string

Resource Id.

Required string length: 1 - 24
I