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
A developer is trying to retrieve an Order ID using only a Payment ID obtained from Shopify’s Payment Session API.
Initial Question:
Suggested Solution:
One respondent recommended:
GET /admin/api/2023-04/orders/{order_id}.json?transactionsPUT /admin/api/2023-04/orders/{order_id}.jsonRemaining Issue:
The original poster clarified that the suggested API endpoints require an Order ID as input, which creates a circular problem—they need the Order ID but only have the Payment ID. The core question of how to map Payment ID to Order ID remains unresolved.
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:
Get the Order ID: Use the Transactions API: GET /admin/api/2023-04/orders/{order_id}/transactions.json.
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