abuzuhri / Amazon-SP-API-CSharp

.Net C# library for the new Amazon Selling Partner API
MIT License
215 stars 191 forks source link

How to refund orders #268

Closed Tajanos closed 2 years ago

Tajanos commented 2 years ago

Hi, I am using 1.4.13 and I get this error: "This is a malformed or invalid XML document. For more details, please see http://sellercentral.amazon.com/gp/help/22971" with the attached XML.

Do you have an example of how to refund orders? I am not even sure if I should be using .ItemPriceAdjustments or .DirectPaymentAdjustments

xml.txt

abuzuhri commented 2 years ago

I can't see this url http://sellercentral.amazon.com/gp/help/22971

I don't have access to USA region .

Tajanos commented 2 years ago

It just says this:

Error 5000 This is a malformed or invalid XML document.

The XML document you are posting does not appear to be valid. Please use the appropriate XSD and plug-ins to verify the document's structure. XSDs describe the necessary structure of your XML document.

Tajanos commented 2 years ago

I've been researching this all day and there doesn't seem to be a working sample of an XML-based refund anywhere on the Internet. If anyone has one, please kindly share.

abuzuhri commented 2 years ago

Do you see this sample

https://github.com/abuzuhri/Amazon-SP-API-CSharp#feed-submit-for-change-order-adjustments

Tajanos commented 2 years ago

Yes, in my first post here I attached xml that was produced by code based on this sample.

I am wondering if anyone is able to refund orders with xml.

Tajanos commented 2 years ago

I got it to work using the MWS Scratchpad. See attached XML. It seems to want the ItemPriceAdjustments node with various Component nodes in it.

valid.txt

abuzuhri commented 2 years ago

Yes this xml was tested with one of developer who add it here also

Tajanos commented 2 years ago

Yeah, see my comment above. I am not sure about DirectPaymentAdjustments vs ItemPriceAdjustments. All the samples that I was able to find of other people doing this seem to use ItemPriceAdjustments. And the flat file also seems to require specifying various components of the refund, like the main amount, tax, shipping, shipping tax, etc.

abuzuhri commented 2 years ago

Yeah, see my comment above. I am not sure about DirectPaymentAdjustments vs ItemPriceAdjustments. All the samples that I was able to find of other people doing this seem to use ItemPriceAdjustments. And the flat file also seems to require specifying various components of the refund, like the main amount, tax, shipping, shipping tax, etc.

As i know if the XML work in MWS Scratchpad then it should work in SP API

abuzuhri commented 2 years ago

do you found the true xml feed for refund ?