> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tonder.io/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Manually Check Payment Status

While we recommend [using webhooks](/hosted-checkout/guides/setup-listen-webhooks) for real-time updates, you can also check the status of a payment at any time by polling the Tonder API.

This is useful in several cases:

* 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 the `session_id` to retrieve the entire session object, which includes the latest `status` and `transaction_status`.

Call the [Get a Session](/hosted-checkout/api/get-session) endpoint, replacing `{id}` with your `session_id`. This example demonstrates how to retrieve a session using cURL or Node.js:

<CodeGroup>
  ```bash cURL theme={null}
  # Replace with your actual session ID
  curl -X GET 'https://api-stage.tonder.io/checkout/v1/sessions/cs_97_41521_d11ba771527b4056c7f85786cfbb980bc105efaf42af113d' \
    -H 'Authorization: Token YOUR_API_KEY'
  ```

  ```javascript Node.js theme={null}
  const fetch = require('node-fetch');

  const getSessionStatus = async (sessionId) => {
    const response = await fetch(`https://api-stage.tonder.io/checkout/v1/sessions/${sessionId}`, {
      method: 'GET',
      headers: { 'Authorization': 'Token YOUR_API_KEY' }
    });
    
    const data = await response.json();
    console.log(data.status, data.transaction_status);
    return data;
  };

  // Get the session_id from your URL
  getSessionStatus("cs_97_41521_d11ba771527b4056c7f85786cfbb980bc105efaf42af113d");
  ```
</CodeGroup>

When the payment is completed, the API will return a response like this:

```json theme={null}
{
  "id": "cs_97_41521_d11ba771527b4056c7f85786cfbb980bc105efaf42af113d",
  "url": "https://stage-payflow.tonder.io/checkout/cs_97_41521_d11ba771527b4056c7f85786cfbb980bc105efaf42af113d",
  "status": "completed",
  "payment_id": 41521,
  "amount_total": 15000,
  "currency": "MXN",
  "external_id": "YOUR-UNIQUE-ORDER-ID-123",
  "transaction_status": "Success",
  "paid_at": 1751478550234
}
```

## Option 2: Get Payment Transaction Details

If you have a `payment_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](/hosted-checkout/api/get-payment) endpoint. This example shows how to retrieve payment transaction details:

```bash theme={null}
# Replace with your actual payment ID
curl -X GET 'https://api-stage.tonder.io/checkout/v1/payments/41521' \
  -H 'Authorization: Token YOUR_API_KEY'
```

The API will return detailed information about the payment transaction:

```json theme={null}
{
  "payment_id": 41521,
  "session_id": "cs_97_41521_d11ba771527b4056c7f85786cfbb980bc105efaf42af113d",
  "status": "Success",
  "amount": 15000,
  "currency": "MXN",
  "payment_method_type": "card",
  "created_at": "2025-10-20T14:30:00Z",
  "card_details": {
    "brand": "visa",
    "last4": "4242"
  }
}
```

## See Also

For more information about understanding payment statuses:

* Check the [Status Reference](/hosted-checkout/reference/status-reference) to understand the meaning of all possible `status` and `transaction_status` values, including the key differences between session and transaction statuses.
