This article shares a possible use case your app could support, as well as an example flow. You're certainly not limited to this use case, but it can be a helpful jumping off point as you plan your app's implementation.
Your app can retrieve details about payments and refunds associated with an order. For example, you can check for payments that were made by credit-card, payments made by gift card, or orders that were not successfully refunded.
To retrieve info about an order's transactions:
If you are importing orders from other systems, you may want to add payment records to those orders. To add a payment record to an order that is already in the eCommerce system:
createdDate
, amount
, paymentMethod
, and any other payment details.