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.
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 |
|---|
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.
[ 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.
Max length: 500.
true if the seller wishes to receive an email copy of the invoice sent to the buyer.Default: true.
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.
.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
.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.
.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.
.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.
.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.
.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.
.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
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.
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.
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:
Note: To see if this enumeration value is a supported payment method for a site and category, call GetCategoryFeatures specifying the listing category ID and including the FeatureID field set to
PaymentMethods. Note: To see if this enumeration value is a supported payment method for a site and category, call GetCategoryFeatures specifying the listing category ID and including the FeatureID field set to
PaymentMethods. Note: To see if this enumeration value is a supported payment method for a site and category, call GetCategoryFeatures specifying the listing category ID and including the FeatureID field set to
PaymentMethods. Note: To see if this enumeration value is a supported payment method for a site and category, call GetCategoryFeatures specifying the listing category ID and including the FeatureID field set to
PaymentMethods. 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).
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.
[ 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.
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).
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.
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.
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.
.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
.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.
.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.
.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.
.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.
.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.
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.
0. Note: Historically, TransactionID values have been '0' for auction listings, and some developers may have built logic around this. However, non-zero TransactionID values for auction listings started being used for some eBay marketplaces beginning in July 2024, and all eBay marketplaces are expected to start using non-zero TransactionID values for auction listings in the near future. If necessary, developers should update code to handle non-zero transaction IDs for auction transactions.
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.
| 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. |
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 |
|---|
Applicable values:
(Not all values in AckCodeType apply to this field.)
Code so that your app gracefully handles any future changes to this list.
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.
repeatable: [0..*] A list of application-level errors (if any) that occurred when eBay processed the request.
Applicable values:
Code so that your app gracefully handles any future changes to this list.
See Errors By Number.
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.
[ 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.
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.
- If the problem is due to end-user input data, please alert the end-user to the problem and provide the means for them to correct the data. Once the problem in the application or data is resolved, you can attempt to re-send the request to eBay.
- If the source of the problem is on eBay's side, An application can retry the request as-is a reasonable number of times (eBay recommends twice). If the error persists, contact Developer Technical Support. Once the problem has been resolved, the request may be resent in its original form.
See the Error handling section of the Making a Trading API call guide for more information.
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.
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.
Detail Controls
DetailLevel
This call does not support varying Detail Levels. You do not need to pass DetailLevel in the request.
Samples
New to making API calls? Please see Making a Call.
Note: Some item IDs, user IDs, or other data in these samples might no longer be active on eBay. If necessary, you can substitute current eBay data in your requests.
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月06日T22:41:07.813Z</Timestamp>
<Ack>Success</Ack>
<Version>1131</Version>
<Build>E1131_CORE_APIXO_19102180_R1</Build>
</SendInvoiceResponse>
Change History
| Change Date | Description |
|---|---|
| 1321 2023年07月17日 |
|
| 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日 |
|