| Note: The Order Adjustment API is available for testing with simulated responses in the Sandbox on April 7, 2012. The API will be available with full functionality in the Sandbox on May 7, 2012. |
Use the issueRefund call to voluntarily provide a refund to a buyer. The seller can refund the item price, the shipping cost or an additional amount for one or more line items in the order.
Currently, issueRefund may be applied to one order at a time.
If the seller determines that a buyer has overpaid for a particular order, the seller can issue a voluntary refund of the appropriate amount rather than simply rejecting the order. To issue a refund to the buyer, use the issueRefund call. With this call, the seller indicates that the payment on the order can be adjusted satisfactorily.
The issueRefund call requires the following inputs:
To optionally provide additional security to this call, specify the unique eBay user ID of the buyer in the buyerId field. This will be validated against the user ID value derived from the orderId.id field. If the values do not match, the call will fail.
To provide the buyer with additional information about any aspect of the refund, include a text message in the note field.
The issueRefund response returns the refundStatus field to indicate whether the refund was successfully issued, or failed, or is still pending.
If the call failed, eBay in some cases provides the address of an eBay website page in the errorUrl field, where seller can take certain actions that will enable the refund processing to complete.
If the refund is pending, the eBay refunds system uses the estimatedCompletionDate field to return an estimate of the date that the refund transaction will be complete.
If the refund succeeded, the response includes the following outputs:
| Output Samples Change History User Notes |
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.
<?xml version="1.0" encoding="utf-8"?>
<issueRefundRequest xmlns="http://www.ebay.com/marketplace/payment/v1/services">
<buyerId> string </buyerId>
<externalReferenceId> string </externalReferenceId>
<lineItem> RefundLineItemType
<orderLineItemId> string </orderLineItemId>
<priceLine> PriceLine
<refundAmount currencyId="string"> Amount (double) </refundAmount>
<type> PriceLineType </type>
</priceLine>
<!-- ... more priceLine nodes here ... -->
</lineItem>
<!-- ... more lineItem nodes here ... -->
<note> string </note>
<orderId> OrderIdType
<id> string </id>
</orderId>
<refundType> RefundType </refundType>
<totalRefundAmount currencyId="string"> Amount (double) </totalRefundAmount>
</issueRefundRequest>
| Argument | Type | Occurrence | Meaning |
|---|
| buyerId | string | Optional |
The unique eBay user ID of the buyer to whom the refund is being issued. Because the required orderId.Id field provides information sufficient to determine the identity of the buyer, this field is not required. The seller can employ this field as a security measure, by independently providing the buyer's user ID to validate the buyer's identity against the user ID value derived from orderId.id. If the values do not match, this issueRefund call will fail. |
| externalReferenceId | string | Required |
A unique identifier of the issueRefund request, created and maintained by the seller making the request. eBay uses externalReferenceId to distinguish this refund request from any others the seller submits for this or any other order. Example: order12345_refundrequest67890. Max length: 120. |
| lineItem | RefundLineItemType | Required,
repeatable: [1..*] |
Contains information about a single line item within an order for which the seller is issuing one or more refunds. The seller can specify as many line items as are being refunded from a single eBay order. |
| lineItem.orderLineItemId | string | Required |
A unique identifier of an eBay order line item. This field will accept an OrderLineItemID value, which is a concatenation of ItemID and TransactionID with a hyphen separating these two IDs. Note: This field will not accept an eBay OrderID value (generated by eBay for multiple line item orders). For more information about eBay orders, see the Trading API documentation. |
| lineItem.priceLine | PriceLine | Required,
repeatable: [1..*] |
Contains information about one charge component of an order line item, and the associated amount being refunded. Charge components include the purchase price, the shipping charge, and uncategorized additional amounts. The seller can specify just one or multiple priceLines for a given order line item. |
|
lineItem.priceLine .refundAmount |
Amount (double) | Required |
The amount being refunded for the order line item charge component specified by the type field. Note: The value of the currencyId attribute of this field must be the same value for totalRefundAmount and all instances of lineItem.priceLine.refundAmount throughout this call, or the call will fail. |
| lineItem.priceLine .refundAmount [ attribute currencyId ] |
string | Required |
A code representing the currency of the specified monetary amount. This must be one of the currency code types that are currently valid for use on eBay. For more information about valid currency codes, see the table. |
| lineItem.priceLine.type | PriceLineType | Required |
The order line item charge component to which this priceLine applies. The PriceLineType list specifies the possible values for type. Note: Regardless of the type specified, the amount refunded applies to the total quantity of that line item in the order. For example, if the buyer ordered three units of a particular item, and the seller is refunding the shipping price of that item, the refund will comprise the total shipping price for all three units. Applicable values: • ADDITIONAL_AMOUNT (in) A miscellaneous additional amount that the seller wishes to apply to the order line item. The seller can use the note field to provide an explanation of the additional amount. • PURCHASE_PRICE (in) The purchase price of the order line item. • SHIPPING_PRICE (in) The shipping charge for the order line item. |
| note | string | Optional |
An optional message that the seller can provide to the buyer to explain any aspect of the refund being issued, such as the purpose of a lineItem.priceLine.type value of ADDITIONAL_AMOUNT. Max length: 500. |
| orderId | OrderIdType | Required | Contains information identifying the eBay order for which the refund is being issued. |
| orderId.id | string | Required |
A unique identifier of an eBay order. This field will accept an eBay OrderID value (generated by eBay for multiple line item orders) or an OrderLineItemID value, which is a concatenation of ItemID and TransactionID with a hyphen separating these two IDs. For more information about eBay orders, see the Trading API documentation. |
| refundType | RefundType | Optional |
The basis on which the refund is being issued. Note: This optional field currently has one enumeration value, which is the default. Applicable values: • SELLER VOLUNTARY REFUND (in) The seller is issuing a refund without requiring the buyer to return the product. This is the default value of RefundType. |
| totalRefundAmount | Amount (double) | Required |
The total amount being refunded with this call. This amount should be the total of all the lineItem.priceLine.refundAmount values specified with this call. Note: The value of the currencyId attribute must be the same for totalRefundAmount as for all instances of lineItem.priceLine.refundAmount throughout this call, or the call will fail. |
| totalRefundAmount [ attribute currencyId ] |
string | Required |
A code representing the currency of the specified monetary amount. This must be one of the currency code types that are currently valid for use on eBay. For more information about valid currency codes, see the table. |
| Input Samples Change History User Notes |
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.
<?xml version="1.0" encoding="utf-8"?>
<issueRefundResponse xmlns="http://www.ebay.com/marketplace/payment/v1/services">
<!-- Standard Output Fields -->
<ack> AckValue </ack>
<errorMessage> ErrorMessage
<error> ErrorData
<errorId> long </errorId>
<message> string </message>
</error>
<!-- ... more error nodes here ... -->
</errorMessage>
<extension> ExtensionType
<contentType> string </contentType>
<id> positiveInteger </id>
<value> string </value>
<version> string </version>
</extension>
<!-- ... more extension nodes here ... -->
<timestamp> dateTime </timestamp>
<version> string </version>
<!-- Call-specific Output Fields -->
<errorUrl> string </errorUrl>
<estimatedCompletionDate> dateTime </estimatedCompletionDate>
<refundFundingSource> RefundFundingSource
<accountNumber> string </accountNumber>
<amount currencyId="string"> Amount (double) </amount>
<fundingSource> FundingSourceType </fundingSource>
<processorTransactionId> string </processorTransactionId>
</refundFundingSource>
<!-- ... more refundFundingSource nodes here ... -->
<refundStatus> RefundStatus </refundStatus>
<refundTransactionId> string </refundTransactionId>
</issueRefundResponse>
| Return Value | Type | Occurrence | Meaning |
|---|
| Standard Output Fields [Jump to call-specific fields] |
| ack | AckValue | Always |
A token representing the application-level acknowledgement code that indicates the response status (e.g., Success). The AckValue list specifies the possible values for Ack.
Applicable values: • Failure (out) The request was not processed successfully. When a serious application-level error occurs, the error is returned instead of the business data. • PartialFailure (out) The request was processed successfully, but something occurred that might affect your application or the user. See errorMessage.error to determine which portions of the request failed. • Success (out) The request was processed successfully. • Warning (out) The request was processed successfully but with some warnings. See errorMessage.error to determine the nature of the warning. |
| errorMessage | ErrorMessage | Conditionally |
Contains information for warnings or errors that occurred when eBay processed the request. Note: This field is not returned if the value of ack is Success. |
| errorMessage.error | ErrorData | Conditionally,
repeatable: [0..*] |
A container for the warning or error details. |
| errorMessage.error.errorId | long | Conditionally | A unique code that identifies the particular warning or error condition that occurred. Your application can use error codes as identifiers in your customized error- handling algorithms. |
| errorMessage.error.message | string | Conditionally | A description of the warning or error condition that occurred. |
| extension | ExtensionType | Conditionally,
repeatable: [0..*] |
This container is reserved for internal or future use. |
| extension.contentType | string | Conditionally | Reserved for internal or future use. |
| extension.id | positiveInteger | Conditionally | Reserved for internal or future use. |
| extension.value | string | Conditionally | Reserved for internal or future use. |
| extension.version | string | Conditionally | Reserved for internal or future use. |
| timestamp | dateTime | Always | The date and time that the response was returned. |
| version | string | Always | The current version number of the Order Adjustment service. |
| Call-specific Output Fields |
| errorUrl | string | Conditionally |
For some failures of this call, eBay provides this URL to a page on the eBay website, where the seller can take certain actions that will enable the refund processing to complete. Note: This field is returned only if the value of refundStatus is not Success, and an alternative payment method is available to the seller. |
| estimatedCompletionDate | dateTime | Conditionally | If the refundStatus field value is Pending when issueRefundResponse is transmitted, the eBay refunds system uses estimatedCompletionDate to return an estimate of the date that the refund transaction will be complete. |
| refundFundingSource | RefundFundingSource | Conditionally,
repeatable: [1..*] |
Contains information about the seller's source of funding for the refund. Note: This container is returned only if the value of refundStatus is Success. |
|
refundFundingSource .accountNumber |
string | Conditionally | The seller's account number with the funding source. |
| refundFundingSource.amount | Amount (double) | Conditionally | The total amount being refunded, in the currency specified by the currencyId attribute of this field. |
| refundFundingSource.amount [ attribute currencyId ] |
string | Conditionally |
A code representing the currency of the specified monetary amount. This must be one of the currency code types that are currently valid for use on eBay. For more information about valid currency codes, see the table. |
|
refundFundingSource .fundingSource |
FundingSourceType | Conditionally |
The monetary source from which the refund was made. The FundingSourceType list specifies the possible values for fundingSource.
Applicable values: • BankAccount (out) The seller's bank account that is registered with eBay. • Paypal (out) The seller's PayPal account. • Scheduled (out) The amount that the seller is due from eBay, defined as the Payout. It is the total amount for an order (including the purchase price and shipping charges) that the buyer pays. |
|
refundFundingSource .processorTransactionId |
string | Conditionally |
A string provided by the refund funding source (for example, the seller's bank or PayPal) identifying the disbursement transaction for the refund. Note: This field is returned only if the value of refundFundingSource.fundingSource is BankAccount or Paypal, and if the value of refundStatus is Success. |
| refundStatus | RefundStatus | Always |
The status of the refund transaction when issueRefundResponse is transmitted. The RefundStatus list specifies the possible values for refundStatus.
Applicable values: • Failure (out) The refund was not issued. • Pending (out) The refund is in progress, but has not yet completed. • Success (out) The refund was issued successfully. |
| refundTransactionId | string | Conditionally |
An identifier generated by eBay for the transaction. Note: This field is returned only if the value of refundStatus is Success. |
| Input Output Change History User Notes |
New to making API calls? Please see Making an API 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.
Enables a seller to voluntarily provide a refund to a buyer. The seller can refund the item price, the shipping cost or an additional amount for one or more line items in the order.
Description
This issueRefund call enables a seller to issue a refund to a buyer for a specified order. If the call is successful, a refund is disbursed to the buyer.
This call can fail for a number of reasons. The caller must be authenticated to make this call.
Input
The seller wants to refund EUR 1.04 on order line item 6546546546-65765756765, for the order with order ID 4546546546. The seller has generated the external reference ID of 34534534 to track this request. The buyer ID provided for additional security is ererterter.
XML format (HTTP POST). Also available are the .txt version of this XML and the SOAP equivalent. <?xml version="1.0" encoding="utf-8"?> <issueRefundRequest xmlns="http://www.ebay.com/marketplace/payment/v1/services"> <!-- Optional: --> <buyerId>ererterter</buyerId> <externalReferenceId>34534534</externalReferenceId> <orderId> <id>4546546546</id> </orderId> <totalRefundAmount currencyId="EUR">1.04</totalRefundAmount> <!-- Optional: --> <note>test</note> <!-- 1 or more repetitions: --> <lineItem> <orderLineItemId>6546546546-65765756765</orderLineItemId> <!-- 1 or more repetitions: --> <priceLine> <type></type> <refundAmount currencyId="EUR">1.04</refundAmount> </priceLine> </lineItem> </issueRefundRequest>
Output
The ack field indicates that the call was successful. However, the refund itself has failed with an errorId of 105522. The refund could not be issued because the seller's refund and resolution billing agreement was canceled. eBay has provided an errorUrl address where the seller can reestablish the agreement before attempting this call again.
XML format. Also available are the .txt version of this XML and the SOAP and SOAP_XML equivalents. <?xml version="1.0" encoding="UTF-8"?> <issueRefundResponse xmlns="http://www.ebay.com/marketplace/payment/v1/services"> <ack>Success</ack> <errorMessage> <error> <errorId>105522</errorId> <message>Your refund could not be processed. No money has been withdrawn from your account. Your refund could not be processed because the refund and resolution billing agreement has canceled. Please log into PayPal and reaccept the refund and resolution billing agreement to finalize the refund.</message> </error> </errorMessage> <version>1.0.0</version> <timestamp>2012-04-05T23:01:43.049Z</timestamp> <refundStatus>Failure</refundStatus> <errorUrl>https://paymentscmd.de.sandbox.ebay.com/ws/eBayISAPI.dll?OpmsUserAgreement&carid=408a06f64b5c3b9a334f0adcaba092a7</errorUrl> </issueRefundResponse>
| Input Output Samples User Notes |
| Version | Description |
|---|---|
| 1.0.0 2012-April-07 |
|
| Input Output Samples Change History User Notes |
Copyright © 2012 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.