Question about processing a refund for developing payment apps

jessechua94
New Member
2 0 0

I have a question about developing payment apps and processing a refund in the docs here: https://shopify.dev/apps/payments/processing-a-refund#resolve-a-refund. I see between step 3 and 4, the payment app should be doing the refund for the order. Are products on the order already considered refunded by Shopify when calling your other apis?

an example for this is lets say a refund is initiated for an order with two items. One item is being refunded.

1.payment app responds with an empty 201

2.payment app calls the GET orders api to see all refunded items.

3.payment app processes the refund and responds to Shopify with resolving or rejecting the refund session

 

in step 2 of my example, would the GET orders api (https://shopify.dev/api/admin-rest/2021-10/resources/order#[get]/admin/api/2021-10/orders/{order_id}...) call return the one item being refunded under the 'refunds' key or would no refunds show up because the payments app is the one letting know when the item has actually been refunded?

A separate but related question, when would the `refunds/create` webhook be sent out in the 'processing a refund' flow? Thanks!

Replies 0 (0)