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.

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:



Back to top

SendInvoice Input

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

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 Three-digit code representing the currency type being used.

In the AddItem family of calls, the currency can be specified in the Item.Currency field in requests instead. If you do specify this attribute in the AddItem family of calls, the value must match the site currency (i.e., it must be the same as the value in Item.Currency) unless otherwise stated.

In the AddItem family of calls, listing fees are returned in the currency of the user's registration site. For example, a user who is registered on the eBay US site always sees their fees returned in USD, even when their listing request is sent to another site, such as eBay UK or eBay Germany.

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 Three-digit code representing the currency type being used.

In the AddItem family of calls, the currency can be specified in the Item.Currency field in requests instead. If you do specify this attribute in the AddItem family of calls, the value must match the site currency (i.e., it must be the same as the value in Item.Currency) unless otherwise stated.

In the AddItem family of calls, listing fees are returned in the currency of the user's registration site. For example, a user who is registered on the eBay US site always sees their fees returned in USD, even when their listing request is sent to another site, such as eBay UK or eBay Germany.

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 Insurance cost, as set by seller, if ShippingType = 1. Specify if InsuranceOption is optional or required. Must be greater than zero value if a value of Optional or Required is passed in InsuranceOption. Value specified should be the total cost of insuring the item.

Default: 0.0.

See Determining Shipping Costs for a Listing.

InsuranceFee
  [ attribute currencyID ]
CurrencyCodeType Optional Three-digit code representing the currency type being used.

In the AddItem family of calls, the currency can be specified in the Item.Currency field in requests instead. If you do specify this attribute in the AddItem family of calls, the value must match the site currency (i.e., it must be the same as the value in Item.Currency) unless otherwise stated.

In the AddItem family of calls, listing fees are returned in the currency of the user's registration site. For example, a user who is registered on the eBay US site always sees their fees returned in USD, even when their listing request is sent to another site, such as eBay UK or eBay Germany.

For a list of possible enumeration values, see CurrencyCodeType.
InsuranceOption InsuranceOptionCodeType Optional Specifies whether an insurance fee is required. An InsuranceOption value of IncludedInShippingHandling cannot be used if the item will use calculated shipping. Some shipping carriers automatically include shipping insurance for qualifying items.


Applicable values:

•   CustomCode

(in/out) Reserved for internal or future use

•   IncludedInShippingHandling

(in/out) The seller is not charging separately for shipping insurance costs; any insurance is already included in the base shipping cost.

•   NotOffered

(in/out) The seller does not offer shipping insurance to the buyer.

•   Optional

(in/out) The seller offers the buyer the choice of paying for shipping insurance or not.

•   Required

(in/out) 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 three International shipping services. 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
Also applicable to Half.com (for GetOrders).

See Shipping.

InternationalShippingServiceOptions
  .ShippingInsuranceCost
  [ attribute currencyID ]
CurrencyCodeType Optional Three-digit code representing the currency type being used.

In the AddItem family of calls, the currency can be specified in the Item.Currency field in requests instead. If you do specify this attribute in the AddItem family of calls, the value must match the site currency (i.e., it must be the same as the value in Item.Currency) unless otherwise stated.

In the AddItem family of calls, listing fees are returned in the currency of the user's registration site. For example, a user who is registered on the eBay US site always sees their fees returned in USD, even when their listing request is sent to another site, such as eBay UK or eBay Germany.

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 beyond the first item. For input, this is required if the listing is for multiple items. For single-item listings, it should be zero (or is defaulted to zero if not provided). For flat shipping only.
InternationalShippingServiceOptions
  .ShippingServiceAdditionalCost
  [ attribute currencyID ]
CurrencyCodeType Optional Three-digit code representing the currency type being used.

In the AddItem family of calls, the currency can be specified in the Item.Currency field in requests instead. If you do specify this attribute in the AddItem family of calls, the value must match the site currency (i.e., it must be the same as the value in Item.Currency) unless otherwise stated.

In the AddItem family of calls, listing fees are returned in the currency of the user's registration site. For example, a user who is registered on the eBay US site always sees their fees returned in USD, even when their listing request is sent to another site, such as eBay UK or eBay Germany.

For a list of possible enumeration values, see CurrencyCodeType.
InternationalShippingServiceOptions
  .ShippingServiceCost
AmountType (double) Optional The meaning of this element depends on the call and on whether flat or calculated shipping has been selected. (For example, it could be the cost to ship a single item, the cost to ship all items, or the cost to ship just the first of many items, with ShippingServiceAdditionalCost accounting for the rest.) When returned by GetItemShipping, it includes the packaging and handling cost. For flat and calculated shipping.

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

See Shipping.

InternationalShippingServiceOptions
  .ShippingServiceCost
  [ attribute currencyID ]
CurrencyCodeType Optional Three-digit code representing the currency type being used.

In the AddItem family of calls, the currency can be specified in the Item.Currency field in requests instead. If you do specify this attribute in the AddItem family of calls, the value must match the site currency (i.e., it must be the same as the value in Item.Currency) unless otherwise stated.

In the AddItem family of calls, listing fees are returned in the currency of the user's registration site. For example, a user who is registered on the eBay US site always sees their fees returned in USD, even when their listing request is sent to another site, such as eBay UK or eBay Germany.

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.

This field is applicable to Flat and Calculated shipping. This field is not applicable to Half.com listings.
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.

See Specifying Locations to Where You Ship.



Applicable values: See CountryCodeType, ShippingRegionCodeType
ItemID ItemIDType (string) Conditional Unique identifier for an eBay item 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 Payment) order, OrderID should be used.
Max length: 19 (Note: The eBay database specifies 38. 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 Payment) orders.

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 Payment 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 Payment order. A Combined Payment 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 Payment) order, the OrderLineItemID must be specified. For a multiple line item (Combined Payment) 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 Container consisting of sales tax details. The amount of sales tax to add to the price of an 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.
SalesTax.SalesTaxAmount AmountType (double) Optional The amount of sales tax, calculated for an order based on the SalesTaxPercent and pricing information. US (site 0) and Motors (site 100) 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.

Applicable to Half.com (for GetOrders).
SalesTax.SalesTaxAmount
  [ attribute currencyID ]
CurrencyCodeType Optional Three-digit code representing the currency type being used.

In the AddItem family of calls, the currency can be specified in the Item.Currency field in requests instead. If you do specify this attribute in the AddItem family of calls, the value must match the site currency (i.e., it must be the same as the value in Item.Currency) unless otherwise stated.

In the AddItem family of calls, listing fees are returned in the currency of the user's registration site. For example, a user who is registered on the eBay US site always sees their fees returned in USD, even when their listing request is sent to another site, such as eBay UK or eBay Germany.

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 (##.###).

Applicable to Half.com (for GetOrders).
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.

Applicable to Half.com (for GetOrders).
SalesTax.ShippingIncludedInTax boolean Optional (US only) Whether shipping costs were part of the base amount that was taxed. Flat or calculated shipping.

Applicable to Half.com (for GetOrders).
ShippingServiceOptions ShippingServiceOptionsType Optional,
repeatable: [0..*]
If the buyer has a domestic shipping address, use this container to offer up to three 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. Also applicable to Half.com (for GetOrders).

See Determining Shipping Costs for a Listing.

ShippingServiceOptions
  .ShippingInsuranceCost
  [ attribute currencyID ]
CurrencyCodeType Optional Three-digit code representing the currency type being used.

In the AddItem family of calls, the currency can be specified in the Item.Currency field in requests instead. If you do specify this attribute in the AddItem family of calls, the value must match the site currency (i.e., it must be the same as the value in Item.Currency) unless otherwise stated.

In the AddItem family of calls, listing fees are returned in the currency of the user's registration site. For example, a user who is registered on the eBay US site always sees their fees returned in USD, even when their listing request is sent to another site, such as eBay UK or eBay Germany.

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, 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. Also applicable to Half.com (for GetOrders).

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 beyond the first item. For input, this is required if the listing is for multiple items. For single-item listings, it should be zero (or is defaulted to zero if not provided). For flat shipping only. Not applicable to Half.com.

See Determining Shipping Costs for a Listing.

ShippingServiceOptions
  .ShippingServiceAdditionalCost
  [ attribute currencyID ]
CurrencyCodeType Optional Three-digit code representing the currency type being used.

In the AddItem family of calls, the currency can be specified in the Item.Currency field in requests instead. If you do specify this attribute in the AddItem family of calls, the value must match the site currency (i.e., it must be the same as the value in Item.Currency) unless otherwise stated.

In the AddItem family of calls, listing fees are returned in the currency of the user's registration site. For example, a user who is registered on the eBay US site always sees their fees returned in USD, even when their listing request is sent to another site, such as eBay UK or eBay Germany.

For a list of possible enumeration values, see CurrencyCodeType.
ShippingServiceOptions
  .ShippingServiceCost
AmountType (double) Optional The meaning of this element depends on the call and on whether flat or calculated shipping has been selected. (For example, it could be the cost to ship a single item, the cost to ship all items, or the cost to ship just the first of many items, with ShippingServiceAdditionalCost accounting for the rest.) 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 GetMyeBaySelling, ShippingServiceCost under the SoldList and DeletedFromSoldList containers returns the cost of the domestic leg of a Global Shipping Program shipment (to the international shipping provider's warehouse).

Also applicable to Half.com (for GetOrders).

See Determining Shipping Costs for a Listing.

ShippingServiceOptions
  .ShippingServiceCost
  [ attribute currencyID ]
CurrencyCodeType Optional Three-digit code representing the currency type being used.

In the AddItem family of calls, the currency can be specified in the Item.Currency field in requests instead. If you do specify this attribute in the AddItem family of calls, the value must match the site currency (i.e., it must be the same as the value in Item.Currency) unless otherwise stated.

In the AddItem family of calls, listing fees are returned in the currency of the user's registration site. For example, a user who is registered on the eBay US site always sees their fees returned in USD, even when their listing request is sent to another site, such as eBay UK or eBay Germany.

For a list of possible enumeration values, see CurrencyCodeType.
ShippingServiceOptions
  .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 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. This field is not applicable to Half.com listings.
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 Three-digit code representing the currency type being used.

In the AddItem family of calls, the currency can be specified in the Item.Currency field in requests instead. If you do specify this attribute in the AddItem family of calls, the value must match the site currency (i.e., it must be the same as the value in Item.Currency) unless otherwise stated.

In the AddItem family of calls, listing fees are returned in the currency of the user's registration site. For example, a user who is registered on the eBay US site always sees their fees returned in USD, even when their listing request is sent to another site, such as eBay UK or eBay Germany.

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 (transaction). 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 Payment) order, OrderID should be used.
Max length: 19 (Note: The eBay database specifies 38. 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
----- -----
de_AT Austria
de_CH Switzerland
de_DE Germany
en_AU Australia
en_CA Canada
en_GB United Kingdom
en_SG Singapore
en_US United States
es_ES Spain
fr_BE Belgium (French)
fr_CA Canada (French)
fr_FR France
it_IT Italy
nl_BE Belgium (Dutch)
nl_NL Netherlands
zh_CN China
en_IN India
en_IE Ireland
zh_HK Hong Kong

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., 549). 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 in your production code.

Applicable values:

•   High

(in) Return warnings when the application passes unrecognized or deprecated elements in a request.

•   Low

(in) Do not return warnings when the application passes unrecognized or deprecated elements in a request. This is the default value if WarningLevel is not specified.


See Warning Level.



Back to top

SendInvoice Output

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

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

Applicable values:

•   CustomCode

(out) Reserved for internal or future use.

•   Failure

(out) Request processing failed

•   Success

(out) Request processing succeeded

•   Warning

(out) Request processing completed with warning information being included in the response message


(Not all values in AckCodeType apply to this field.)
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.


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 The index of the parameter in the list of parameter types returned within the error type.
Errors.ErrorParameters.Value string Conditionally The value of the variable (e.g., the attribute set ID)
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) Application-level error

•   Warning

(out) Warning or informational error


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 Time Values in the eBay Web Services 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 "Standard Data for All Calls" in the eBay Web Services Guide for information on using the response version when troubleshooting "CustomCode" values that appear in the response.



Back to top

SendInvoice Detail Controls


Detail Control: DetailLevel

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



Back to top

SendInvoice Samples

New to making API calls? Please see Routing the Request.

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 (HTTP POST). Also available is the .txt version of this XML.

<?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. Also available is the .txt version of this XML.

<SendInvoiceResponse xmlns="urn:ebay:apis:eBLBaseComponents">
  <Timestamp>2010-01-27T20:38:52.225Z</Timestamp>
  <Ack>Success</Ack>
  <Version>653</Version>
  <Build>E653_CORE_BUNDLED_10549562_R1</Build>
</SendInvoiceResponse>



Back to top

SendInvoice Change History

Version Description
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.



Back to top

User-Contributed Notes

   
 
 
 

Copyright © 2005–2013 eBay, Inc. All rights reserved. This documentation and the API may only be used in accordance with the eBay Developers Program and API License Agreement.