eBay Trading APIVersion 1039

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.

Related Information

See also the reference documentation for these calls:



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>
  <CODCost currencyID="CurrencyCodeType"> AmountType (double) </CODCost>
  <EmailCopyToSeller> boolean </EmailCopyToSeller>
  <InsuranceFee currencyID="CurrencyCodeType"> AmountType (double) </InsuranceFee>
  <InsuranceOption> InsuranceOptionCodeType </InsuranceOption>
  <InternationalShippingServiceOptions> InternationalShippingServiceOptionsType
    <ShippingInsuranceCost currencyID="CurrencyCodeType"> AmountType (double) </ShippingInsuranceCost>
    <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 ... -->
  <PayPalEmailAddress> string </PayPalEmailAddress>
  <SalesTax> SalesTaxType
    <SalesTaxAmount currencyID="CurrencyCodeType"> AmountType (double) </SalesTaxAmount>
    <SalesTaxPercent> float </SalesTaxPercent>
    <SalesTaxState> string </SalesTaxState>
    <ShippingIncludedInTax> boolean </ShippingIncludedInTax>
  </SalesTax>
  <ShippingServiceOptions> ShippingServiceOptionsType
    <ShippingInsuranceCost currencyID="CurrencyCodeType"> AmountType (double) </ShippingInsuranceCost>
    <ShippingService> token </ShippingService>
    <ShippingServiceAdditionalCost currencyID="CurrencyCodeType"> AmountType (double) </ShippingServiceAdditionalCost>
    <ShippingServiceCost currencyID="CurrencyCodeType"> AmountType (double) </ShippingServiceCost>
    <ShippingServicePriority> int </ShippingServicePriority>
    <ShippingSurcharge currencyID="CurrencyCodeType"> AmountType (double) </ShippingSurcharge>
  </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.
CODCost AmountType (double) Optional This dollar value indicates the money due from the buyer upon delivery of the item.

This field should only be specified in the SendInvoice request if 'COD' (cash-on-delivery) was the payment method selected by the buyer and it is included as the PaymentMethods value in the same request.

See Other Shipping Features.

CODCost
  [ attribute currencyID ]
CurrencyCodeType Optional This dollar value indicates the money due from the buyer upon delivery of the item.

This field should only be specified in the SendInvoice request if 'COD' (cash-on-delivery) was the payment method selected by the buyer and it is included as the PaymentMethods value in the same request.

For a list of possible enumeration values, see CurrencyCodeType.
EmailCopyToSeller boolean Optional Flag indicating whether or not the seller wishes to receive an email copy of the invoice sent to the buyer.
Default: true.
InsuranceFee AmountType (double) Optional This field is no longer applicable as it is not longer possible for a seller to offer a buyer shipping insurance.
Default: 0.0.

See Determining Shipping Costs for a Listing.

InsuranceFee
  [ attribute currencyID ]
CurrencyCodeType Optional This field is no longer applicable as it is not longer possible for a seller to offer a buyer shipping insurance.

For a list of possible enumeration values, see CurrencyCodeType.
InsuranceOption InsuranceOptionCodeType Optional This field is no longer applicable as it is not longer possible for a seller to offer a buyer shipping insurance.

Applicable values:

CustomCode
(in) Reserved for internal or future use
IncludedInShippingHandling
(in) The seller is not charging separately for shipping insurance costs; any insurance is already included in the base shipping cost.
NotOffered
(in) The seller does not offer shipping insurance to the buyer.
Optional
(in) The seller offers the buyer the choice of paying for shipping insurance or not.
Required
(in) The seller requires that the buyer pay for shipping insurance.

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

See Determining Shipping Costs for a Listing.

InternationalShippingServiceOptions InternationalShippingServiceOptionsType Optional,
repeatable: [0..*]
If the buyer has an International shipping address, use this container to offer up to four International shipping services (or five if one of them is a Global Shipping Program service). If International shipping services are offered, (domestic) ShippingServiceOptions should not be included in the request.
InternationalShippingServiceOptions
  .ShippingInsuranceCost
AmountType (double) Optional The insurance cost associated with shipping a single item with this shipping service. Exception: for GetItemShipping, this is proportional to QuantitySold. If the item has not yet been sold, insurance information cannot be calculated and the value is 0.00. For calculated shipping only.

Valid only on the following sites: AU, FR, and IT

See Shipping.

InternationalShippingServiceOptions
  .ShippingInsuranceCost
  [ attribute currencyID ]
CurrencyCodeType Optional The insurance cost associated with shipping a single item with this shipping service. Exception: for GetItemShipping, this is proportional to QuantitySold. If the item has not yet been sold, insurance information cannot be calculated and the value is 0.00. For calculated shipping only.

Valid only on the following sites: AU, FR, and IT

For a list of possible enumeration values, see CurrencyCodeType.
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 Shipping.

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.

This field is applicable to Flat and Calculated shipping.
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, GetOrderTransactions, 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 Specifying Locations to Where You Ship.



Applicable values: See CountryCodeType, ShippingRegionCodeType
ItemID ItemIDType (string) Conditional Unique identifier for an eBay listing. Unless OrderID or OrderLineItemID is provided in the request, the ItemID (or SKU) is required and must be paired with the corresponding TransactionID to identify a single line item order. For a multiple line item (Combined Invoice) order, OrderID should be used.
Max length: 19 (Note: ItemIDs are usually 9 to 12 digits).
OrderID OrderIDType (string) Conditional A unique identifier that identifies a single line item or multiple line item (Combined Invoice) order.

For a single line item order, the OrderID value is identical to the OrderLineItemID value that is generated upon creation of the order line item. For a Combined Invoice order, the OrderID value is created by eBay when the buyer or seller (sharing multiple, common order line items) combines multiple order line items into a Combined Invoice order. A Combined Invoice order can also be created by the seller through the AddOrder call.

Unless the ItemID (or SKU) and corresponding TransactionID, or the OrderLineItemID is provided in the request to identify a single line item order, the OrderID must be specified. If OrderID is specified, OrderLineItemID, ItemID, TransactionID, and SKU are ignored if present in the same request.
OrderLineItemID string Conditional A unique identifier for an eBay order line item. This field is created as soon as there is a commitment to buy from the seller, and its value is based upon the concatenation of ItemID and TransactionID, with a hyphen in between these two IDs.

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 (Combined Invoice) order, the OrderLineItemID must be specified. For a multiple line item (Combined Invoice) order, OrderID should be used. If OrderLineItemID is specified, ItemID, TransactionID, and SKU are ignored if present in the same request.
Max length: 50 (Note: ItemIDs and TransactionIDs usually consist of 9 to 12 digits.).
PaymentMethods BuyerPaymentMethodCodeType Optional,
repeatable: [0..*]
This optional field allows a US or German seller to add specific payment methods that were not in the original item listing. The only valid values for this field are 'PayPal' for a US listing, or 'MoneyXferAcceptedInCheckout' (CIP+) for a DE listing.

Applicable values: See PaymentMethods.
PayPalEmailAddress string Optional If the PaymentMethods field is used and set to PayPal, the seller provides his/her PayPal email address in this field.
SalesTax SalesTaxType Optional This container is used if the seller wishes to apply sales tax to the order. 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.
SalesTax.SalesTaxAmount AmountType (double) Optional The amount of sales tax, calculated for an order based on the SalesTaxPercent and pricing information. US and US Motors (site 0) sites only, excluding vehicle listings.

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. If the name of a state is not abbreviated, sales tax should be obtained by using the OrderLineItemID to call GetOrderTransactions.
SalesTax.SalesTaxAmount
  [ attribute currencyID ]
CurrencyCodeType Optional The amount of sales tax, calculated for an order based on the SalesTaxPercent and pricing information. US and US Motors (site 0) sites only, excluding vehicle listings.

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. If the name of a state is not abbreviated, sales tax should be obtained by using the OrderLineItemID to call GetOrderTransactions.

For a list of possible enumeration values, see CurrencyCodeType.
SalesTax.SalesTaxPercent float Optional Percent of an item's price to be charged as the sales tax for the order. The value passed in is stored with a precision of 3 digits after the decimal point (##.###).
SalesTax.SalesTaxState string Optional State or jurisdiction for which the sales tax is being collected. Only returned if the seller specified a value.

To see the valid values for your site, call GeteBayDetails with DetailName set to TaxJurisdiction, and then look for the TaxJurisdiction.JurisdictionID fields in the response.
SalesTax.ShippingIncludedInTax boolean Optional (US only) Whether shipping costs were part of the base amount that was taxed. Flat or calculated shipping.
ShippingServiceOptions ShippingServiceOptionsType Optional,
repeatable: [0..*]
If the buyer has a domestic shipping address, use this container to offer up to four domestic shipping services. If domestic shipping services are offered, InternationalShippingServiceOptions should not be included in the request.
ShippingServiceOptions
  .ShippingInsuranceCost
AmountType (double) Optional The insurance cost associated with shipping a single item with this shipping service.

Exception: For GetItemShipping, this is proportional to QuantitySold. If the item has not yet been sold, insurance information cannot be calculated and the value is 0.00. For calculated shipping only.

See Determining Shipping Costs for a Listing.

ShippingServiceOptions
  .ShippingInsuranceCost
  [ attribute currencyID ]
CurrencyCodeType Optional The insurance cost associated with shipping a single item with this shipping service.

Exception: For GetItemShipping, this is proportional to QuantitySold. If the item has not yet been sold, insurance information cannot be calculated and the value is 0.00. For calculated shipping only.

For a list of possible enumeration values, see CurrencyCodeType.
ShippingServiceOptions
  .ShippingService
token Optional A shipping service option being offered by the seller to ship an item to a buyer. 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.

For flat and calculated shipping.

If there are two or more services and one is "pickup", "pickup" must not be specified as the first 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.

See Determining Shipping Costs for a Listing.

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 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 Determining Shipping Costs for a Listing.

ShippingServiceOptions
  .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.
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.

This field is applicable to Flat and Calculated shipping.
ShippingServiceOptions
  .ShippingSurcharge
AmountType (double) Optional An additional fee to charge US buyers who have the item shipped via UPS or FedEx to Alaska, Hawaii or Puerto Rico. Can only be assigned a value for the eBay US site and for items in the Parts and Accessories category of the eBay Motors site. Only returned if set. If some line items in an order have a surcharge, surcharge is added only for those line items. Flat rate shipping only.
ShippingServiceOptions
  .ShippingSurcharge
  [ attribute currencyID ]
CurrencyCodeType Optional An additional fee to charge US buyers who have the item shipped via UPS or FedEx to Alaska, Hawaii or Puerto Rico. Can only be assigned a value for the eBay US site and for items in the Parts and Accessories category of the eBay Motors site. Only returned if set. If some line items in an order have a surcharge, surcharge is added only for those line items. Flat rate shipping only.

For a list of possible enumeration values, see CurrencyCodeType.
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 (Combined Payment) order, OrderID must be used.

This field can 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 order line item. An order line item is created once there is a commitment from a buyer to purchase an item. Since an auction listing can only have one order line item during the duration of the listing, the TransactionID for auction listings is always 0. Unless OrderID or OrderLineItemID is provided in the request, the TransactionID is required and must be paired with the corresponding ItemID to identify a single line item order. For a multiple line item (Combined Invoice) order, OrderID should be used.
Max length: 19 (Note: TransactionIDs are usually 9 to 12 digits.).
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. Specify the standard RFC 3066 language identification tag (e.g., en_US).

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

See Tags for the Identification of Languages.

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., 859). 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:
    Routing the Request (Gateway URLs)
    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.

See Error Handling.

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 the "Errors by Number" document.
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 Compatible Application Check section of the eBay Features 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

Magical Bookseller sold a book to Bountiful Buyer, 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>ABC...123</eBayAuthToken>
  </RequesterCredentials>
  <ErrorLanguage>en_US</ErrorLanguage>
  <WarningLevel>High</WarningLevel>

  <ItemID>110043277865</ItemID>
  <TransactionID>0</TransactionID>
  <PaymentMethods>PayPal</PaymentMethods>
  <PayPalEmailAddress>magicalbookseller@yahoo.com</PayPalEmailAddress>
  <ShippingServiceOptions>
    <ShippingService>USPSMedia</ShippingService>
    <ShippingServiceCost currencyID="USD">2.5</ShippingServiceCost>
    <ShippingServicePriority>1</ShippingServicePriority>
    <ExpeditedService>false</ExpeditedService>
    <ShippingTimeMin>2</ShippingTimeMin>
    <ShippingTimeMax>9</ShippingTimeMax>
  </ShippingServiceOptions>
  <SalesTax> 
    <SalesTaxPercent>8.25</SalesTaxPercent> 
    <SalesTaxState>CA</SalesTaxState> 
    <ShippingIncludedInTax>1</ShippingIncludedInTax>
    <SalesTaxAmount currencyID="USD">1.65</SalesTaxAmount> 
  </SalesTax> 
</SendInvoiceRequest>

Output

XML format.
<SendInvoiceResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2016-01-27T20:38:52.225Z</Timestamp>
  <Ack>Success</Ack>
  <Version>967</Version>
  <Build>E967_CORE_BUNDLED_10549562_R1</Build>
</SendInvoiceResponse>



Change History

Change Date Description
945
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.
899
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.
849
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.
819
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.
791
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.
781
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.
777
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.
719
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.
705
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).
693
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.
635
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.
555
2008-03-05
  • CODCost (added): By April, on the Italy site (site ID 101), contains the cost of cash-on-delivery shipping.
537
2007-10-31
  • BuyerPaymentMethodCodeType.PaisaPayEscrow, BuyerPaymentMethodCodeType.PaisaPayEscrowEMI (added): Now supports a new payment method PaisaPayEscrow and PaisaPayEscrowEMI for India site.