- When a customer returns to your
success_url, and you need to confirm the final payment status before showing an order confirmation. - For reconciliation scripts to check the status of pending orders.
- As a fallback if your webhook endpoint fails.
Option 1: Get Session Status
This is the most common method. Use thesession_id to retrieve the entire session object, which includes the latest status and transaction_status.
Call the Get a Session endpoint, replacing {id} with your session_id. This example demonstrates how to retrieve a session using cURL or Node.js:
Option 2: Get Payment Transaction Details
If you have apayment_id (which you can get from the session object or a webhook), you can retrieve details for that specific transaction.
Call the Get a Payment Transaction endpoint. This example shows how to retrieve payment transaction details:
See Also
For more information about understanding payment statuses:- Check the Status Reference to understand the meaning of all possible
statusandtransaction_statusvalues, including the key differences between session and transaction statuses.

