How to get Order ID using the Payment ID?

Shopify payment session API gives the Payment ID. How I will get the Order ID using this Payment ID?
How I will update payment detail for order on Shopify?

Kindly guide me.

Thanks

To get the Order ID using the Payment ID from the Shopify Payment Session API, you can query the transactions endpoint. For updating payment details for an order:

  1. Get the Order ID: Use the Transactions API: GET /admin/api/2023-04/orders/{order_id}/transactions.json.

  2. Update Payment Details: Use the Order API: PUT /admin/api/2023-04/orders/{order_id}.json with the updated payment details in the request body.

Ensure you have the necessary API permissions to perform these actions

Hi
Thanks for Reply.

I have checked the API URL’s you have provided. But these URL’s used the Order ID. My first question is that How to get that order ID from Payment ID.
Kindly guide for that.

Thanks