Discussing APIs and development related to customers, discounts, and order management.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hi,
I'm using NodeJs and the shopify-api-node npm package. I first call the refund calculate endpoint to get the transaction and then use that in the params to call the refund create function, but it just returns the error below. I assume I'm missing a param, but I've looked at the documentation and it seems fine. I've attached images of the code and the calculation response.
HTTPError: Response code 400 (Bad Request)
at Request.<anonymous> (/Users/caelstewart/Desktop/test-JWT/AI/node_modules/got/dist/source/as-promise/index.js:118:42)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
code: 'ERR_NON_2XX_3XX_RESPONSE',
timings: {
start: 1680890450679,
socket: 1680890450680,
lookup: 1680890450680,
connect: 1680890450690,
secureConnect: 1680890450704,
upload: 1680890450704,
response: 1680890450886,
end: 1680890450887,
error: undefined,
abort: undefined,
phases: {
wait: 1,
dns: 0,
tcp: 10,
tls: 14,
request: 0,
firstByte: 182,
download: 1,
total: 208
}
}
The code is:
Hi @caelstewart,
While the community may respond further, the official place for support with the Shopify Node JS library is the issues board for the public GitHub repository at https://github.com/Shopify/shopify-api-js/issues
Hope you have a great day
Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog