Invoices
Returns invoices from PayPal.
Table-Specific Information
SELECT
Server-side processing is only supported for the '=' operator.
The following filters are supported by the PayPal API:
- Id supports the '=' operator.
- Status supports the '=' operator.
- Reference supports the '=' operator.
- Currency supports the '=' operator.
- Memo supports the '=' operator.
- InvoiceDate supports the '=,<,>,<=,>=' operators.
- InvoiceNumber supports the '=' operator.
- DueDate supports the '=,<,>,<=,>=' operators.
- DueAmount supports the '=,<,>,<=,>=' operators.
- CreatedTime supports the '=,<,>,<=,>=' operators.
- InvoiceAmount supports the '=,<,>,<=,>=' operators.
- InvoiceCurrency supports the '=' operator.
- DueAmountCurrencyCode supports the '=' operator.
- Archived supports the '=' operator.
SELECT * FROM Invoices WHERE Id = 'INV2-LV8Z-5XH2-L4Z6-7LQ4'
When filtering with InvoiceAmount and DueAmount, InvoiceCurrency and DueAmountCurrencyCode are required respectively.
SELECT * FROM Invoices WHERE InvoiceAmount = 100 AND InvoiceCurrency = 'USD'
SELECT * FROM Invoices WHERE InvoiceAmount > 100 AND InvoiceAmount < 150 AND InvoiceCurrency = 'USD'
SELECT * FROM Invoices WHERE InvoiceAmount >= 100 AND InvoiceAmount < 150 AND InvoiceCurrency = 'USD'
SELECT * FROM Invoices WHERE InvoiceAmount > 100 AND InvoiceAmount <= 150 AND InvoiceCurrency = 'USD'
SELECT * FROM Invoices WHERE InvoiceAmount >= 100 AND InvoiceAmount <= 150 AND InvoiceCurrency = 'USD'
The provider processes all other filters client-side.
When using the IncludeDetails property with an offset in the query, set the MaxThreads property to 1 to prevent asynchronous slicing and ensure consistent data retrieval for repeated executions of the same query.
INSERT
To insert an invoice, specify the Currency column. You can optionally include other non-required columns. For example:
INSERT INTO Invoices (Currency, Note) VALUES ('USD','Registration Money');
UPDATE
To update an invoice, specify the Id in the WHERE clause. The Currency column is required when you update invoices. You can update any column that is not read-only. For example:
UPDATE Invoices SET Note = 'Registration Money Received', Currency = 'USD' WHERE Id = 'INV2-EBNZ-C8TS-2FLX-9CAX';
DELETE
To delete an invoice, specify the Id in the WHERE clause. For example:
DELETE FROM Invoices WHERE Id = 'INV2-EBNZ-C8TS-2FLX-9CAX';
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
The ID of the invoice. | |
| ParentId | String | True |
The parent ID to an invoice that defines the group invoice to which the invoice is related. | |
| Status | String | True |
The status of the invoice. The allowed values are DRAFT, SENT, SCHEDULED, PAID, MARKED_AS_PAID, CANCELLED, REFUNDED, PARTIALLY_PAID, PARTIALLY_REFUNDED, MARKED_AS_REFUNDED, UNPAID, PAYMENT_PENDING. | |
| Reference | String | False |
The reference data. Includes a post office (PO) number. | |
| Currency | String | False |
The three-character ISO-4217 currency code that identifies the currency. | |
| Note | String | False |
A note to the invoice recipient. Also appears on the invoice notification email. | |
| TermsAndConditions | String | False |
The general terms of the invoice. Can include return or cancellation policy and other terms and conditions. | |
| Memo | String | False |
A private bookkeeping memo for the user. | |
| InvoiceDate | Date | False |
The invoice date as specified by the sender, in Internet date and time format. | |
| InvoiceNumber | String | False |
A private bookkeeping memo for the user. | |
| TermType | String | False |
The payment term. Payment can be due upon receipt, a specified date, or in a set number of days. | |
| DueDate | Date | False |
The date when the invoice payment is due, in Internet date and time format. | |
| DueAmount | Decimal | True |
The due amount, which is the balance amount outstanding after payments. | |
| Gratuity | Decimal | True |
The amount paid by the payer as gratuity to the invoicer. | |
| PaidAmount | Decimal | False |
The aggregated payment amounts against this invoice. | |
| RefundAmount | Decimal | False |
The aggregated refund amounts. | |
| CreatedTime | Datetime | True |
The date and time when the resource was created, in Internet date and time format. | |
| CreatedBy | String | True |
The email address of the account that created the resource. | |
| LastUpdatedTime | Datetime | True |
The date and time when the resource was last edited, in Internet date and time format. | |
| LastUpdatedBy | String | True |
The email address of the account that last edited the resource. | |
| CancelTime | Datetime | True |
The date and time when the resource was canceled, in Internet date and time format. | |
| CancelledBy | String | True |
The actor who canceled the resource. | |
| FirstSentTime | Datetime | True |
The date and time when the resource was first sent, in Internet date and time format. | |
| LastSentTime | Datetime | True |
The date and time when the resource was last sent, in Internet date and time format. | |
| LastSentBy | String | True |
The email address of the account that last sent the resource. | |
| CreatedByFlow | String | True |
The flow variation that created this invoice. | |
| RecipientViewUrl | String | True |
The URL for the invoice payer view hosted on paypal.com. | |
| InvoicerViewUrl | String | True |
The URL for the invoice merchant view hosted on paypal.com. | |
| InvoicerBusinessName | String | False |
The business name of the party. | |
| InvoicerPrefixName | String | False |
The prefix, or title, to the party's name. | |
| InvoicerFirstName | String | False |
When the party is a person, the party's given, or first, name. | |
| InvoicerMiddleName | String | False |
When the party is a person, the party's middle name. Also used to store multiple middle names including the patronymic, or father's name. | |
| InvoicerLastName | String | False |
When the party is a person, the party's surname or family name. Also known as the last name. Required when the party is a person. | |
| InvoicerSuffixName | String | False |
The suffix for the party's name. | |
| InvoicerFullName | String | False |
When the party is a person, the party's full name. | |
| InvoicerAddressLine1 | String | False |
The first line of the address. For example, number or street. | |
| InvoicerAddressLine2 | String | False |
The second line of the address. For example, suite or apartment number. | |
| InvoicerAddressLine3 | String | False |
The third line of the address, if needed. | |
| InvoicerAddressPostalCode | String | False |
The postal code, which is the zip code or equivalent. Typically required for countries with a postal code or an equivalent. | |
| InvoicerAddressCountryCode | String | False |
The two-character ISO 3166-1 code that identifies the country or region. | |
| InvoicerAddressStreetNumber | String | False |
The street number. | |
| InvoicerAddressStreetName | String | False |
The street name. Just Drury in Drury Lane. | |
| InvoicerAddressStreetType | String | False |
The street type. For example, avenue, boulevard, road, or expressway. | |
| InvoicerAddressDeliveryService | String | False |
The delivery service. Post office box, bag number, or post office name. | |
| InvoicerAddressBuildingName | String | False |
A named location that represents the premise. Usually a building name or number, or a collection of buildings with a common name or number. | |
| InvoicerAddressSubBuilding | String | False |
The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. | |
| InvoicerEmail | String | False |
The invoicer email address, which must be listed in the user's PayPal profile. | |
| InvoicerWebsite | String | False |
The invoicer's website. | |
| InvoicerTaxId | String | False |
The invoicer's tax ID. | |
| InvoicerAdditionalNotes | String | False |
Any additional information. Includes business hours. | |
| InvoicerLogoUrl | String | False |
The full URL to an external logo image. The logo image must not be larger than 250 pixels wide by 90 pixels high. | |
| TaxCalculatedAfterDiscount | Boolean | False |
Indicates whether the tax is calculated before or after a discount. | |
| TaxInclusive | Boolean | False |
Indicates whether the unit price includes tax. | |
| AllowTip | Boolean | False |
Indicates whether the invoice enables the customer to enter a tip amount during payment. | |
| TemplateId | String | False |
The template ID. The template determines the layout of the invoice. Includes which fields to show and hide. | |
| AllowPartialPayment | Boolean | False |
Indicates whether the invoice allows a partial payment. If false, the invoice must be paid in full. If true, the invoice allows partial payments. | |
| MinimumAmountDue | String | False |
The minimum amount allowed for a partial payment. Valid only when allow_partial_payment is true. | |
| InvoiceAmount | Decimal | False |
The invoice amount summary of item total, discount, tax total and shipping. | |
| InvoiceCurrency | String | False |
The invoice amount summary of item total, discount, tax total and shipping. | |
| ItemTotal | Decimal | False |
The subtotal for all items. Must equal the sum of (quantity * price) for all items. | |
| InvoiceDiscountPercentage | String | False |
The discount as a percentage value. Value is from 0 to 100. Supports up to five decimal places. | |
| InvoiceDiscountValue | Decimal | False |
The invoice level discount amount. Value is from 0 to 1000000. Supports up to two decimal places. | |
| ItemDiscountValue | Decimal | False |
The discount as an amount at item level. | |
| TaxTotal | Decimal | False |
The aggregated amount of the item and shipping taxes. | |
| ShippingAmount | Decimal | False |
The shipping fee for all items. Includes tax on shipping. | |
| ShippingTaxAmount | Decimal | False |
The calculated tax amount. The tax amount is added to the item total. | |
| ShippingTaxPercentage | String | False |
The tax rate. Value is from 0 to 100. Supports up to five decimal places. | |
| ShippingTaxName | String | False |
The name of the tax applied on the invoice items. | |
| DueAmountCurrencyCode | String | True |
The three-character ISO-4217 currency code that identifies the currency. | |
| GratuityCurrencyCode | String | True |
The three-character ISO-4217 currency code that identifies the currency. | |
| PaidAmountCurrencyCode | String | False |
The three-character ISO-4217 currency code that identifies the currency. | |
| RefundAmountCurrencyCode | String | False |
The three-character ISO-4217 currency code that identifies the currency. | |
| MinimumAmountDueCurrencyCode | String | True |
The three-character ISO-4217 currency code that identifies the currency. | |
| ItemTotalCurrencyCode | String | False |
The three-character ISO-4217 currency code that identifies the currency. | |
| InvoiceDiscountCurrencyCode | String | False |
The three-character ISO-4217 currency code that identifies the currency. | |
| ItemDiscountCurrencyCode | String | False |
The three-character ISO-4217 currency code that identifies the currency. | |
| ShippingAmountCurrencyCode | String | False |
The three-character ISO-4217 currency code that identifies the currency. | |
| ShippingTaxAmountCurrencyCode | String | False |
The three-character ISO-4217 currency code that identifies the currency. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer more granular control over the data returned from the data source.
| Name | Type | Description |
| Archived | Boolean |
Indicates whether to list merchant-archived invoices in the response. |