Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Expected string to be id

Expected string to be id

ManishaG
Shopify Partner
4 0 0

Hello,

i'm trying to ..

admin/api/2021-04/orders/{{ORDER_ID}}/refunds/calculate.json by JS SDK method
ManishaG_1-1712142419111.png

The currency has "INR" value
But it returns the error message expected String to be a Id

Replies 2 (2)

muhammadsalmank
Shopify Partner
26 1 4

Hi,

if i am not wrong then your POST body is not right.

please change it:

you must have to provide the shipping price inside so that shopify endpoint can calculate the refunds with shipping price.

please follow this Data structure:

 

{"refund":{"currency":"USD","shipping":{"amount":2.0}}}

 

i hope this will solve your issue.

Thanks

 

ManishaG
Shopify Partner
4 0 0

Hello Muhammadsalmank, 

Thank you for you time. The problem was with the 'responseType: "json"' key-value pair. After removing it, the process worked successfully.