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?
Solved! Go to the solution
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...
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