Skip to main content
Explore key ways to apply the PayPal Invoicing API in your billing and payment collection flows. See how different configuration options map to common business scenarios so you can choose the pattern that best fits your integration. Select a use case that fits your integration: For more information, see the API reference.

Prerequisites

Use cases

See how to create invoices that address common scenarios and requirements.

Create a draft invoice with minimum required fields

This is a good starting point for merchants new to the API or developers testing an integration before adding complexity.
  1. Call POST /v2/invoicing/invoices with minimal required fields.
  2. Save the id from the 201 Created response.
  3. Call POST /v2/invoicing/invoices/{id}/send to deliver the invoice to the recipient.
Request
A successful call returns HTTP 201 Created. Save the returned id — you need it to send, update, or query the invoice.
Note: This creates a DRAFT invoice. The customer isn’t notified until you call POST /v2/invoicing/invoices/{id}/send.

Create a payment request linked to an external invoice

This pattern is ideal for merchants using a enterprise resource planning (ERP) or accounting platforms like NetSuite, QuickBooks, or Xero who want to collect payment through PayPal without recreating the invoice. Pass the external reference via invoice_number or detail.reference, and optionally attach the original invoice PDF.
  1. Create the invoice in your external system and capture the external invoice ID.
  2. Call POST /v2/invoicing/invoices to create a PayPal payment request, passing the external invoice ID and optionally attaching the original invoice PDF.
  3. Call POST /v2/invoicing/invoices/{id}/send to deliver the payment request to the customer.
  4. The customer receives a PayPal-hosted payment link by email and pays using PayPal or a card.
Request — External ID as invoice_number
Request — External ID as detail.reference
Notes
  • Use unit_of_measure: "AMOUNT" when billing a flat total with no quantity or hourly breakdown.
  • The attachments array accepts publicly accessible URLs. The PDF must be reachable by PayPal’s servers at the time you create the invoice.
  • detail.reference is visible to the customer on the PayPal invoice page. This is useful for cross-referencing the external invoice number.
  • detail.memo is a private field visible only to the invoicer. Use this for internal bookkeeping notes.

Create an hourly services invoice

Create an hourly services invoice with unit_of_measure: "HOURS", a client billing address, tip enabled, and partial payment configured for deposit workflows. This pattern works best for consultants, freelancers, photographers, and tradespeople billing for time and labor.
  1. Confirm the scope, hours, and rate for completed service work.
  2. Call POST /v2/invoicing/invoices with hourly or amount-based line items and the client’s billing address. Don’t include shipping_info.
  3. Call POST /v2/invoicing/invoices/{id}/send to deliver the invoice to the client.
  4. The client receives the invoice and pays with PayPal or card.
Request
Notes
  • unit_of_measure: "HOURS" renders quantity as hours and unit_amount as the hourly rate on both the invoice and the customer-facing payment page.
  • Omitting shipping_info from primary_recipients indicates a non-shippable, services-based invoice. Only billing_info is required.
  • allow_tip: true renders an optional tip or gratuity field on the PayPal-hosted payment page — no additional API calls required. Use this for service businesses where tipping is customary, such as trades, personal care, event services, or photography. Set allow_tip: false for B2B or formal invoicing contexts.
  • allow_partial_payment: true with a minimum_amount_due supports deposit-first or installment workflows common in service businesses.
  • Use unit_of_measure: "AMOUNT" instead of "HOURS" if you’re billing a flat project fee rather than hourly.
  • To record a payment received outside of PayPal, such as by check or bank transfer, use POST /v2/invoicing/invoices/{id}/payments.

Create an invoice for shippable goods

Create a physical goods invoice with quantity-based line items, separate billing and shipping addresses, a shipping charge, and shipping-specific tax. This pattern works best for e-commerce sellers, wholesalers, and distributors shipping physical products.
  1. Confirm the products, quantities, and shipping details from the order in your system.
  2. Call POST /v2/invoicing/invoices with quantity-based line items, a shipping address, and a shipping charge.
  3. Call POST /v2/invoicing/invoices/{id}/send to deliver the invoice.
  4. The buyer pays via PayPal or card; fulfill and ship the order.
Request
Notes
  • shipping_info and billing_info can have different addresses — PayPal renders both on the invoice and buyer confirmation page.
  • unit_of_measure: "QUANTITY" renders items as discrete units — the standard for physical goods.
  • Shipping tax is defined separately in amount.breakdown.shipping.tax and is independent from line item taxes.
  • detail.reference is customer-visible and useful for linking back to a purchase order or external order management reference.
  • To record a payment received outside of PayPal, such as by check or bank transfer, use POST /v2/invoicing/invoices/{id}/payments.

Create an invoice for digital goods

Create a digital goods invoice with unit and flat-rate line items and a billing address only — no shipping address or charges. This pattern works best for merchants selling software licenses, downloads, online courses, or other digital products.
  1. Capture the order details for the digital product purchase in your system.
  2. Call POST /v2/invoicing/invoices with digital line items and a billing address only. Don’t include shipping_info.
  3. Call POST /v2/invoicing/invoices/{id}/send to deliver the invoice.
  4. The customer pays via PayPal or card; handle digital delivery separately.
Request
Notes
  • Omitting shipping_info from primary_recipients signals that no physical delivery is required.
  • Use unit_of_measure: "QUANTITY" for seat or unit-based products. Use "AMOUNT" for flat-rate bundles or packages where itemized quantity doesn’t apply.
  • Digital goods tax rules vary significantly by jurisdiction — consult your tax advisor for the correct rate based on customer location.
  • Use detail.note to communicate delivery instructions or access information. This field is customer-visible on the PayPal invoice and payment confirmation page.

Create a mixed billing invoice

Create an invoice that combines all three unit_of_measure types — HOURS, QUANTITY, and AMOUNT — in a single request, with an invoice-level discount and partial payment configuration. This pattern works best for agencies, consultancies, and IT services firms billing for a mix of time, deliverables, and flat fees within the same engagement.
Note: This is an advanced use case that builds on the patterns above. If your business bills using only one line item type, refer to the appropriate use case.
  1. Confirm time logs, deliverable counts, and agreed flat fees for the completed project work.
  2. Call POST /v2/invoicing/invoices with mixed line items combining HOURS, QUANTITY, and AMOUNT types.
  3. Review the draft, then call POST /v2/invoicing/invoices/{id}/send.
  4. The client receives the invoice, reviews the itemized breakdown, and pays via PayPal or card.
Request
Notes
  • You can mix all three unit_of_measure types — HOURS, QUANTITY, and AMOUNT — freely within the same items array. Each line item renders according to its own type on the invoice.
  • Use quantity: "1" on AMOUNT lines for flat-rate fees. Don’t use a quantity greater than "1" on an AMOUNT line — the API multiplies the values, which is likely unintended for flat fees.
  • The invoice-level amount.breakdown.discount applies across the entire invoice total after individual line item subtotals are summed. Line item-level discounts apply before the invoice-level discount.
  • Set configuration.tax_calculated_after_discount: true to calculate tax on the post-discount amount — the correct behavior for most jurisdictions.
  • detail.memo is private and never shown to the client — use it for internal bookkeeping, account references, or sales attribution.

Invoicing API

The Invoicing REST API lets you create, update, send, and manage invoices programmatically from your backend systems.

Troubleshooting

Resolve common Invoicing API errors and integration issues.