On this page
No Headings
Deprecation notice: TheSearches for invoices that match search criteria. If you pass multiple criteria, the response lists invoices that match all criteria./v1/invoicesendpoint is deprecated. Use the/v2/invoicesendpoint instead. For details, see PayPal Invoicing Basic Integration.
Oauth 2.0 authentication
Client CredentialsToken URLhttps://api-m.sandbox.paypal.com/v1/oauth2/tokenInheaderScopes
https://uri.paypal.com/services/invoicingapplication/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
application/json
curl -X POST "https://api-m.sandbox.paypal.com/v1/invoicing/search" \ -H "Content-Type: application/json" \ -d '{}'{
"total_count": 0,
"invoices": [
{
"id": "string",
"number": "string",
"status": "DRAFT",
"merchant_info": {
"email": "user@example.com",
"business_name": "string",
"first_name": "string",
"last_name": "string",
"address": {
"line1": "string",
"line2": "string",
"city": "string",
"country_code": "string",
"postal_code": "string",
"state": "string",
"phone": "string"
},
"phone": {
"country_code": "str",
"national_number": "string"
},
"fax": {
"country_code": "str",
"national_number": "string"
},
"website": "http://example.com",
"tax_id": "string",
"additional_info": "string"
},
"billing_info": [
{
"email": "user@example.com",
"phone": {
"country_code": "str",
"national_number": "string"
},
"first_name": "string",
"last_name": "string",
"business_name": "string",
"address": {
"line1": "string",
"line2": "string",
"city": "string",
"country_code": "string",
"postal_code": "string",
"state": "string",
"phone": "string"
},
"language": "da_DK",
"additional_info": "string"
}
],
"shipping_info": {
"first_name": "string",
"last_name": "string",
"business_name": "string",
"address": {
"line1": "string",
"line2": "string",
"city": "string",
"country_code": "string",
"postal_code": "string",
"state": "string",
"phone": "string"
}
},
"cc_info": [
{
"email": "user@example.com"
}
],
"items": [
{
"name": "string",
"description": "string",
"quantity": 0,
"unit_price": {
"currency": "string",
"value": "string"
},
"tax": {
"name": "string",
"percent": 0,
"amount": {
"currency": "string",
"value": "string"
},
"tax_note": "string"
},
"date": "2019-08-24",
"discount": {
"percent": 0,
"amount": {
"currency": "string",
"value": "string"
}
},
"unit_of_measure": "QUANTITY"
}
],
"invoice_date": "2019-08-24",
"payment_term": {
"term_type": "DUE_ON_RECEIPT",
"due_date": "2019-08-24"
},
"reference": "string",
"discount": {
"percent": 0,
"amount": {
"currency": "string",
"value": "string"
}
},
"shipping_cost": {
"amount": {
"currency": "string",
"value": "string"
},
"tax": {
"name": "string",
"percent": 0,
"amount": {
"currency": "string",
"value": "string"
},
"tax_note": "string"
}
},
"custom": {
"label": "string",
"amount": {
"currency": "string",
"value": "string"
}
},
"allow_partial_payment": false,
"minimum_amount_due": {
"currency": "string",
"value": "string"
},
"tax_calculated_after_discount": false,
"tax_inclusive": false,
"terms": "string",
"note": "string",
"merchant_memo": "string",
"logo_url": "http://example.com",
"total_amount": {
"currency": "string",
"value": "string"
},
"payments": [
{
"type": "PAYPAL",
"transaction_id": "string",
"transaction_type": "SALE",
"date": "2019-08-24T14:15:22Z",
"method": "BANK_TRANSFER",
"note": "string",
"amount": {
"currency": "string",
"value": "string"
}
}
],
"refunds": [
{
"type": "PAYPAL",
"transaction_id": "string",
"date": "2019-08-24T14:15:22Z",
"note": "string",
"amount": {
"currency": "string",
"value": "string"
}
}
],
"metadata": {
"created_date": "2019-08-24T14:15:22Z",
"created_by": "string",
"cancelled_date": "2019-08-24T14:15:22Z",
"cancelled_by": "string",
"last_updated_date": "2019-08-24T14:15:22Z",
"last_updated_by": "string",
"first_sent_date": "2019-08-24T14:15:22Z",
"last_sent_date": "2019-08-24T14:15:22Z",
"last_sent_by": "string",
"payer_view_url": "http://example.com"
},
"paid_amount": {
"paypal": {
"currency": "string",
"value": "string"
},
"other": {
"currency": "string",
"value": "string"
}
},
"refunded_amount": {
"paypal": {
"currency": "string",
"value": "string"
},
"other": {
"currency": "string",
"value": "string"
}
},
"attachments": [
{
"name": "string",
"url": "http://example.com"
}
],
"allow_tip": false,
"template_id": "PayPal system template",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET",
"title": "string",
"mediaType": "string",
"encType": "application/json",
"schema": {
"additionalItems": {},
"dependencies": {},
"items": {},
"patternProperties": {},
"properties": {},
"allOf": [
{}
],
"anyOf": [
{}
],
"oneOf": [
{}
],
"not": {},
"links": [
{}
],
"fragmentResolution": "string",
"media": {
"type": "string",
"binaryEncoding": "string"
},
"pathStart": "http://example.com"
},
"targetSchema": {
"additionalItems": {},
"dependencies": {},
"items": {},
"patternProperties": {},
"properties": {},
"allOf": [
{}
],
"anyOf": [
{}
],
"oneOf": [
{}
],
"not": {},
"links": [
{}
],
"fragmentResolution": "string",
"media": {
"type": "string",
"binaryEncoding": "string"
},
"pathStart": "http://example.com"
}
}
]
}
],
"links": [
{
"href": "string",
"rel": "string",
"method": "GET",
"title": "string",
"mediaType": "string",
"encType": "application/json",
"schema": {
"additionalItems": {},
"dependencies": {},
"items": {},
"patternProperties": {},
"properties": {},
"allOf": [
{}
],
"anyOf": [
{}
],
"oneOf": [
{}
],
"not": {},
"links": [
{}
],
"fragmentResolution": "string",
"media": {
"type": "string",
"binaryEncoding": "string"
},
"pathStart": "http://example.com"
},
"targetSchema": {
"additionalItems": {},
"dependencies": {},
"items": {},
"patternProperties": {},
"properties": {},
"allOf": [
{}
],
"anyOf": [
{}
],
"oneOf": [
{}
],
"not": {},
"links": [
{}
],
"fragmentResolution": "string",
"media": {
"type": "string",
"binaryEncoding": "string"
},
"pathStart": "http://example.com"
}
}
]
}{
"name": "string",
"debug_id": "string",
"message": "string",
"information_link": "string",
"details": [
{
"field": "string",
"issue": "string"
}
]
}The initial letters of the email address.
The initial letters of the recipient's first name.
The initial letters of the recipient's last name.
The initial letters of the recipient's business name.
Any part of the invoice number.
The invoice status. To search by status, specify this value as an array. For example, "status": ["REFUNDED"]. The status indicates the phase of the invoice in its lifecycle:StatusOccurs whenCANCELLEDA merchant or customer cancels a sent invoice.DRAFTA merchant creates a draft invoice.Note: A customer cannot pay an invoice until a merchant sends it.MARKED_AS_PAIDA merchant marks an invoice as paid after he or she receives a check or cash payment for the invoice.MARKED_AS_REFUNDEDA merchant marks an invoice as refunded.Note: A merchant can only mark a marked-as-paid invoice as refunded.PAIDA customer fully pays an invoice. It is marked as paid through one or both of these methods:A merchant marks an invoice as paid after he or she receives a check or cash payment from the customer for the invoice.A customer makes an online payment for the invoice.PARTIALLY_PAIDA merchant or customer fully pays an invoice through one or both of these methods:A merchant marks an invoice as paid after he or she receives a check or cash payment from the customer for the invoice.A customer makes an online payment for the invoice.PARTIALLY_REFUNDEDA merchant partially refunds an invoice through one or both of these methods:A merchant marks an invoice as refunded. To complete this action, the merchant must previously mark the invoice as paid.A merchant makes an online refund for an online invoice payment.PAYMENT_PENDINGA customer pays an invoice but the payment is pending for one of these reasons:The payment is an uncleared eCheck.The payment is in an accept or deny state upon which the merchant must act.PayPal risk is reviewing the payment.Note: Most payments never go into a payment-pending state.REFUNDEDA merchant fully refunds an invoice through one or both of these methods:A merchant marks an invoice as refunded. To complete this action, the merchant must previously mark the invoice as paid.A merchant makes an online refund for an online invoice payment.SCHEDULEDA merchant schedules an invoice to be emailed by PayPal on a specified date.SENTA merchant sends an invoice to the customer.After the merchant sends the invoice:PayPal emails the invoice to the customer.A Payment button appears on the invoice. The customer can now pay the invoice.In a web app, the invoice appears as Unpaid (sent).UNPAIDA merchant sends an invoice and sets the notify_merchant and notify_customer query parameters to false to suppress the PayPal email notification. Then, the merchant manually sends the invoice link in his or her own email.
"DRAFT" | "SENT" | "SCHEDULED" | "PAID" | "MARKED_AS_PAID" | "CANCELLED" | "REFUNDED" | "PARTIALLY_REFUNDED" | "MARKED_AS_REFUNDED"The lower limit of the total amount.
The upper limit of the total amount.
The start date for the invoice, in Internet date and time format. For example, yyyy-MM-dd z.
dateThe end date for the invoice, in Internet date and time format. For example, yyyy-MM-dd z.
dateThe start due date for the invoice, in Internet date and time format. For example, yyyy-MM-dd z.
dateThe end due date for the invoice, in Internet date and time format. For example, yyyy-MM-dd z.
dateThe start payment date for the invoice, in Internet date and time format. For example, yyyy-MM-dd z.
dateThe end payment date for the invoice, in Internet date and time format. For example, yyyy-MM-dd z.
dateThe start creation date for the invoice, in Internet date and time format. For example, yyyy-MM-dd z.
dateThe end creation date for the invoice, in Internet date and time format. For example, yyyy-MM-dd z.
dateThe zero-relative start index of the entire list of merchant invoices to return in the response. So, a combination of page=0 and page_size=20 returns the first 20 invoices. A combination of page=20 and page_size=20 returns the next 20 invoices.
The page size for the search results.
Indicates whether the response shows the total count.
falseIndicates whether to list merchant-archived invoices in the response. If true, response lists only merchant-archived invoices. If false, response lists only unarchived invoices. If null, response lists all invoices.