Development discussions around Shopify APIs
Hello,
is there possibility a refund has multiple transactions?
We are integrating shopify with ERP so we were checking for unique id so we wanted to confirm if a refund has one transaction always of kind refund or multiple. Also refund created_at and transaction created_at will be always same?
Thanks,
Solved! Go to the solution
This is an accepted solution.
Since most orders are paid for with a single payment type (e.g. - a single credit card). To validate the various scenarios it would be advisable to go into a test or development store, create an order paid for with multiple payment types, and then process the refund against the same payment types. See how that looks in the API when you query the refund...
I would assume that one refund can only be processed for one order. Although an order can have multiple line items that are refunded, as far as I'm aware a single refund can't be created against multiple orders.
I see what you mean now. If you have a test or development store then you can try some different scenarios with refunds in the web admin and see how they look when querying via the API. One scenario that would break a one-to-one relationship would be if an order was paid with multiple payment types. A refund generated against the same payment types I would assume appear in an array of transactions, right?
This is an accepted solution.
Since most orders are paid for with a single payment type (e.g. - a single credit card). To validate the various scenarios it would be advisable to go into a test or development store, create an order paid for with multiple payment types, and then process the refund against the same payment types. See how that looks in the API when you query the refund...
Hey @pooja_zakhariya,
Orders can definitely contain multiple refund transactions, so you'll need to account for multiple refunds in your app.
This is a use-case that's happened a few times with my own store:
- Customer complains because shipment is delayed, I offer discount on shipping cost (by refunding shipping amount)
- Package gets lost or customer changes their mind, so I process a full refund for the remaining amount
JB | Solutions Engineer @ Shopify
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Yes, In case of multiple payment there are multiple transaction under single refund.
Thanks for suggestion.
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023