PayPal

Invoices

Use the Invoicing API to create, send, and manage invoices. You can also use the API or webhooks to track invoice payments. When you send an invoice to a…

Payments#openapi

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

Use the Invoicing API to create, send, and manage invoices. You can also use the API or webhooks to track invoice payments. When you send an invoice to a customer, the invoice moves from draft to payable state. PayPal then emails the customer a link to the invoice on the PayPal website. Customers with a PayPal account can log in and pay the invoice with PayPal. Alternatively, customers can pay as a guest with a debit card or credit card. For more information, see the Invoicing Overview and the Invoicing Integration Guide .

Endpoints 22

invoices

  • GETList invoices/v2/invoicing/invoices?page=1&page_size=20&total_required=false&fields=allLists invoices. To filter the invoices that appear in the response, you can specify one or more optional query parameters.
  • POSTCreate draft invoice/v2/invoicing/invoicesCreates a draft invoice. To move the invoice from a draft to payable state, you must <a href="#invoices_send">send the invoice</a>.<br/><br/>In the JSON…
  • POSTSend invoice/v2/invoicing/invoices/:invoice_id/sendSends or schedules an invoice, by ID, to be sent to a customer. The action depends on the invoice issue date:<ul><li>If the invoice issue date is current or…
  • POSTSend invoice reminder/v2/invoicing/invoices/:invoice_id/remindSends a reminder to the payer about an invoice, by ID. In the JSON request body, include a notification object that defines the subject of the reminder and…
  • POSTCancel sent invoice/v2/invoicing/invoices/:invoice_id/cancelCancels a sent invoice, by ID, and, optionally, sends a notification about the cancellation to the payer, merchant, and CC: emails.
  • POSTRecord payment for invoice/v2/invoicing/invoices/:invoice_id/paymentsRecords a payment for the invoice. If no payment is due, the invoice is marked as PAID. Otherwise, the invoice is marked as PARTIALLY PAID.
  • DELETEDelete external payment/v2/invoicing/invoices/:invoice_id/payments/:transaction_idDeletes an external payment, by invoice ID and transaction ID.
  • POSTRecord refund for invoice/v2/invoicing/invoices/:invoice_id/refundsRecords a refund for the invoice. If all payments are refunded, the invoice is marked as REFUNDED. Otherwise, the invoice is marked as PARTIALLY REFUNDED.
  • DELETEDelete external refund/v2/invoicing/invoices/:invoice_id/refunds/:transaction_idDeletes an external refund, by invoice ID and transaction ID.
  • POSTGenerate QR code/v2/invoicing/invoices/:invoice_id/generate-qr-codeGenerates 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…
  • POSTGenerate invoice number/v2/invoicing/generate-next-invoice-numberGenerates the next invoice number that is available to the merchant. The next invoice number uses the prefix and suffix from the last invoice number and…
  • GETShow invoice details/v2/invoicing/invoices/:invoice_idShows details for an invoice, by ID.
  • PUTFully update invoice/v2/invoicing/invoices/:invoice_id?send_to_recipient=true&send_to_invoicer=trueFully updates an invoice, by ID. In the JSON request body, include a complete invoice object. This call does not support partial updates.…
  • DELETEDelete invoice/v2/invoicing/invoices/:invoice_idDeletes a draft or scheduled invoice, by ID. Deletes invoices in the draft or scheduled state only. For invoices that have already been sent, you can <a…

search-invoices

  • POSTSearch for invoices/v2/invoicing/search-invoices?page=1&page_size=20&total_required=falseSearches for and lists invoices that match search criteria. If you pass multiple criteria, the response lists invoices that match all criteria.

templates

  • GETList templates/v2/invoicing/templates?fields=all&page=1&page_size=20Lists merchant-created templates with associated details. The associated details include the emails, addresses, and phone numbers from the user's PayPal…
  • POSTCreate template/v2/invoicing/templatesCreates an invoice template. You can use details from this template to create an invoice. You can create up to 50 templates.<blockquote><strong>Note:</strong>…
  • GETShow template details/v2/invoicing/templates/:template_idShows details for a template, by ID.
  • PUTFully update template/v2/invoicing/templates/:template_idFully updates a template, by ID. In the JSON request body, include a complete template object. This call does not support partial updates.
  • DELETEDelete template/v2/invoicing/templates/:template_idDeletes a template, by ID.

connections

  • GETList Connections./v2/invoicing/accounting-sync/merchant/connectionsLists connections to accounting platforms per merchant.

invoice-connection-details

  • GETList Connection Status for an Invoice./v2/invoicing/accounting-sync/invoices/:id/connectionsLists connections to accounting platforms per invoice.

API details

Base URL
https://api-m.sandbox.paypal.com
https://api-m.paypal.com
Authentication
OAuth 2.0 (client credentials flow) with 3 scopes
Operations
22 operations on 16 pathsPOST 10GET 6DELETE 4PUT 2
Main resources
invoices 14templates 5connections 1invoice-connection-details 1search-invoices 1
Response formats
application/json multipart/mixed
Description format
OpenAPI 3.0.3, API version 2.6

How to test the Invoices in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Invoices collection, without the publisher's secrets.
  3. Add your credentialsThis API uses OAuth 2.0 (client credentials flow) with 3 scopes. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “List invoices” (GET /v2/invoicing/invoices?page=1&page_size=20&total_required=false&fields=all), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Invoices?

Use the Invoicing API to create, send, and manage invoices. You can also use the API or webhooks to track invoice payments. When you send an invoice to a… It is listed under Payments and has 22 endpoints.

Who publishes the Invoices?

It is listed from PayPal's public API description (an OpenAPI document), not published by PayPal on Swastik Codes. Anyone who controls paypal.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Invoices?

Its description lists 2 base URLs: https://api-m.sandbox.paypal.com, https://api-m.paypal.com. The first is the usual one; the others are typically sandbox or regional servers.

How do I authenticate with the Invoices?

With OAuth 2.0 (client credentials flow) with 3 scopes.

How many endpoints does the Invoices have?

22 operations on 16 paths (10 POST, 6 GET, 4 DELETE, 2 PUT). The largest groups are invoices, templates, connections, invoice-connection-details.

Is forking the Invoices free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.