How to get the parent_id for creating a transaction for an order

We have created an order with shopify api now from the api we need to mark the order paid by creating a transaction.

Now in creating the transaction we need to pass parent_id, which I’m not able to find. How will I get the parent_id?

curl -d ‘{“transaction”:{“currency”:“USD”,“amount”:“10.00”,“kind”:“capture”,“parent_id”:389404469}}’
-X POST “https://your-development-store.myshopify.com/admin/api/2022-10/orders/450789469/transactions.json
-H “X-Shopify-Access-Token: {access_token}”
-H “Content-Type: application/json”

Hi @mukeshgmon

The parent_id required to capture a transaction should be the authorisation’s id value. We have a guide on how to capture orders with the REST admin API that might help as well.

Cheers,

Thank You very much JamesG