eBay Trading APIVersion 1379
 

SendInvoice

Use this call to send an email invoice or order to a buyer. If you specify a valid ItemID and TransactionID pair or an OrderLineItemID, SendInvoice sends a new or reminder invoice to the buyer. If you instead specify an OrderID, SendInvoice sends the order information to the buyer. In either case, the seller can request that a copy of the invoice or order be sent by email.

Usage Details

You can use SendInvoice to send an invoice once, or periodically if the buyer needs reminders.

When using SendInvoice, be sure that you meet the following conditions:

SendInvoice needs an ItemID and TransactionID combination, an OrderLineItemID, or an OrderID.

The response for SendInvoice, as defined in the schema, does not have any return values other than those defined in AbstractResponseType. If the call to SendInvoice is successful, it returns a call status of Success. If unsuccessful, it returns an error construct (see Error Handling). If a warning occurs, the result will contain both a call status and an error.

Testing SendInvoice

You can test this call in the Sandbox, as follows:

  1. Set up a sample seller and at least two buyers in the Sandbox environment.
  2. Sign in as the sample seller and create several listings, creating item IDs for each listing.
  3. Sign in as one of the sample buyers and purchase more than one item, creating an order ID.
  4. Sign in as another sample buyer and purchase one item, creating a transaction ID.
  5. Call SendInvoice as the sample seller to send order information to the first buyer. Make sure that the email is sent to the correct address with the correct order information but is not an invoice. Request an email copy and make sure you receive it and it is correct.
  6. Call SendInvoice as the sample seller to send an invoice to the second buyer, specifying an item ID and transaction ID. Make sure that the email is sent to the correct address with the correct invoice information. Request an email copy and make sure you receive it and it is correct.
  7. Try the same call again, using a valid item ID but an incorrect transaction ID.
  8. If time allows, let the order line item age at least 30 days, then attempt to send the invoice again. The call should return an error.

Ensure the profiles of your test users are properly completed to ensure the shipping services can be verified.



Input

See also Samples.

The box below lists all fields that could be included in the call request. To learn more about an individual field or its type, click its name in the box (or scroll down to find it in the table below the box).

See also the Deprecated Objects link above. Fields presented in this color are deprecated, and fields presented in this color are (or soon will be) non-operational.

The XML prototype does not include requester credentials. This is a documentation limitation only (see Standard Requester Credentials for Making Calls).

<?xml version="1.0" encoding="utf-8"?>
<SendInvoiceRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <!-- Call-specific Input Fields -->
  <AdjustmentAmount currencyID="CurrencyCodeType"> AmountType (double) </AdjustmentAmount>
  <CheckoutInstructions> string </CheckoutInstructions>
  <EmailCopyToSeller> boolean </EmailCopyToSeller>
  <InternationalShippingServiceOptions> InternationalShippingServiceOptionsType
    <ShippingService> token </ShippingService>
    <ShippingServiceAdditionalCost currencyID="CurrencyCodeType"> AmountType (double) </ShippingServiceAdditionalCost>
    <ShippingServiceCost currencyID="CurrencyCodeType"> AmountType (double) </ShippingServiceCost>
    <ShippingServicePriority> int </ShippingServicePriority>
    <ShipToLocation> string </ShipToLocation>
    <!-- ... more ShipToLocation values allowed here ... -->
  </InternationalShippingServiceOptions>
  <!-- ... more InternationalShippingServiceOptions nodes allowed here ... -->
  <ItemID> ItemIDType (string) </ItemID>
  <OrderID> OrderIDType (string) </OrderID>
  <OrderLineItemID> string </OrderLineItemID>
  <PaymentMethods> BuyerPaymentMethodCodeType </PaymentMethods>
  <!-- ... more PaymentMethods values allowed here ... -->
  <SalesTax> SalesTaxType
    <SalesTaxAmount currencyID="CurrencyCodeType"> AmountType (double) </SalesTaxAmount>
    <SalesTaxPercent> float </SalesTaxPercent>
    <SalesTaxState> string </SalesTaxState>
    <ShippingIncludedInTax> boolean </ShippingIncludedInTax>
  </SalesTax>
  <ShippingServiceOptions> ShippingServiceOptionsType
    <ShippingService> token </ShippingService>
    <ShippingServiceAdditionalCost currencyID="CurrencyCodeType"> AmountType (double) </ShippingServiceAdditionalCost>
    <ShippingServiceCost currencyID="CurrencyCodeType"> AmountType (double) </ShippingServiceCost>
    <ShippingServicePriority> int </ShippingServicePriority>
  </ShippingServiceOptions>
  <!-- ... more ShippingServiceOptions nodes allowed here ... -->
  <SKU> SKUType (string) </SKU>
  <TransactionID> string </TransactionID>
  <!-- Standard Input Fields -->
  <ErrorLanguage> string </ErrorLanguage>
  <MessageID> string </MessageID>
  <Version> string </Version>
  <WarningLevel> WarningLevelCodeType </WarningLevel>
</SendInvoiceRequest>
Argument Type Occurrence Meaning
Call-specific Input Fields [Jump to standard fields]
AdjustmentAmount AmountType (double) Conditional This field allows the seller to adjust the total cost of the order to account for an extra charge or to pass down a discount to the buyer.

The currency used in this field must be the same currency of the listing site. A positive value in this field indicates that the amount is an extra charge being paid to the seller by the buyer, and a negative value indicates that the amount is a discount given to the buyer by the seller.
AdjustmentAmount
  [ attribute currencyID ]
CurrencyCodeType Optional This field allows the seller to adjust the total cost of the order to account for an extra charge or to pass down a discount to the buyer.

The currency used in this field must be the same currency of the listing site. A positive value in this field indicates that the amount is an extra charge being paid to the seller by the buyer, and a negative value indicates that the amount is a discount given to the buyer by the seller.

For a list of possible enumeration values, see CurrencyCodeType.
CheckoutInstructions string Optional This field allows the seller to provide a message or instructions regarding checkout/payment, or the return policy.
Max length: 500.
EmailCopyToSeller boolean Optional This field is included and set to true if the seller wishes to receive an email copy of the invoice sent to the buyer.
Default: true.
InternationalShippingServiceOptions InternationalShippingServiceOptionsType Optional,
repeatable: [0..*]
If the buyer has an international shipping address, use this container to offer up to four international shipping service options (or five if one of the shipping service options is Global Shipping Program or eBay International Shipping). If one or more international shipping service options are offered through this container, the (domestic) ShippingServiceOptions container should not be included in the same request.
InternationalShippingServiceOptions
  .ShippingService
token Optional An international shipping service being offered by the seller to ship an item to a buyer. For a list of valid values, call GeteBayDetails with DetailName set to ShippingServiceDetails.

To view the full list of International shipping service options in the response, look for the ShippingService fields in the ShippingServiceDetails containers that contain a InternationalService = true field, as this indicates that the ShippingService value is an International shipping service option.

The ShippingServiceDetails.ValidForSellingFlow flag must also be present. Otherwise, that particular shipping service option is no longer valid and cannot be offered to buyers through a listing.

For flat and calculated shipping.

See GeteBayDetails.



Applicable values: See ShippingServiceCodeType
InternationalShippingServiceOptions
  .ShippingServiceAdditionalCost
AmountType (double) Optional The cost of shipping each additional item if the same buyer purchases multiple quantity of the same line item. This field is required when creating a multiple-quantity, fixed-price listing. Generally, the seller will give the buyer a shipping discount if that buyer purchases multiple quantity of the item, so this value should usually be less than the value set for ShippingServiceCost.

The value of this field can even be set to 0 if the seller wants to encourage buyers to buy multiple quantity of the item, or it could be that the seller can fit multiple quantities of the line item in a single shipping package, so the seller is just passing this shipping savings onto the buyer. This field is not applicable for single-quantity listings.
InternationalShippingServiceOptions
  .ShippingServiceAdditionalCost
  [ attribute currencyID ]
CurrencyCodeType Optional The cost of shipping each additional item if the same buyer purchases multiple quantity of the same line item. This field is required when creating a multiple-quantity, fixed-price listing. Generally, the seller will give the buyer a shipping discount if that buyer purchases multiple quantity of the item, so this value should usually be less than the value set for ShippingServiceCost.

The value of this field can even be set to 0 if the seller wants to encourage buyers to buy multiple quantity of the item, or it could be that the seller can fit multiple quantities of the line item in a single shipping package, so the seller is just passing this shipping savings onto the buyer. This field is not applicable for single-quantity listings.

For a list of possible enumeration values, see CurrencyCodeType.
InternationalShippingServiceOptions
  .ShippingServiceCost
AmountType (double) Optional The base cost of shipping the item using the shipping service specified in the ShippingService field. In the case of a multiple-quantity, fixed-price listing, the ShippingServiceAdditionalCost field shows the cost to ship each additional item if the buyer purchases multiple quantity of the same line item.

When returned by GetItemShipping, it includes the packaging and handling cost. For flat and calculated shipping.

If a shipping service has been specified (even LocalPickup), GetItem returns the shipping service cost, even if the cost is zero. Otherwise, cost is not returned.

If this is for calculated shipping for a listing that has not yet ended, note that the cost cannot be determined until the listing has ended and the buyer has specified a postal code.

For GetItemShipping, promotional shipping savings is reflected in the cost, if applicable. If the promotional shipping option is lower than other shipping services being offered, the savings is reflected in the returned shipping cost. The shipping service named Promotional Shipping Service (or whatever is the localized name for it) is included among the shipping services. If the promotional shipping cost is lower than the cost of other shipping services being offered, it is presented first in the list. (The LOWEST shipping service cost is always presented first, regardless of whether there is promotional shipping.)

See https://developer.ebay.com/api-docs/user-guides/static/trading-user-guide/shipping-types-rates.html.

InternationalShippingServiceOptions
  .ShippingServiceCost
  [ attribute currencyID ]
CurrencyCodeType Optional The base cost of shipping the item using the shipping service specified in the ShippingService field. In the case of a multiple-quantity, fixed-price listing, the ShippingServiceAdditionalCost field shows the cost to ship each additional item if the buyer purchases multiple quantity of the same line item.

When returned by GetItemShipping, it includes the packaging and handling cost. For flat and calculated shipping.

If a shipping service has been specified (even LocalPickup), GetItem returns the shipping service cost, even if the cost is zero. Otherwise, cost is not returned.

If this is for calculated shipping for a listing that has not yet ended, note that the cost cannot be determined until the listing has ended and the buyer has specified a postal code.

For GetItemShipping, promotional shipping savings is reflected in the cost, if applicable. If the promotional shipping option is lower than other shipping services being offered, the savings is reflected in the returned shipping cost. The shipping service named Promotional Shipping Service (or whatever is the localized name for it) is included among the shipping services. If the promotional shipping cost is lower than the cost of other shipping services being offered, it is presented first in the list. (The LOWEST shipping service cost is always presented first, regardless of whether there is promotional shipping.)

For a list of possible enumeration values, see CurrencyCodeType.
InternationalShippingServiceOptions
  .ShippingServicePriority
int Optional This integer value controls the order (relative to other shipping services) in which the corresponding ShippingService will appear in the View Item and Checkout page. Sellers can specify up to five international shipping services (with five InternationalShippingServiceOption containers), so valid values are 1, 2, 3, 4, and 5. A shipping service with a ShippingServicePriority value of 1 appears at the top. Conversely, a shipping service with a ShippingServicePriority value of 5 appears at the bottom of a list of five shipping service options. If the Global Shipping Program is enabled on the listing for international shipping, only four additional shipping services may be specified.

If this field is omitted from international shipping service options, the order of the shipping service options in View Item and Checkout pages will be determined by the order that these shipping service options are presented in the request payload of an Add/Revise/Relist call.
InternationalShippingServiceOptions
  .ShipToLocation
string Optional,
repeatable: [0..*]
An international location or region to where the item seller will ship the item.

Use GeteBayDetails with DetailName set to ShippingLocationDetails to determine which locations are valid per site. In the GeteBayDetails response, look for the ShippingLocationDetails.ShippingLocation fields.

For the AddItem family of calls, this field is required if any international shipping service is specified.

For GetOrders and GetItemTransactions only: If using Trading WSDL Version 1019 or above, ShipToLocation fields will only be returned to the buyer or seller, and no longer returned at all to third parties. If using a Trading WSDL older than Version 1019, ShipToLocation fields are only returned to the buyer or seller, and a string value of Unavailable will be returned to all third parties.

See Shipping information.



Applicable values: See CountryCodeType, ShippingRegionCodeType
ItemID ItemIDType (string) Conditional Unique identifier of the eBay listing. Unless OrderID or OrderLineItemID is provided in the request, the ItemID value (or SKU value) is conditionally required and must be paired with the corresponding TransactionID value to identify an order line item. For a multiple line item order, OrderID should be used.
OrderID OrderIDType (string) Conditional A unique identifier that identifies a single line item or multiple line item order.

Unless the ItemID value (or SKU value) and corresponding TransactionID value, or the OrderLineItemID value is provided in the request to identify a single line item order, the OrderID value must be specified. If OrderID value is specified, OrderLineItemID, ItemID, TransactionID, and SKU fields are ignored if present in the same request.

Note: Note that the unique identifier of a 'non-immediate payment' order will change as it goes from an unpaid order to a paid order. Due to this scenario, all Trading API calls that accept Order ID values as filters in the request payload will support the identifiers for both unpaid and paid orders.

Sellers can check to see if an order has been paid by looking for a value of Complete in the CheckoutStatus.Status field in the response of GetOrders call, or in the Status.CompleteStatus field in the response of GetItemTransactions or GetSellerTransactions call. Sellers should not fulfill orders until buyer has made payment.

Max length: 40.
OrderLineItemID string Conditional A unique identifier for an eBay order line item. This identifier is created as soon as there is a commitment to buy (bidder wins the auction, buyer clicks buy button, or buyer purchases item through PlaceOffer call).

Unless the ItemID (or SKU) and corresponding TransactionID is used to identify a single line item order, or the OrderID is used to identify a single or multiple line item order, the OrderLineItemID must be specified. For a multiple line item order, OrderID should be used. If OrderLineItemID is specified, ItemID, TransactionID, and SKU are ignored if present in the same request.
PaymentMethods BuyerPaymentMethodCodeType Optional,
repeatable: [0..*]
This field should only be used if the seller needs to add one or more offline payment options for an order that requires/supports offline payment. A seller should not submit any online payment methods here since eBay now controls the available online payment options that are available to buyers, and not the seller.

Applicable values:

CashOnPickup
(in/out) This enumeration value indicates that cash on pickup is accepted for payment. This value is only applicable for offline payments.
Note: To see if this enumeration value is a supported payment method for a site and category, call GetCategoryFeatures specifying the listing category ID and including the FeatureID field set to PaymentMethods.
COD
(in/out) This enumeration value indicates that a COD (Cash On Delivery) is accepted for payment. This value is only applicable for offline payments and is not supported on all marketplaces.
Note: To see if this enumeration value is a supported payment method for a site and category, call GetCategoryFeatures specifying the listing category ID and including the FeatureID field set to PaymentMethods.
CustomCode
(in/out) Reserved for internal or future use.
MOCC
(in/out) This enumeration value indicates that a money order or cashiers check is accepted for payment. This value is only applicable for offline payments and is not supported on all marketplaces.
Note: To see if this enumeration value is a supported payment method for a site and category, call GetCategoryFeatures specifying the listing category ID and including the FeatureID field set to PaymentMethods.
PersonalCheck
(in/out) This enumeration value indicates that a personal check is accepted for payment. This value is only applicable for offline payments and is not supported on all marketplaces.
Note: To see if this enumeration value is a supported payment method for a site and category, call GetCategoryFeatures specifying the listing category ID and including the FeatureID field set to PaymentMethods.
SalesTax SalesTaxType Optional This container is used if the seller wishes to apply sales tax to the order if the buyer lives in a state/jurisdiction where sales tax is not already collected automatically by eBay and remitted to the tax authority. The amount of sales tax applied to the order is dependent on the sales tax rate in the buyer's state and whether sales tax is being applied to the cost of the order only or the cost of the order plus shipping and handling.

Note: Buyers in all 50 US states and DC are automatically charged sales tax for eBay purchases, and eBay collects and remits this sales tax to the proper taxing authority on the buyer's behalf. Because of this, if a sales tax percentage rate is applied to a listing by a seller in one of these states, this field will be ignored during the checkout process.

Currently, sales tax percentage rates can only be specified by sellers in Canada and 5 US territories, including American Samoa (AS), Guam (GU), Northern Mariana Islands (MP), Palau (PW), and Virgin Islands (VI).
SalesTax.SalesTaxAmount AmountType (double) Optional The amount of sales tax calculated for an order line item based on the sale price and the sales tax rate for the buyer's tax jurisdiction. For a multiple line item order, the SalesTaxAmount returned at the order level will be the cumulative amount for all line items in the order.

GetItemTransactions can return incorrect sales tax if the name of a state is not abbreviated (e.g. if the value is "Illinois" rather than "IL") in TransactionArray.Transaction.Buyer.BuyerInfo.ShippingAddress.StateOrProvince.
SalesTax.SalesTaxAmount
  [ attribute currencyID ]
CurrencyCodeType Optional The amount of sales tax calculated for an order line item based on the sale price and the sales tax rate for the buyer's tax jurisdiction. For a multiple line item order, the SalesTaxAmount returned at the order level will be the cumulative amount for all line items in the order.

GetItemTransactions can return incorrect sales tax if the name of a state is not abbreviated (e.g. if the value is "Illinois" rather than "IL") in TransactionArray.Transaction.Buyer.BuyerInfo.ShippingAddress.StateOrProvince.

For a list of possible enumeration values, see CurrencyCodeType.
SalesTax.SalesTaxPercent float Optional This float value is the sales tax percentage rate applicable to the corresponding tax jurisdiction (US state or Canadian province). Sellers are responsible for providing accurate sales tax rates for each jurisdiction. This sales tax rate comes into play when a buyer from that tax jurisdiction makes a purchase from the seller. The value passed in is stored with a precision of 3 digits after the decimal point (##.###).

This field is only returned in order management calls if sales tax applies to the order line item, and is only in GetItem (and other 'Get' calls) if sales tax is applicable to the listing or order line item, and the seller is the person making the call.

Although this field will be returned at the order level in order management calls for a single line item order, sales tax is applied at the line item level and not order level. For multiple line item orders, this field will not be returned at all at the order level.

Note: Buyers in all 50 US states and DC are automatically charged sales tax for eBay purchases, and eBay collects and remits this sales tax to the proper taxing authority on the buyer's behalf. Because of this, if a sales tax percentage rate is applied to a listing by a seller in one of these states, this field will be ignored during the checkout process.

Currently, sales tax percentage rates can only be specified by sellers in Canada and 5 US territories, including American Samoa (AS), Guam (GU), Northern Mariana Islands (MP), Palau (PW), and Virgin Islands (VI).
SalesTax.SalesTaxState string Optional This is the unique, two-digit identifier of the tax jurisdiction (such as 'CA' for California). To retrieve all two-digit identifiers for all states/territories/provinces for a site, a seller can either use a GetTaxTable call with DetailLevel set to ReturnAll, or they can use the GeteBayDetails call with DetailLevel name set to TaxJurisdiction. Please note that both GetTaxTable and GeteBayDetails calls use a JurisdictionID field to express these tax jurisdiction identifiers instead of SalesTaxState, but the values used in these fields are the same.

The SalesTaxState field is conditionally required in an Add/Revise/Relist/Verify call if the seller is applying sales tax to a listing for a particular jurisdiction, and is returned with each SalesTax container to identify the tax jurisdiction.
SalesTax.ShippingIncludedInTax boolean Optional This field is included in an Add/Revise/Relist/Verify call and set to true if the seller wants sales tax for the jurisdiction to apply to the cumulative amount of item cost and shipping charges. This value defaults to false if not specified.

This field is always returned with the SalesTax container (whether true or false).

Note: Buyers in all 50 US states and DC are automatically charged sales tax for eBay purchases, and eBay collects and remits this sales tax to the proper taxing authority on the buyer's behalf. Because of this, if a sales tax percentage rate is applied to a listing by a seller in one of these states, this field will be ignored during the checkout process.

Currently, sales tax percentage rates can only be specified by sellers in Canada and 5 US territories, including American Samoa (AS), Guam (GU), Northern Mariana Islands (MP), Palau (PW), and Virgin Islands (VI).

Default: False.
ShippingServiceOptions ShippingServiceOptionsType Optional,
repeatable: [0..*]
If the buyer has a domestic shipping address, use this container to offer up to four domestic shipping service options. If one or more domestic shipping service options are offered through this container, the InternationalShippingServiceOptions container should not be included in the same request.
ShippingServiceOptions
  .ShippingService
token Optional This enumeration value indicates a specific domestic shipping service option being offered by the seller to ship an item to a buyer who is located within the same country as the item. This field is required to identify each domestic shipping service option that is specified with a ShippingServiceOptions container.

For a list of valid ShippingService values, call GeteBayDetails with DetailName set to ShippingServiceDetails. The ShippingServiceDetails.ValidForSellingFlow flag must also be present. Otherwise, that particular shipping service option is no longer valid and cannot be offered to buyers through a listing.

To view the full list of domestic shipping service options in the response, look for the ShippingServiceDetails.ShippingService fields. Domestic shipping service options will not have a InternationalService = true field, as this indicates that the ShippingService value is an International shipping service option.

Note: The eBay standard envelope (eSE) is a domestic envelope service with tracking through eBay. This service applies to specific sub-categories of Trading Cards, and to coins & paper money, postcards, stamps, patches, and similar eligible categories, and is only available on the US marketplace. See eBay standard envelope for details, restrictions, and an envelope size template. To use this service, send envelopes using the USPS mail and set the ShippingService field to US_eBayStandardEnvelope.

For the REST equivalent, see Using the eBay standard envelope (eSE) service.

See GeteBayDetails.



Applicable values: See ShippingServiceCodeType
ShippingServiceOptions
  .ShippingServiceAdditionalCost
AmountType (double) Optional The cost of shipping each additional item if the same buyer purchases multiple quantity of the same line item. This field is required when creating a multiple-quantity, fixed-price listing. Generally, the seller will give the buyer a shipping discount if that buyer purchases multiple quantity of the item, so this value should usually be less than the value set for ShippingServiceCost.

The value of this field can even be set to 0 if the seller wants to encourage buyers to buy multiple quantity of the item, or it could be that the seller can fit multiple quantities of the line item in a single shipping package, so the seller is just passing this shipping savings onto the buyer. This field is not applicable for single-quantity listings.
ShippingServiceOptions
  .ShippingServiceAdditionalCost
  [ attribute currencyID ]
CurrencyCodeType Optional The cost of shipping each additional item if the same buyer purchases multiple quantity of the same line item. This field is required when creating a multiple-quantity, fixed-price listing. Generally, the seller will give the buyer a shipping discount if that buyer purchases multiple quantity of the item, so this value should usually be less than the value set for ShippingServiceCost.

The value of this field can even be set to 0 if the seller wants to encourage buyers to buy multiple quantity of the item, or it could be that the seller can fit multiple quantities of the line item in a single shipping package, so the seller is just passing this shipping savings onto the buyer. This field is not applicable for single-quantity listings.

For a list of possible enumeration values, see CurrencyCodeType.
ShippingServiceOptions
  .ShippingServiceCost
AmountType (double) Optional The base cost of shipping one unit of the item using the shipping service specified in the corresponding ShippingService field.

In the case of a multiple-quantity, fixed-price listing, the ShippingServiceAdditionalCost field also becomes applicable, and shows the cost to ship each additional unit of the item if the buyer purchases multiple quantity of the same line item.

Note: If the corresponding shipping service option is set as a 'free shipping' option (FreeShipping set to true) and flat-rate shipping is being used domestically (ShippingType is set to Flat or FlatDomesticCalculatedInternational), the seller must still include this ShippingServiceCost field and set its value to 0.0, as eBay will not do this automatically. Do not include ShippingServiceCost when the domestic shipping service option is set to represent domestic calculated shipping (ShippingType is set to Calculated or CalculatedDomesticFlatInternational), as error 10019 occurs.
When returned by GetItemShipping, it includes the packaging and handling cost.

Note that if ShippingService is set to LocalPickup, ShippingServiceCost must be set to 0.0. Also, if a shipping service has been specified (even LocalPickup), GetItem returns the shipping service cost, even if the cost is zero.

If this is for calculated shipping for a listing that has not yet ended, note that the cost cannot be determined until the listing has ended and the buyer has specified a postal code.
ShippingServiceOptions
  .ShippingServiceCost
  [ attribute currencyID ]
CurrencyCodeType Optional The base cost of shipping one unit of the item using the shipping service specified in the corresponding ShippingService field.

In the case of a multiple-quantity, fixed-price listing, the ShippingServiceAdditionalCost field also becomes applicable, and shows the cost to ship each additional unit of the item if the buyer purchases multiple quantity of the same line item.

Note: If the corresponding shipping service option is set as a 'free shipping' option (FreeShipping set to true) and flat-rate shipping is being used domestically (ShippingType is set to Flat or FlatDomesticCalculatedInternational), the seller must still include this ShippingServiceCost field and set its value to 0.0, as eBay will not do this automatically. Do not include ShippingServiceCost when the domestic shipping service option is set to represent domestic calculated shipping (ShippingType is set to Calculated or CalculatedDomesticFlatInternational), as error 10019 occurs.
When returned by GetItemShipping, it includes the packaging and handling cost.

Note that if ShippingService is set to LocalPickup, ShippingServiceCost must be set to 0.0. Also, if a shipping service has been specified (even LocalPickup), GetItem returns the shipping service cost, even if the cost is zero.

If this is for calculated shipping for a listing that has not yet ended, note that the cost cannot be determined until the listing has ended and the buyer has specified a postal code.

For a list of possible enumeration values, see CurrencyCodeType.
ShippingServiceOptions
  .ShippingServicePriority
int Optional Controls the order (relative to other shipping services) in which the corresponding ShippingService will appear in the View Item and Checkout page.

Sellers can specify up to four domestic shipping services (with four ShippingServiceOptions containers), so valid values are 1, 2, 3, and 4. A shipping service with a ShippingServicePriority value of 1 appears at the top. Conversely, a shipping service with a ShippingServicePriority value of 4 appears at the bottom of a list of four shipping service options.

If this field is omitted from domestic shipping service options, the order of the shipping service options in View Item and Checkout pages will be determined by the order that these shipping service options are presented in the request payload of an Add/Revise/Relist call.
SKU SKUType (string) Conditional The seller's unique identifier for an item that is being tracked by this SKU. If OrderID or OrderLineItemID are not provided, both SKU (or ItemID) and corresponding TransactionID must be provided to uniquely identify a single line item order. For a multiple line item order, OrderID must be used.

This field should only be used if the Item.InventoryTrackingMethod field (set with the AddFixedPriceItem or RelistFixedPriceItem calls) is set to SKU.
Max length: 50.
TransactionID string Conditional Unique identifier for an eBay sales transaction. This identifier is created once there is a commitment from a buyer to purchase an item. Since an auction listing can only have one sales transaction during the duration of the listing, the TransactionID value for auction listings is always 0.

Note: Beginning in July 2024, non-zero transaction IDs will start being returned for auction listings. If necessary, update code to handle non-zero transaction IDs for auction transactions before this time.
Unless OrderID or OrderLineItemID is provided in the request, the TransactionID value is required and must be paired with the corresponding ItemID value to identify an order line item. For a multiple line item order, OrderID should be used.
Standard Input Fields  
ErrorLanguage string Optional Use ErrorLanguage to return error strings for the call in a different language from the language commonly associated with the site that the requesting user is registered with. Below are some examples from different countries.

ID Country
en_AU Australia
de_AT Austria
nl_BE Belgium (Dutch)
fr_BE Belgium (French)
en_CA Canada
fr_CA Canada (French)
zh_CN China
fr_FR France
de_DE Germany
zh_HK Hong Kong
en_IN India
en_IE Ireland
it_IT Italy
nl_NL Netherlands
en_SG Singapore
es_ES Spain
de_CH Switzerland
en_GB United Kingdom
en_US United States
MessageID string Optional Most Trading API calls support a MessageID element in the request and a CorrelationID element in the response. If you pass in a MessageID in a request, the same value will be returned in the CorrelationID field in the response. Pairing these values can help you track and confirm that a response is returned for every request and to match specific responses to specific requests. If you do not pass a MessageID value in the request, CorrelationID is not returned.

Note: GetCategories is designed to retrieve very large sets of metadata that change once a day or less often. To improve performance, these calls return cached responses when you request all available data (with no filters). When this occurs, the MessageID and CorrelationID fields aren't applicable. However, if you specify an input filter to reduce the amount of data returned, the calls retrieve the latest data (not cached). When this occurs, MessageID and CorrelationID are applicable.
Version string Conditional The version number of the API code that you are programming against (e.g., 1149). The version you specify for a call has these basic effects:
  • It indicates the version of the code lists and other data that eBay should use to process your request.
  • It indicates the schema version you are using.
You need to use a version that is greater than or equal to the lowest supported version.
For the SOAP API: If you are using the SOAP API, this field is required. Specify the version of the WSDL your application is using.

For the XML API: If you are using the XML API, this field has no effect. Instead, specify the version in the X-EBAY-API-COMPATIBILITY-LEVEL HTTP header. (If you specify Version in the body of an XML API request and it is different from the value in the HTTP header, eBay returns an informational warning that the value in the HTTP header was used instead.)

See:
    HTTP headers
    eBay Schema Versioning Strategy
    Lowest Supported Version

WarningLevel WarningLevelCodeType Optional Controls whether or not to return warnings when the application passes unrecognized or deprecated elements in a request.

An unrecognized element is one that is not defined in any supported version of the schema. Schema element names are case-sensitive, so using WarningLevel can also help you remove any potential hidden bugs within your application due to incorrect case or spelling in field names before you put your application into the Production environment.

WarningLevel only validates elements; it doesn't validate XML attributes. It also doesn't control warnings related to user-entered strings or numbers, or warnings for logical errors.

We recommend that you only use this during development and debugging. Do not use this in requests performed in the Production environment.

Applicable values:

High
(in) The WarningLevel value is set to High if the user wishes to receive warnings when the application passes unrecognized or deprecated elements in an API call request. Setting the WarningLevel value to High is not recommended in a production environment. Instead, it should only be used during the development/debugging stage.
Low
(in) The WarningLevel value is set to Low if the user does not wish to receive warnings when the application passes unrecognized or deprecated elements in an API call request. This is the default value if WarningLevel is not specified in the call request.

See Warning Level.



Output

See also Samples.

The box below lists all fields that might be returned in the response. To learn more about an individual field or its type, click its name in the box (or scroll down to find it in the table below the box).

See also the Deprecated Objects link above. Fields presented in this color are deprecated, and fields presented in this color are not returned (or soon will not be returned) or are not operational (or soon will be non-operational).

<?xml version="1.0" encoding="utf-8"?>
<SendInvoiceResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <!-- (No call-specific Output fields) -->

  <!-- Standard Output Fields -->
  <Ack> AckCodeType </Ack>
  <Build> string </Build>
  <CorrelationID> string </CorrelationID>
  <Errors> ErrorType
    <ErrorClassification> ErrorClassificationCodeType </ErrorClassification>
    <ErrorCode> token </ErrorCode>
    <ErrorParameters ParamID="string"> ErrorParameterType
      <Value> string </Value>
    </ErrorParameters>
    <!-- ... more ErrorParameters nodes allowed here ... -->
    <LongMessage> string </LongMessage>
    <SeverityCode> SeverityCodeType </SeverityCode>
    <ShortMessage> string </ShortMessage>
  </Errors>
  <!-- ... more Errors nodes allowed here ... -->
  <HardExpirationWarning> string </HardExpirationWarning>
  <Timestamp> dateTime </Timestamp>
  <Version> string </Version>
</SendInvoiceResponse>
Return Value Type Occurrence Meaning
(No call-specific fields)
Standard Output Fields  
Ack AckCodeType Always A token representing the application-level acknowledgement code that indicates the response status (e.g., success). The AckCodeType list specifies the possible values for the Ack field.

Applicable values:

CustomCode
(out) Reserved for internal or future use.
Failure
(out) This value indicates that the call request processing failed.
Success
(out) This value indicates that the call request was processed successfully without any issues.
Warning
(out) This value indicates that the call request was successful, but processing was not without any issues. These issues can be checked in the Errors container, that will also be returned when one or more known issues occur with the call request.

(Not all values in AckCodeType apply to this field.)

Code so that your app gracefully handles any future changes to this list.
Build string Always This refers to the specific software build that eBay used when processing the request and generating the response. This includes the version number plus additional information. eBay Developer Support may request the build information when helping you resolve technical issues.
CorrelationID string Conditionally Most Trading API calls support a MessageID element in the request and a CorrelationID element in the response. If you pass in a MessageID in a request, the same value will be returned in the CorrelationID field in the response. Pairing these values can help you track and confirm that a response is returned for every request and to match specific responses to specific requests. If you do not pass a MessageID value in the request, CorrelationID is not returned.

Note: GetCategories is designed to retrieve very large sets of metadata that change once a day or less often. To improve performance, these calls return cached responses when you request all available data (with no filters). When this occurs, the MessageID and CorrelationID fields aren't applicable. However, if you specify an input filter to reduce the amount of data returned, the calls retrieve the latest data (not cached). When this occurs, MessageID and CorrelationID are applicable.
Errors ErrorType Conditionally,
repeatable: [0..*]
A list of application-level errors (if any) that occurred when eBay processed the request.
Errors.ErrorClassification ErrorClassificationCodeType Conditionally API errors are divided between two classes: system errors and request errors.

Applicable values:

CustomCode
(out) Reserved for internal or future use.
RequestError
(out) An error has occurred either as a result of a problem in the sending application or because the application's end-user has attempted to submit invalid data (or missing data). In these cases, do not retry the request. The problem must be corrected before the request can be made again. If the problem is due to something in the application (such as a missing required field), the application must be changed. If the problem is a result of end-user data, the application must alert the end-user to the problem and provide the means for the end-user to correct the data. Once the problem in the application or data is resolved, resend the request to eBay with the corrected data.
SystemError
(out) Indicates that an error has occurred on the eBay system side, such as a database or server down. An application can retry the request as-is a reasonable number of times (eBay recommends twice). If the error persists, contact Developer Technical Support. Once the problem has been resolved, the request may be resent in its original form.

Code so that your app gracefully handles any future changes to this list.
Errors.ErrorCode token Conditionally A unique code that identifies the particular error condition that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms.

See Errors By Number.

Errors.ErrorParameters ErrorParameterType Conditionally,
repeatable: [0..*]
This optional element carries a list of context-specific error variables that indicate details about the error condition. These are useful when multiple instances of ErrorType are returned.
Errors.ErrorParameters
  [ attribute ParamID ]
string Conditionally This optional element carries a list of context-specific error variables that indicate details about the error condition. These are useful when multiple instances of ErrorType are returned.
Errors.ErrorParameters.Value string Conditionally This is the value of the request parameter noted in the ParamID attribute. So, if the ParamID value was ItemID, the value in this field would be the actual value of that ItemID.
Errors.LongMessage string Conditionally A more detailed description of the condition that raised the error.
Errors.SeverityCode SeverityCodeType Conditionally Indicates whether the error is a severe error (causing the request to fail) or an informational error (a warning) that should be communicated to the user.

Applicable values:

CustomCode
(out) Reserved for internal or future use.
Error
(out) The request that triggered the error was not processed successfully. When a serious application-level error occurs, the error is returned instead of the business data.

If the source of the problem is within the application (such as a missing required element), change the application before you retry the request.
  • If the problem is due to end-user input data, please alert the end-user to the problem and provide the means for them to correct the data. Once the problem in the application or data is resolved, you can attempt to re-send the request to eBay.
  • If the source of the problem is on eBay's side, An application can retry the request as-is a reasonable number of times (eBay recommends twice). If the error persists, contact Developer Technical Support. Once the problem has been resolved, the request may be resent in its original form.


See the Error handling section of the Making a Trading API call guide for more information.
Warning
(out) The request was processed successfully, but something occurred that may affect your application or the user. For example, eBay may have changed a value the user sent in. In this case, eBay returns a normal, successful response and also returns the warning.

When a warning occurs, the error is returned in addition to the business data. In this case, you do not need to retry the request (as the original request was successful). However, depending on the cause or nature of the warning, you might need to contact either the end user or eBay to effect a long term solution to the problem to prevent it from reoccurring in the future.

Code so that your app gracefully handles any future changes to this list.
Errors.ShortMessage string Conditionally A brief description of the condition that raised the error.
HardExpirationWarning string Conditionally Expiration date of the user's authentication token. Only returned within the 7-day period prior to a token's expiration. To ensure that user authentication tokens are secure and to help avoid a user's token being compromised, tokens have a limited life span. A token is only valid for a period of time (set by eBay). After this amount of time has passed, the token expires and must be replaced with a new token.
Timestamp dateTime Always This value represents the date and time when eBay processed the request. The time zone of this value is GMT and the format is the ISO 8601 date and time format (YYYY-MM-DDTHH:MM:SS.SSSZ). See the Time Values section in the eBay Features Guide for information about this time format and converting to and from the GMT time zone.

Note: GetCategories and other Trading API calls are designed to retrieve very large sets of metadata that change once a day or less often. To improve performance, these calls return cached responses when you request all available data (with no filters). When this occurs, this time value reflects the time the cached response was created. Thus, this value is not necessarily when the request was processed. However, if you specify an input filter to reduce the amount of data returned, the calls retrieve the latest data (not cached). When this occurs, this time value does reflect when the request was processed.
Version string Always The version of the response payload schema. Indicates the version of the schema that eBay used to process the request. See the Standard Data for All Calls section in the eBay Features Guide for information on using the response version when troubleshooting CustomCode values that appear in the response.



Detail Controls


DetailLevel

This call does not support varying Detail Levels. You do not need to pass DetailLevel in the request.



Samples

New to making API calls? Please see Making a Call.

Note: Some item IDs, user IDs, or other data in these samples might no longer be active on eBay. If necessary, you can substitute current eBay data in your requests.

Sample: Basic Call

Sends an invoice to the buyer of a recently sold item.

Description

The seller sold a book to b************r, and she uses SendInvoice to send an invoice to the buyer for the item.

Input

The ShippingService type must match the shipping service selected at the time of purchase, and the payment methods should match those listed with the item.

XML format.

<?xml version="1.0" encoding="utf-8"?>
<SendInvoiceRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <RequesterCredentials>
    <eBayAuthToken>A*******3</eBayAuthToken>
  </RequesterCredentials>
  <ErrorLanguage>en_US</ErrorLanguage>
  <WarningLevel>High</WarningLevel>
  <ItemID>1**********5</ItemID>
  <TransactionID>0</TransactionID>
  <ShippingServiceOptions>
    <ShippingService>USPSMedia</ShippingService>
    <ShippingServiceCost currencyID="USD">2.5</ShippingServiceCost>
    <ShippingServicePriority>1</ShippingServicePriority>
    <ExpeditedService>false</ExpeditedService>
    <ShippingTimeMin>2</ShippingTimeMin>
    <ShippingTimeMax>9</ShippingTimeMax>
  </ShippingServiceOptions> 
</SendInvoiceRequest>

Output

XML format.
<SendInvoiceResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2019-11-06T22:41:07.813Z</Timestamp>
  <Ack>Success</Ack>
  <Version>1131</Version>
  <Build>E1131_CORE_APIXO_19102180_R1</Build>
</SendInvoiceResponse>



Change History

Change Date Description
1321
2023-07-17
  • CODCost (deprecated): This field has been removed from the Trading WSDL.
1315
2023-06-16
  • CODCost (deprecated): CODCost has been deprecated since COD is no longer a supported payment method on any marketplace.
1145
2020-03-13
  • OrderID (doc change): Updated OrderID field description to state that beginning in April 2020, users will no longer be able to control whether returned order ID values for paid orders are in the old or new format, regardless of the WSDL version number and/or compatibility level. Previously, when the new order ID format was introduced in June 2019, the user could control whether they wanted to see the new or old order ID format in response payloads. Usually the SendInvoice call is used to remind buyers to pay for the order, but there could be a use case where the buyer has paid for the order, but just wants an invoice from the seller. In the case of a paid order, the seller should use the new order ID format in the OrderID field instead.
1119
2019-08-02
  • ShippingServiceOptions.ShippingSurcharge (deprecated): The ShippingSurcharge field in ShippingServiceOptionsType has been removed from the Trading WSDL. For the next 18 months, this field will still be supported if used in a SendInvoice call, but it is recommended that sellers configure shipping surcharges in Shipping rate tables instead. Shipping rate tables can be added and modified through the Shipping Preferences in My eBay. Note that this field may still get returned in 'Get' calls if configured through Shipping rate tables.
1113
2019-06-21
  • OrderID (modified): The new format of order identifier values was rolled out. Both the new and old order ID format will be accepted in request payloads to identify an eBay order. The format (old or new) that is returned in response payloads is dependent on the WSDL version and/or compatibility level. See the 1113 Release Notes for more details.
1107
2019-05-10
  • OrderID (modified): Starting in June 2019, eBay will start changing the format of order identifier values. The new format will be a non-parsable string, globally unique across all eBay marketplaces, and consistent for both single line item and multiple line item orders. To enable and use the new format, the user will need to use the 1107 WSDL (or newer as versions roll out) and set the compatibility level to 1113. There will be a nine-month transition period where the old format will still be supported.
1101
2019-03-29
  • PaymentMethods (modified): For sellers enrolled in the new eBay Managed Payments program, the only value that will be accepted in the PaymentMethods field in the request payload is 'CreditCard'.
1085
2018-10-26
  • SalesTax (doc change): Added a note stating that the seller should not provide any sales tax information if the order's buyer lives in a US state where eBay collects the sales tax from the buyer and remits it to the tax authority.
0945
2015-10-15
  • BuyerPaymentMethodCodeType (modified): Sellers can no longer specify Moneybookers, ProPay, or Paymate as values in a PaymentMethods field when adding, revising, or relisting an item. One of these values can only be used in the PaymentMethods field in a SendInvoice call if the existing listing was still supported these payment methods at listing time. Currently, sellers are not be forced to update existing listings that already feature these payment methods.
0899
2014-11-04
  • BuyerPaymentMethodCodeType (modified): 'QIWI' added as enumeration value. This payment method can only be specified on the US site and is only applicable to Russian buyers.
0849
2013-11-05
  • PaymentMethods (modified): 'CreditCard' and 'DirectDebit' added as acceptable buyer payment methods. These two values should only be used to send an invoice for an eBay Now order.
  • ShippingServiceOptions.ShippingService (modified): 'eBayNowImmediateDelivery' added as an acceptable value in the ShippingService field. This value should only be used to send an invoice for an eBay Now order.
0819
2013-04-10
  • AdjustmentAmount (added): This field allows the seller to adjust the total cost of the order. A positive dollar value passed through this field applies an extra charge to the order, and a negative dollar value passed through this field applies a discount to the order.
0791
2012-09-12
  • InternationalShippingServiceOption.ShippingService (modified): New International shipping services added for UK and DE sites as part of the EU delivery estimate project. For UK, these new enumeration values are UK_ParcelForceIntlExpress, UK_ParcelForceIntlValue, and UK_ParcelForceIntlEconomy. For DE, these new enumeration values are DE_DeutschePostBriefIntlEcon and DE_DeutschePostBriefIntlPriority.
0781
2012-07-04
  • InternationalShippingServiceOptions.ImportCharge (doc change): ImportCharge is a Global Shipping Program field, and SendInvoice is not currently compatible with the Global Shipping Program.
0777
2012-06-06
  • InternationalShippingServiceOptions.ImportCharge (added): The total cost of customs and taxes that will be applied to a item shipped internationally using the Global Exchange program. This amount is calculated and supplied for each item by the international shipping provider when a buyer views the item properties.
0719
2011-04-27
  • ShippingServiceCodeType (modified): 15 new shipping services added for the Australia and Canada sites. The nine new Australia carrier-specific shipping services include AU_AusPostRegisteredPostInternationalPaddedBag1kg, AU_AusPostRegisteredPostInternationalPaddedBag500g, AU_AusPostRegisteredPostInternationalParcel, AU_AustralianAirExpressFlatRate1kg, AU_AustralianAirExpressFlatRate3kg, AU_AustralianAirExpressFlatRate5kg, AU_AustralianAirExpressMetro15kg, AU_eBayAusPost3kgFlatRateSatchel, and AU_eBayAusPost500gFlatRateSatchel. The nine new Australia generic service level shipping services include AU_EconomyDeliveryFromOutsideAU, AU_ExpeditedDeliveryFromOutsideAU, AU_ExpressDelivery, AU_Freight, and AU_StandardDelivery. The new Canada shipping service is CA_Freight.
  • Item.ShippingDetails.ShippingServiceOptions (modified): '4' has been added as a valid integer value to account for the additional international shipping service that may be specified by the seller.
0705
2011-01-19
  • OrderLineItemID (modified): The OrderLineItemID value can now be used in Production to identify a single line item order (instead of ItemID/TransactionID pair). The OrderLineItemID value can also be passed into the OrderID field (for single line item orders only).
0693
2010-10-27
  • OrderLineItemID (added): A unique identifier for an eBay transaction, which is based upon the concatenation of ItemID and TransactionID with a hyphen in between these two IDs. If you set your request version to 705, OrderLineItemID can be used instead of ItemID and TransactionID in the request.
0635
2009-09-16
  • InsuranceDetails, InsuranceFee, InsuranceOption, InternationalInsuranceDetails, InsuranceWanted, ShippingInsuranceCost (modified): Sellers can no longer give buyers the option to purchase shipping insurance for either domestic or international items. The buyer-paid shipping insurance option has been removed from the following sites:
    BEFR, BENL, CA, CAFR, HK, IE, IN, MY, Motors, NL, PH, PL, SG, UK, US
    Insurance tags are returned only when the associated item has buyer-paid shipping insurance values.
0555
2008-03-05
  • CODCost (added): By April, on the Italy site (site ID 101), contains the cost of cash-on-delivery shipping.
0537
2007-10-31
  • BuyerPaymentMethodCodeType.PaisaPayEscrow, BuyerPaymentMethodCodeType.PaisaPayEscrowEMI (added): Now supports a new payment method PaisaPayEscrow and PaisaPayEscrowEMI for India site.