invoicing

List Invoices

You can create a list of invoices for your merchant, or you can fetch a list of invoices based on search criteria, such as email, name, and invoice number.

List invoices

  1. Call list invoices. By default, the response lists the first 20 invoices that belong to the merchant.
  2. Specify the optional page query parameter to select the page of invoices to retrieve.
  3. Specify the optional page_size query parameter to define the maximum number of invoices returned in the response. The maximum value is 100.

This sample request returns one page of invoices with two invoices on the page:

{
  "description": "Lists invoices.",
  "title": "List Invoices",
  "runnable": true,
  "operationId": "fetchAllDetails",
  "user": {
    "scopes": [
      "https://uri.paypal.com/services/invoicing/invoices/read"
      "https://uri.paypal.com/services/invoicing/invoices/readwrite"
    ]
  },
  "request": {
    "path": "v2/invoicing/invoices?total_required=true",
    "method": "GET",
    "headers": {
      "Authorization": "Bearer zekwhYgsYYI0zDg0p_Nf5v78VelCfYR0",
      "Content-Type": "application/json"
    }
  },
  "response": {
    "status": "200 OK",
    "headers": {

    },
    "body": {
      "total_items": 2,
      "total_pages": 1,
      "items": [
        {
          "id": "INV2-Z56S-5LLA-Q52L-CPZ5",
          "status": "DRAFT",
          "detail": {
            "invoice_number": "#123",
            "reference": "deal-ref",
            "invoice_date": "2018-11-12",
            "currency_code": "USD",
            "note": "Thank you for your business.",
            "term": "No refunds after 30 days.",
            "memo": "This is a long contract",
            "payment_term": {
              "term_type": "NET_10",
              "due_date": "2018-11-22"
            },
            "metadata": {
              "create_time": "2018-11-12T08:00:20Z",
              "recipient_view_url": "https://www.api.paypal.com/invoice/p#Z56S5LLAQ52LCPZ5",
              "invoicer_view_url": "https://www.api.paypal.com/invoice/details/INV2-Z56S-5LLA-Q52L-CPZ5"
            }
          },
          "invoicer": {
            "email_address": "merchant@example.com"
          },
          "primary_recipients": [
            {
              "billing_info": {
                "email": "bill-me@example.com"
              }
            }
          ],
          "amount": {
            "currency_code": "USD",
            "value": "74.21"
          },
          "links": [
            {
              "href": "https://api.paypal.com/v2/invoicing/invoices/INV2-Z56S-5LLA-Q52L-CPZ5",
              "rel": "self",
              "method": "GET"
            },
            {
              "href": "https://api.paypal.com/v2/invoicing/invoices/INV2-Z56S-5LLA-Q52L-CPZ5/send",
              "rel": "send",
              "method": "POST"
            },
            {
              "href": "https://api.paypal.com/v2/invoicing/invoices/INV2-Z56S-5LLA-Q52L-CPZ5/update",
              "rel": "replace",
              "method": "PUT"
            },
            {
              "href": "https://api.paypal.com/v2/invoicing/invoices/INV2-Z56S-5LLA-Q52L-CPZ5",
              "rel": "delete",
              "method": "DELETE"
            }
          ]
        },
        {
          "id": "INV2-NP6M-C9A8-ZBDA-3TEX",
          "status": "SCHEDULED",
          "detail": {
            "invoice_number": "0001",
            "invoice_date": "2018-05-14",
            "currency_code": "USD",
            "payment_term": {
              "due_date": "2018-05-15"
            },
            "metadata": {
              "create_time": "2018-05-15T17:24:12Z"
            }
          },
          "invoicer": {
            "email_address": "merchant@example.com"
          },
          "primary_recipients": [
            {
              "billing_info": {
                "email": "kvel-pb@paypal.com"
              }
            }
          ],
          "amount": {
            "currency_code": "USD",
            "value": "32.00"
          },
          "links": [
            {
              "href": "https://api.paypal.com/v2/invoicing/invoices/INV2-NP6M-C9A8-ZBDA-3TEX",
              "rel": "self",
              "method": "GET"
            },
            {
              "href": "https://api.paypal.com/v2/invoicing/invoices/INV2-NP6M-C9A8-ZBDA-3TEX/update",
              "rel": "replace",
              "method": "PUT"
            },
            {
              "href": "https://api.paypal.com/v2/invoicing/invoices/INV2-NP6M-C9A8-ZBDA-3TEX",
              "rel": "delete",
              "method": "DELETE"
            },
            {
              "href": "https://api.paypal.com/v2/invoicing/invoices/INV2-NP6M-C9A8-ZBDA-3TEX/record-payment",
              "rel": "record-payment",
              "method": "POST"
            }
          ]
        }
      ],
      "links": [
        {
          "href": "https://api.paypal.com/v2/invoicing/invoices?page=1&page_size=20&total_required=false",
          "rel": "self",
          "method": "GET"
        }
      ]
    }
  }
}

Search invoices

  1. Call search invoices. By default, the response shows the first 20 invoices that belong to the merchant.
  2. To filter the invoices that appear in the response, include one or more optional query parameters. If you pass multiple criteria, the response lists invoices that match all criteria.
  3. To paginate the results, include the optional page and page_size query parameters.

This sample request lists invoices for a specified date range:

curl -v -X POST \
  https://api.sandbox.paypal.com/v2/invoicing/search?page=1&page_size=1&total_required=true \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer Access-Token" \
  -d '{
  "start_invoice_date": "2017-01-01 PST",
  "end_invoice_date": "2017-12-31 PST",
  "page": 0,
  "page_size": 3,
  "total_count_required": true
}'

A successful request returns the HTTP 200 OK status code and a JSON response body that lists invoices that match the specified date range.

Next

Continue to Show Invoice Details.