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:
- The shipping service and shipping options you specify are supported by the site and match those selected when the item was purchased.
- The shipping costs are positive numbers.
- The sales tax percentage is between 0 and 100.
- Any payment method you specify is supported for the site and offered with the item.
- If you supply an item ID to the call, it must be valid on the eBay site and belong to the requester.
- If you supply a transaction ID, it must be valid on the eBay site, belong to the requester, belong to the item ID, and be not more than 30 days old.
- If you supply an OrderLineItemID, it must be valid on the eBay site and not be more than 30 days old.
- If you pass in an order ID, it must be valid on the eBay site, generated by the requester, and be an active order.
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:
- Set up a sample seller and at least two buyers in the Sandbox environment.
- Sign in as the sample seller and create several listings, creating item IDs for each listing.
- Sign in as one of the sample buyers and purchase more than one item, creating an order ID.
- Sign in as another sample buyer and purchase one item, creating a transaction ID.
- 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.
- 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.
- Try the same call again, using a valid item ID but an incorrect transaction ID.
- 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.
Output Detail Controls Samples Change History |
Input
See also Samples.
The box below lists all fields that could be included in the call request. To learn more about an individual field or its type, click its name in the box (or scroll down to find it in the table below the box).
See also the Deprecated Objects link above. Fields presented in this color are deprecated, and fields presented in this color are (or soon will be) non-operational.
The XML prototype does not include requester credentials. This is a documentation limitation only (see Standard Requester Credentials for Making Calls).
<?xml version="1.0" encoding="utf-8"?> <SendInvoiceRequest xmlns="urn:ebay:apis:eBLBaseComponents"> <!-- Call-specific Input Fields --> <AdjustmentAmount currencyID="CurrencyCodeType"> AmountType (double) </AdjustmentAmount> <CheckoutInstructions> string </CheckoutInstructions> <EmailCopyToSeller> boolean </EmailCopyToSeller> <InternationalShippingServiceOptions> InternationalShippingServiceOptionsType <ShippingService> token </ShippingService> <ShippingServiceAdditionalCost currencyID="CurrencyCodeType"> AmountType (double) </ShippingServiceAdditionalCost> <ShippingServiceCost currencyID="CurrencyCodeType"> AmountType (double) </ShippingServiceCost> <ShippingServicePriority> int </ShippingServicePriority> <ShipToLocation> string </ShipToLocation> <!-- ... more ShipToLocation values allowed here ... --> </InternationalShippingServiceOptions> <!-- ... more InternationalShippingServiceOptions nodes allowed here ... --> <ItemID> ItemIDType (string) </ItemID> <OrderID> OrderIDType (string) </OrderID> <OrderLineItemID> string </OrderLineItemID> <PaymentMethods> BuyerPaymentMethodCodeType </PaymentMethods> <!-- ... more PaymentMethods values allowed here ... --> <SalesTax> SalesTaxType <SalesTaxAmount currencyID="CurrencyCodeType"> AmountType (double) </SalesTaxAmount> <SalesTaxPercent> float </SalesTaxPercent> <SalesTaxState> string </SalesTaxState> <ShippingIncludedInTax> boolean </ShippingIncludedInTax> </SalesTax> <ShippingServiceOptions> ShippingServiceOptionsType <ShippingService> token </ShippingService> <ShippingServiceAdditionalCost currencyID="CurrencyCodeType"> AmountType (double) </ShippingServiceAdditionalCost> <ShippingServiceCost currencyID="CurrencyCodeType"> AmountType (double) </ShippingServiceCost> <ShippingServicePriority> int </ShippingServicePriority> </ShippingServiceOptions> <!-- ... more ShippingServiceOptions nodes allowed here ... --> <SKU> SKUType (string) </SKU> <TransactionID> string </TransactionID> <!-- Standard Input Fields --> <ErrorLanguage> string </ErrorLanguage> <MessageID> string </MessageID> <Version> string </Version> <WarningLevel> WarningLevelCodeType </WarningLevel> </SendInvoiceRequest>
Argument | Type | Occurrence | Meaning |
---|
Call-specific Input Fields [Jump to standard fields] |
AdjustmentAmount | AmountType (double) | Conditional |
This field allows the seller to adjust the total cost of the order to account for an extra charge or to pass down a discount to the buyer. The currency used in this field must be the same currency of the listing site. A positive value in this field indicates that the amount is an extra charge being paid to the seller by the buyer, and a negative value indicates that the amount is a discount given to the buyer by the seller. |
AdjustmentAmount [ attribute currencyID ] |
CurrencyCodeType | Optional |
This field allows the seller to adjust the total cost of the order to account for an extra charge or to pass down a discount to the buyer. The currency used in this field must be the same currency of the listing site. A positive value in this field indicates that the amount is an extra charge being paid to the seller by the buyer, and a negative value indicates that the amount is a discount given to the buyer by the seller. For a list of possible enumeration values, see CurrencyCodeType. |
CheckoutInstructions | string | Optional |
This field allows the seller to provide a message or instructions regarding checkout/payment, or the return policy. Max length: 500. |
EmailCopyToSeller | boolean | Optional |
This field is included and set to true if the seller wishes to receive an email copy of the invoice sent to the buyer.Default: true. |
InternationalShippingServiceOptions | InternationalShippingServiceOptionsType | Optional,
repeatable: [0..*] |
If the buyer has an international shipping address, use this container to offer up to four international shipping service options (or five if one of the shipping service options is Global Shipping Program or eBay International Shipping). If one or more international shipping service options are offered through this container, the (domestic) ShippingServiceOptions container should not be included in the same request. |
InternationalShippingServiceOptions .ShippingService |
token | Optional |
An international shipping service being offered by the seller to ship an item to a buyer. For a list of valid values, call GeteBayDetails with DetailName set to ShippingServiceDetails. To view the full list of International shipping service options in the response, look for the ShippingService fields in the ShippingServiceDetails containers that contain a InternationalService = true field, as this indicates that the ShippingService value is an International shipping service option. The ShippingServiceDetails.ValidForSellingFlow flag must also be present. Otherwise, that particular shipping service option is no longer valid and cannot be offered to buyers through a listing. For flat and calculated shipping. See GeteBayDetails. Applicable values: See ShippingServiceCodeType |
InternationalShippingServiceOptions .ShippingServiceAdditionalCost |
AmountType (double) | Optional |
The cost of shipping each additional item if the same buyer purchases multiple quantity of the same line item. This field is required when creating a multiple-quantity, fixed-price listing. Generally, the seller will give the buyer a shipping discount if that buyer purchases multiple quantity of the item, so this value should usually be less than the value set for ShippingServiceCost. The value of this field can even be set to 0 if the seller wants to encourage buyers to buy multiple quantity of the item, or it could be that the seller can fit multiple quantities of the line item in a single shipping package, so the seller is just passing this shipping savings onto the buyer. This field is not applicable for single-quantity listings.
|
InternationalShippingServiceOptions .ShippingServiceAdditionalCost [ attribute currencyID ] |
CurrencyCodeType | Optional |
The cost of shipping each additional item if the same buyer purchases multiple quantity of the same line item. This field is required when creating a multiple-quantity, fixed-price listing. Generally, the seller will give the buyer a shipping discount if that buyer purchases multiple quantity of the item, so this value should usually be less than the value set for ShippingServiceCost. The value of this field can even be set to 0 if the seller wants to encourage buyers to buy multiple quantity of the item, or it could be that the seller can fit multiple quantities of the line item in a single shipping package, so the seller is just passing this shipping savings onto the buyer. This field is not applicable for single-quantity listings.For a list of possible enumeration values, see CurrencyCodeType. |
InternationalShippingServiceOptions .ShippingServiceCost |
AmountType (double) | Optional |
The base cost of shipping the item using the shipping service specified in the ShippingService field. In the case of a multiple-quantity, fixed-price listing, the ShippingServiceAdditionalCost field shows the cost to ship each additional item if the buyer purchases multiple quantity of the same line item. When returned by GetItemShipping, it includes the packaging and handling cost. For flat and calculated shipping. If a shipping service has been specified (even LocalPickup), GetItem returns the shipping service cost, even if the cost is zero. Otherwise, cost is not returned. If this is for calculated shipping for a listing that has not yet ended, note that the cost cannot be determined until the listing has ended and the buyer has specified a postal code. For GetItemShipping, promotional shipping savings is reflected in the cost, if applicable. If the promotional shipping option is lower than other shipping services being offered, the savings is reflected in the returned shipping cost. The shipping service named Promotional Shipping Service (or whatever is the localized name for it) is included among the shipping services. If the promotional shipping cost is lower than the cost of other shipping services being offered, it is presented first in the list. (The LOWEST shipping service cost is always presented first, regardless of whether there is promotional shipping.) See https://developer.ebay.com/api-docs/user-guides/static/trading-user-guide/shipping-types-rates.html. |
InternationalShippingServiceOptions .ShippingServiceCost [ attribute currencyID ] |
CurrencyCodeType | Optional |
The base cost of shipping the item using the shipping service specified in the ShippingService field. In the case of a multiple-quantity, fixed-price listing, the ShippingServiceAdditionalCost field shows the cost to ship each additional item if the buyer purchases multiple quantity of the same line item. When returned by GetItemShipping, it includes the packaging and handling cost. For flat and calculated shipping. If a shipping service has been specified (even LocalPickup), GetItem returns the shipping service cost, even if the cost is zero. Otherwise, cost is not returned. If this is for calculated shipping for a listing that has not yet ended, note that the cost cannot be determined until the listing has ended and the buyer has specified a postal code. For GetItemShipping, promotional shipping savings is reflected in the cost, if applicable. If the promotional shipping option is lower than other shipping services being offered, the savings is reflected in the returned shipping cost. The shipping service named Promotional Shipping Service (or whatever is the localized name for it) is included among the shipping services. If the promotional shipping cost is lower than the cost of other shipping services being offered, it is presented first in the list. (The LOWEST shipping service cost is always presented first, regardless of whether there is promotional shipping.) For a list of possible enumeration values, see CurrencyCodeType. |
InternationalShippingServiceOptions .ShippingServicePriority |
int | Optional |
This integer value controls the order (relative to other shipping services) in which the corresponding ShippingService will appear in the View Item and Checkout page. Sellers can specify up to five international shipping services (with five InternationalShippingServiceOption containers), so valid values are 1, 2, 3, 4, and 5. A shipping service with a ShippingServicePriority value of 1 appears at the top. Conversely, a shipping service with a ShippingServicePriority value of 5 appears at the bottom of a list of five shipping service options. If the Global Shipping Program is enabled on the listing for international shipping, only four additional shipping services may be specified. If this field is omitted from international shipping service options, the order of the shipping service options in View Item and Checkout pages will be determined by the order that these shipping service options are presented in the request payload of an Add/Revise/Relist call. |
InternationalShippingServiceOptions .ShipToLocation |
string | Optional,
repeatable: [0..*] |
An international location or region to where the item seller will ship the item. Use GeteBayDetails with DetailName set to ShippingLocationDetails to determine which locations are valid per site. In the GeteBayDetails response, look for the ShippingLocationDetails.ShippingLocation fields. For the AddItem family of calls, this field is required if any international shipping service is specified. For GetOrders and GetItemTransactions only: If using Trading WSDL Version 1019 or above, ShipToLocation fields will only be returned to the buyer or seller, and no longer returned at all to third parties. If using a Trading WSDL older than Version 1019, ShipToLocation fields are only returned to the buyer or seller, and a string value of Unavailable will be returned to all third parties.
See Shipping information. Applicable values: See CountryCodeType, ShippingRegionCodeType |
ItemID | ItemIDType (string) | Conditional | Unique identifier of the eBay listing. Unless OrderID or OrderLineItemID is provided in the request, the ItemID value (or SKU value) is conditionally required and must be paired with the corresponding TransactionID value to identify an order line item. For a multiple line item order, OrderID should be used. |
OrderID | OrderIDType (string) | Conditional |
A unique identifier that identifies a single line item or multiple line item order. Unless the ItemID value (or SKU value) and corresponding TransactionID value, or the OrderLineItemID value is provided in the request to identify a single line item order, the OrderID value must be specified. If OrderID value is specified, OrderLineItemID, ItemID, TransactionID, and SKU fields are ignored if present in the same request. Note: Note that the unique identifier of a 'non-immediate payment' order will change as it goes from an unpaid order to a paid order. Due to this scenario, all Trading API calls that accept Order ID values as filters in the request payload will support the identifiers for both unpaid and paid orders. Sellers can check to see if an order has been paid by looking for a value of Complete in the CheckoutStatus.Status field in the response of GetOrders call, or in the Status.CompleteStatus field in the response of GetItemTransactions or GetSellerTransactions call. Sellers should not fulfill orders until buyer has made payment. Max length: 40. |
OrderLineItemID | string | Conditional |
A unique identifier for an eBay order line item. This identifier is created as soon as there is a commitment to buy (bidder wins the auction, buyer clicks buy button, or buyer purchases item through PlaceOffer call). Unless the ItemID (or SKU) and corresponding TransactionID is used to identify a single line item order, or the OrderID is used to identify a single or multiple line item order, the OrderLineItemID must be specified. For a multiple line item order, OrderID should be used. If OrderLineItemID is specified, ItemID, TransactionID, and SKU are ignored if present in the same request. |
PaymentMethods | BuyerPaymentMethodCodeType | Optional,
repeatable: [0..*] |
This field should only be used if the seller needs to add one or more offline payment options for an order that requires/supports offline payment. A seller should not submit any online payment methods here since eBay now controls the available online payment options that are available to buyers, and not the seller.
Applicable values: |
SalesTax | SalesTaxType | Optional |
This container is used if the seller wishes to apply sales tax to the order if the buyer lives in a state/jurisdiction where sales tax is not already collected automatically by eBay and remitted to the tax authority. The amount of sales tax applied to the order is dependent on the sales tax rate in the buyer's state and whether sales tax is being applied to the cost of the order only or the cost of the order plus shipping and handling. Note: Buyers in all 50 US states and DC are automatically charged sales tax for eBay purchases, and eBay collects and remits this sales tax to the proper taxing authority on the buyer's behalf. Because of this, if a sales tax percentage rate is applied to a listing by a seller in one of these states, this field will be ignored during the checkout process. Currently, sales tax percentage rates can only be specified by sellers in Canada and 5 US territories, including American Samoa (AS), Guam (GU), Northern Mariana Islands (MP), Palau (PW), and Virgin Islands (VI). |
SalesTax.SalesTaxAmount | AmountType (double) | Optional |
The amount of sales tax calculated for an order line item based on the sale price and the sales tax rate for the buyer's tax jurisdiction. For a multiple line item order, the SalesTaxAmount returned at the order level will be the cumulative amount for all line items in the order. GetItemTransactions can return incorrect sales tax if the name of a state is not abbreviated (e.g. if the value is "Illinois" rather than "IL") in TransactionArray.Transaction.Buyer.BuyerInfo.ShippingAddress.StateOrProvince. |
SalesTax.SalesTaxAmount [ attribute currencyID ] |
CurrencyCodeType | Optional |
The amount of sales tax calculated for an order line item based on the sale price and the sales tax rate for the buyer's tax jurisdiction. For a multiple line item order, the SalesTaxAmount returned at the order level will be the cumulative amount for all line items in the order. GetItemTransactions can return incorrect sales tax if the name of a state is not abbreviated (e.g. if the value is "Illinois" rather than "IL") in TransactionArray.Transaction.Buyer.BuyerInfo.ShippingAddress.StateOrProvince. For a list of possible enumeration values, see CurrencyCodeType. |
SalesTax.SalesTaxPercent | float | Optional |
This float value is the sales tax percentage rate applicable to the corresponding tax jurisdiction (US state or Canadian province). Sellers are responsible for providing accurate sales tax rates for each jurisdiction. This sales tax rate comes into play when a buyer from that tax jurisdiction makes a purchase from the seller. The value passed in is stored with a precision of 3 digits after the decimal point (##.###). This field is only returned in order management calls if sales tax applies to the order line item, and is only in GetItem (and other 'Get' calls) if sales tax is applicable to the listing or order line item, and the seller is the person making the call. Although this field will be returned at the order level in order management calls for a single line item order, sales tax is applied at the line item level and not order level. For multiple line item orders, this field will not be returned at all at the order level. Note: Buyers in all 50 US states and DC are automatically charged sales tax for eBay purchases, and eBay collects and remits this sales tax to the proper taxing authority on the buyer's behalf. Because of this, if a sales tax percentage rate is applied to a listing by a seller in one of these states, this field will be ignored during the checkout process. Currently, sales tax percentage rates can only be specified by sellers in Canada and 5 US territories, including American Samoa (AS), Guam (GU), Northern Mariana Islands (MP), Palau (PW), and Virgin Islands (VI). |
SalesTax.SalesTaxState | string | Optional |
This is the unique, two-digit identifier of the tax jurisdiction (such as 'CA' for California). To retrieve all two-digit identifiers for all states/territories/provinces for a site, a seller can either use a GetTaxTable call with DetailLevel set to ReturnAll , or they can use the GeteBayDetails call with DetailLevel name set to TaxJurisdiction . Please note that both GetTaxTable and GeteBayDetails calls use a JurisdictionID field to express these tax jurisdiction identifiers instead of SalesTaxState, but the values used in these fields are the same. The SalesTaxState field is conditionally required in an Add/Revise/Relist/Verify call if the seller is applying sales tax to a listing for a particular jurisdiction, and is returned with each SalesTax container to identify the tax jurisdiction. |
SalesTax.ShippingIncludedInTax | boolean | Optional |
This field is included in an Add/Revise/Relist/Verify call and set to true if the seller wants sales tax for the jurisdiction to apply to the cumulative amount of item cost and shipping charges. This value defaults to false if not specified. This field is always returned with the SalesTax container (whether true or false ). Note: Buyers in all 50 US states and DC are automatically charged sales tax for eBay purchases, and eBay collects and remits this sales tax to the proper taxing authority on the buyer's behalf. Because of this, if a sales tax percentage rate is applied to a listing by a seller in one of these states, this field will be ignored during the checkout process. Currently, sales tax percentage rates can only be specified by sellers in Canada and 5 US territories, including American Samoa (AS), Guam (GU), Northern Mariana Islands (MP), Palau (PW), and Virgin Islands (VI). Default: False. |
ShippingServiceOptions | ShippingServiceOptionsType | Optional,
repeatable: [0..*] |
If the buyer has a domestic shipping address, use this container to offer up to four domestic shipping service options. If one or more domestic shipping service options are offered through this container, the InternationalShippingServiceOptions container should not be included in the same request. |
ShippingServiceOptions .ShippingService |
token | Optional |
This enumeration value indicates a specific domestic shipping service option being offered by the seller to ship an item to a buyer who is located within the same country as the item. This field is required to identify each domestic shipping service option that is specified with a ShippingServiceOptions container. For a list of valid ShippingService values, call GeteBayDetails with DetailName set to ShippingServiceDetails . The ShippingServiceDetails.ValidForSellingFlow flag must also be present. Otherwise, that particular shipping service option is no longer valid and cannot be offered to buyers through a listing.To view the full list of domestic shipping service options in the response, look for the ShippingServiceDetails.ShippingService fields. Domestic shipping service options will not have a InternationalService = true field, as this indicates that the ShippingService value is an International shipping service option.Note: The eBay standard envelope (eSE) is a domestic envelope service with tracking through eBay. This service applies to specific sub-categories of Trading Cards, and to coins & paper money, postcards, stamps, patches, and similar eligible categories, and is only available on the US marketplace. See eBay standard envelope for details, restrictions, and an envelope size template. To use this service, send envelopes using the USPS mail and set the ShippingService field to US_eBayStandardEnvelope . For the REST equivalent, see Using the eBay standard envelope (eSE) service. See GeteBayDetails. Applicable values: See ShippingServiceCodeType |
ShippingServiceOptions .ShippingServiceAdditionalCost |
AmountType (double) | Optional |
The cost of shipping each additional item if the same buyer purchases multiple quantity of the same line item. This field is required when creating a multiple-quantity, fixed-price listing. Generally, the seller will give the buyer a shipping discount if that buyer purchases multiple quantity of the item, so this value should usually be less than the value set for ShippingServiceCost. The value of this field can even be set to 0 if the seller wants to encourage buyers to buy multiple quantity of the item, or it could be that the seller can fit multiple quantities of the line item in a single shipping package, so the seller is just passing this shipping savings onto the buyer. This field is not applicable for single-quantity listings.
|
ShippingServiceOptions .ShippingServiceAdditionalCost [ attribute currencyID ] |
CurrencyCodeType | Optional |
The cost of shipping each additional item if the same buyer purchases multiple quantity of the same line item. This field is required when creating a multiple-quantity, fixed-price listing. Generally, the seller will give the buyer a shipping discount if that buyer purchases multiple quantity of the item, so this value should usually be less than the value set for ShippingServiceCost. The value of this field can even be set to 0 if the seller wants to encourage buyers to buy multiple quantity of the item, or it could be that the seller can fit multiple quantities of the line item in a single shipping package, so the seller is just passing this shipping savings onto the buyer. This field is not applicable for single-quantity listings.For a list of possible enumeration values, see CurrencyCodeType. |
ShippingServiceOptions .ShippingServiceCost |
AmountType (double) | Optional |
The base cost of shipping one unit of the item using the shipping service specified in the corresponding ShippingService field. In the case of a multiple-quantity, fixed-price listing, the ShippingServiceAdditionalCost field also becomes applicable, and shows the cost to ship each additional unit of the item if the buyer purchases multiple quantity of the same line item. Note: If the corresponding shipping service option is set as a 'free shipping' option (FreeShipping set to true ) and flat-rate shipping is being used domestically (ShippingType is set to Flat or FlatDomesticCalculatedInternational ), the seller must still include this ShippingServiceCost field and set its value to 0.0 , as eBay will not do this automatically. Do not include ShippingServiceCost when the domestic shipping service option is set to represent domestic calculated shipping (ShippingType is set to Calculated or CalculatedDomesticFlatInternational ), as error 10019 occurs. When returned by GetItemShipping, it includes the packaging and handling cost. Note that if ShippingService is set to LocalPickup , ShippingServiceCost must be set to 0.0 . Also, if a shipping service has been specified (even LocalPickup), GetItem returns the shipping service cost, even if the cost is zero. If this is for calculated shipping for a listing that has not yet ended, note that the cost cannot be determined until the listing has ended and the buyer has specified a postal code. |
ShippingServiceOptions .ShippingServiceCost [ attribute currencyID ] |
CurrencyCodeType | Optional |
The base cost of shipping one unit of the item using the shipping service specified in the corresponding ShippingService field. In the case of a multiple-quantity, fixed-price listing, the ShippingServiceAdditionalCost field also becomes applicable, and shows the cost to ship each additional unit of the item if the buyer purchases multiple quantity of the same line item. Note: If the corresponding shipping service option is set as a 'free shipping' option (FreeShipping set to true ) and flat-rate shipping is being used domestically (ShippingType is set to Flat or FlatDomesticCalculatedInternational ), the seller must still include this ShippingServiceCost field and set its value to 0.0 , as eBay will not do this automatically. Do not include ShippingServiceCost when the domestic shipping service option is set to represent domestic calculated shipping (ShippingType is set to Calculated or CalculatedDomesticFlatInternational ), as error 10019 occurs. When returned by GetItemShipping, it includes the packaging and handling cost. Note that if ShippingService is set to LocalPickup , ShippingServiceCost must be set to 0.0 . Also, if a shipping service has been specified (even LocalPickup), GetItem returns the shipping service cost, even if the cost is zero. If this is for calculated shipping for a listing that has not yet ended, note that the cost cannot be determined until the listing has ended and the buyer has specified a postal code. For a list of possible enumeration values, see CurrencyCodeType. |
ShippingServiceOptions .ShippingServicePriority |
int | Optional |
Controls the order (relative to other shipping services) in which the corresponding ShippingService will appear in the View Item and Checkout page. Sellers can specify up to four domestic shipping services (with four ShippingServiceOptions containers), so valid values are 1, 2, 3, and 4. A shipping service with a ShippingServicePriority value of 1 appears at the top. Conversely, a shipping service with a ShippingServicePriority value of 4 appears at the bottom of a list of four shipping service options. If this field is omitted from domestic shipping service options, the order of the shipping service options in View Item and Checkout pages will be determined by the order that these shipping service options are presented in the request payload of an Add/Revise/Relist call. |
SKU | SKUType (string) | Conditional |
The seller's unique identifier for an item that is being tracked by this SKU. If OrderID or OrderLineItemID are not provided, both SKU (or ItemID) and corresponding TransactionID must be provided to uniquely identify a single line item order. For a multiple line item order, OrderID must be used. This field should only be used if the Item.InventoryTrackingMethod field (set with the AddFixedPriceItem or RelistFixedPriceItem calls) is set to SKU .Max length: 50. |
TransactionID | string | Conditional |
Unique identifier for an eBay sales transaction. This identifier is created once there is a commitment from a buyer to purchase an item. Since an auction listing can only have one sales transaction during the duration of the listing, the TransactionID value for auction listings is always 0 . Note: Beginning in July 2024, non-zero transaction IDs will start being returned for auction listings. If necessary, update code to handle non-zero transaction IDs for auction transactions before this time. Unless OrderID or OrderLineItemID is provided in the request, the TransactionID value is required and must be paired with the corresponding ItemID value to identify an order line item. For a multiple line item order, OrderID should be used. |
Standard Input Fields |
ErrorLanguage | string | Optional |
Use ErrorLanguage to return error strings for the call in a different language from the language commonly associated with the site that the requesting user is registered with. Below are some examples from different countries.
|
||||||||||||||||||||||||||||||||||||||||
MessageID | string | Optional |
Most Trading API calls support a MessageID element in the request and a CorrelationID element in the response. If you pass in a MessageID in a request, the same value will be returned in the CorrelationID field in the response. Pairing these values can help you track and confirm that a response is returned for every request and to match specific responses to specific requests. If you do not pass a MessageID value in the request, CorrelationID is not returned. Note: GetCategories is designed to retrieve very large sets of metadata that change once a day or less often. To improve performance, these calls return cached responses when you request all available data (with no filters). When this occurs, the MessageID and CorrelationID fields aren't applicable. However, if you specify an input filter to reduce the amount of data returned, the calls retrieve the latest data (not cached). When this occurs, MessageID and CorrelationID are applicable. |
||||||||||||||||||||||||||||||||||||||||
Version | string | Conditional |
The version number of the API code that you are programming against (e.g., 1149). The version you specify for a call has these basic effects:
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:
|
||||||||||||||||||||||||||||||||||||||||
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 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 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. |
Input Detail Controls Samples Change History |
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: (Not all values in AckCodeType apply to this field.) Code so that your app gracefully handles any future changes to this list. |
Build | string | Always | This refers to the specific software build that eBay used when processing the request and generating the response. This includes the version number plus additional information. eBay Developer Support may request the build information when helping you resolve technical issues. |
CorrelationID | string | Conditionally |
Most Trading API calls support a MessageID element in the request and a CorrelationID element in the response. If you pass in a MessageID in a request, the same value will be returned in the CorrelationID field in the response. Pairing these values can help you track and confirm that a response is returned for every request and to match specific responses to specific requests. If you do not pass a MessageID value in the request, CorrelationID is not returned. Note: GetCategories is designed to retrieve very large sets of metadata that change once a day or less often. To improve performance, these calls return cached responses when you request all available data (with no filters). When this occurs, the MessageID and CorrelationID fields aren't applicable. However, if you specify an input filter to reduce the amount of data returned, the calls retrieve the latest data (not cached). When this occurs, MessageID and CorrelationID are applicable. |
Errors | ErrorType | Conditionally,
repeatable: [0..*] |
A list of application-level errors (if any) that occurred when eBay processed the request. |
Errors.ErrorClassification | ErrorClassificationCodeType | Conditionally |
API errors are divided between two classes: system errors and request errors.
Applicable values: Code so that your app gracefully handles any future changes to this list. |
Errors.ErrorCode | token | Conditionally |
A unique code that identifies the particular error condition that occurred. Your application can use error codes as identifiers in your customized error-handling algorithms.
See Errors By Number. |
Errors.ErrorParameters | ErrorParameterType | Conditionally,
repeatable: [0..*] |
This optional element carries a list of context-specific error variables that indicate details about the error condition. These are useful when multiple instances of ErrorType are returned. |
Errors.ErrorParameters [ attribute ParamID ] |
string | Conditionally | This optional element carries a list of context-specific error variables that indicate details about the error condition. These are useful when multiple instances of ErrorType are returned. |
Errors.ErrorParameters.Value | string | Conditionally | This is the value of the request parameter noted in the ParamID attribute. So, if the ParamID value was ItemID, the value in this field would be the actual value of that ItemID. |
Errors.LongMessage | string | Conditionally | A more detailed description of the condition that raised the error. |
Errors.SeverityCode | SeverityCodeType | Conditionally |
Indicates whether the error is a severe error (causing the request to fail) or an informational error (a warning) that should be communicated to the user.
Applicable values: If the source of the problem is within the application (such as a missing required element), change the application before you retry the request.
See the Error handling section of the Making a Trading API call guide for more information. 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. |
Input Output Samples Change History |
Detail Controls
DetailLevel
This call does not support varying Detail Levels. You do not need to pass DetailLevel in the request.
Input Output Detail Controls Change History |
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.
Sends an invoice to the buyer of a recently sold item.
Description
The seller sold a book to b************r, and she uses SendInvoice to send an invoice to the buyer for the item.
Input
The ShippingService type must match the shipping service selected at the time of purchase, and the payment methods should match those listed with the item.
XML format.
<?xml version="1.0" encoding="utf-8"?>
<SendInvoiceRequest xmlns="urn:ebay:apis:eBLBaseComponents">
<RequesterCredentials>
<eBayAuthToken>A*******3</eBayAuthToken>
</RequesterCredentials>
<ErrorLanguage>en_US</ErrorLanguage>
<WarningLevel>High</WarningLevel>
<ItemID>1**********5</ItemID>
<TransactionID>0</TransactionID>
<ShippingServiceOptions>
<ShippingService>USPSMedia</ShippingService>
<ShippingServiceCost currencyID="USD">2.5</ShippingServiceCost>
<ShippingServicePriority>1</ShippingServicePriority>
<ExpeditedService>false</ExpeditedService>
<ShippingTimeMin>2</ShippingTimeMin>
<ShippingTimeMax>9</ShippingTimeMax>
</ShippingServiceOptions>
</SendInvoiceRequest>
Output
XML format.
<SendInvoiceResponse xmlns="urn:ebay:apis:eBLBaseComponents">
<Timestamp>2019-11-06T22:41:07.813Z</Timestamp>
<Ack>Success</Ack>
<Version>1131</Version>
<Build>E1131_CORE_APIXO_19102180_R1</Build>
</SendInvoiceResponse>
Input Output Detail Controls Samples |
Change History
Change Date | Description |
---|---|
1321 2023-07-17 |
|
1315 2023-06-16 |
|
1145 2020-03-13 |
|
1119 2019-08-02 |
|
1113 2019-06-21 |
|
1107 2019-05-10 |
|
1101 2019-03-29 |
|
1085 2018-10-26 |
|
0945 2015-10-15 |
|
0899 2014-11-04 |
|
0849 2013-11-05 |
|
0819 2013-04-10 |
|
0791 2012-09-12 |
|
0781 2012-07-04 |
|
0777 2012-06-06 |
|
0719 2011-04-27 |
|
0705 2011-01-19 |
|
0693 2010-10-27 |
|
0635 2009-09-16 |
|
0555 2008-03-05 |
|
0537 2007-10-31 |
|