Search and View Invoices

APICurrent


Merchants can list invoices that match search criteria, such as email, name, and invoice number.

If you pass multiple criteria, the response lists invoices that match all criteria.

  • By default, the response shows the first 20 invoices that belong to the calling merchant.
  • To paginate the results, include the optional page and page_size query parameters.
  • To filter the invoices that appear in the response, include one or more optional query parameters.

Learn more about the search invoice endpoint.

This sample request lists invoices for a specified date range:

curl -v -X POST \
  https://api-m.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 the invoices that match the search criteria:

{
  "total_count": 589,
  "invoices": [
  {
    "id": "INV2-RF6D-L66T-D7H2-CRU7",
    "number": "INV 01256",
    "status": "DRAFT",
    "merchant_info":
    {
      "email": "dlarusso@example.com",
      "first_name": "David",
      "last_name": "Larusso",
      "business_name": "Mitchell & Murray",
      "phone":
      {
        "country_code": "001",
        "national_number": "4085551234"
      },
      "address":
      {
        "line1": "1234 First Street",
        "city": "Anytown",
        "state": "CA",
        "postal_code": "98765",
        "country_code": "US"
      }
    },
    "billing_info": [
    {
      "email": "stmeyers@example.com",
      "first_name": "Stephanie",
      "last_name": "Meyers"
    }],
    "shipping_info":
    {
      "first_name": "Stephanie",
      "last_name": "Meyers",
      "address":
      {
        "line1": "1234 Main Street",
        "city": "Anytown",
        "state": "CA",
        "postal_code": "98765",
        "country_code": "US"
      }
    },
    "invoice_date": "2017-06-22 PDT",
    "note": "Thank you for your business.",
    "total_amount":
    {
      "currency": "USD",
      "value": "387.30"
    },
    "metadata":
    {
      "created_date": "2017-02-27 23:55:58 PST"
    }
  },
  {
    "id": "INV2-RF6D-L66T-D7H2-CRU7",
    "number": "9879878979003790",
    "status": "DRAFT",
    "merchant_info":
    {
      "email": "dlarusso@example.com",
      "first_name": "David",
      "last_name": "Larusso",
      "business_name": "Mitchell & Murray",
      "phone":
      {
        "country_code": "001",
        "national_number": "4085551234"
      },
      "address":
      {
        "line1": "1234 First Street",
        "city": "Anytown",
        "state": "CA",
        "postal_code": "98765",
        "country_code": "US"
      }
    },
    "billing_info": [
    {
      "email": "stmeyers@example.com",
      "first_name": "Stephanie",
      "last_name": "Meyers"
    }],
    "shipping_info":
    {
      "first_name": "Stephanie",
      "last_name": "Meyers",
      "address":
      {
        "line1": "1234 Main Street",
        "city": "Anytown",
        "state": "CA",
        "postal_code": "98765",
        "country_code": "US"
      }
    },
    "invoice_date": "2017-06-22 PDT",
    "note": "Thank you for your business.",
    "total_amount":
    {
      "currency": "USD",
      "value": "387.30"
    },
    "metadata":
    {
      "created_date": "2017-02-27 23:55:58 PST"
    }
  },
  {
    "id": "INV2-RF6D-L66T-D7H2-CRU7",
    "number": "9879878979003789",
    "status": "DRAFT",
    "merchant_info":
    {
      "email": "dlarusso@example.com",
      "first_name": "David",
      "last_name": "Larusso",
      "business_name": "Mitchell & Murray",
      "phone":
      {
        "country_code": "001",
        "national_number": "4085551234"
      },
      "address":
      {
        "line1": "1234 First Street",
        "city": "Anytown",
        "state": "CA",
        "postal_code": "98765",
        "country_code": "US"
      }
    },
    "billing_info": [
    {
      "email": "stmeyers@example.com",
      "first_name": "Stephanie",
      "last_name": "Meyers"
    }],
    "shipping_info":
    {
      "first_name": "Stephanie",
      "last_name": "Meyers",
      "address":
      {
        "line1": "1234 Main Street",
        "city": "Anytown",
        "state": "CA",
        "postal_code": "98765",
        "country_code": "US"
      }
    },
    "invoice_date": "2017-06-22 PDT",
    "note": "Thank you for your business.",
    "total_amount":
    {
      "currency": "USD",
      "value": "387.30"
    },
    "metadata":
    {
      "created_date": "2017-02-27 23:55:58 PST"
    }
  },
  {
    "id": "INV2-RF6D-L66T-D7H2-CRU7",
    "number": "9879878979003788",
    "status": "DRAFT",
    "merchant_info":
    {
      "email": "dlarusso@example.com",
      "first_name": "David",
      "last_name": "Larusso",
      "business_name": "Mitchell & Murray",
      "phone":
      {
        "country_code": "001",
        "national_number": "4085551234"
      },
      "address":
      {
        "line1": "1234 First Street",
        "city": "Anytown",
        "state": "CA",
        "postal_code": "98765",
        "country_code": "US"
      }
    },
    "billing_info": [
    {
      "email": "stmeyers@example.com",
      "first_name": "Stephanie",
      "last_name": "Meyers"
    }],
    "shipping_info":
    {
      "first_name": "Stephanie",
      "last_name": "Meyers",
      "address":
      {
        "line1": "1234 Main Street",
        "city": "Anytown",
        "state": "CA",
        "postal_code": "98765",
        "country_code": "US"
      }
    },
    "invoice_date": "2017-06-22 PDT",
    "note": "Thank you for your business.",
    "total_amount":
    {
      "currency": "USD",
      "value": "387.30"
    },
    "metadata":
    {
      "created_date": "2017-02-27 23:55:58 PST"
    }
  }],
  "links": [
  {
    "href": "https://api-m.sandbox.paypal.com/v1/invoicing/invoices?page=4&page_size=4&total_count_required=true",
    "rel": "next",
    "method": "GET"
  },
  {
    "href": "https://api-m.sandbox.paypal.com/v1/invoicing/invoices?page=2&page_size=4&total_count_required=true",
    "rel": "previous",
    "method": "GET"
  }]
}

Next

Continue to Remove Invoices.