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

# Verify Payment

> Check the status of a payment session.

# Verify Payment

Check the status of a payment session created via [Create Session](/api-reference/payments/create-session).

<Note>
  For payments created via the [Charge API](/api-reference/payments/create-charge), there is no polling endpoint. Use [webhooks](/webhooks/overview) to receive real-time payment confirmations instead.
</Note>

## Path Parameters

<ParamField path="session_id" type="string" required>
  The `session_id` returned from the Create Session endpoint.
</ParamField>

## Response

```json theme={null}
{
  "success": true,
  "data": {
    "session_id": "sess_a1b2c3d4",
    "status": "completed",
    "amount": 5000,
    "currency": "USD",
    "payment_type": "one_time",
    "created_at": "2026-03-28T14:00:00.000Z",
    "completed_at": "2026-03-28T14:02:00.000Z"
  }
}
```

## Payment Statuses

| Status      | Meaning                         |
| ----------- | ------------------------------- |
| `completed` | Payment confirmed               |
| `pending`   | Still processing                |
| `expired`   | Session expired without payment |
| `failed`    | Payment failed                  |

## Confirming Charge API Payments

If you used the [Charge API](/api-reference/payments/create-charge) instead of sessions, confirm payments via [webhooks](/webhooks/overview):

1. Set your webhook URL via the dashboard or API
2. Listen for `payment.succeeded` and `payment.failed` events
3. Use the `event_id` for idempotency

See the [Webhooks Best Practices](/webhooks/best-practices) guide for implementation details.

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.khaime.com/api/v1/partner/payments/sessions/sess_a1b2c3d4 \
    -H "X-API-Key: pk_sandbox_your_key"
  ```
</RequestExample>
