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

# Check status

> Look up the status of a payment by its reference.

**GET `/payment/status`** returns the current state of a stablecoin transaction using the `reference` used to initiate the payment. This enables you to track the progress of any payment if not using the [Webhook](/webhook) endpoint.

## Example Request

<CodeGroup>
  ```bash cURL theme={"dark"}
  curl -L \
    --request GET \
    --url 'https://api.onswitch.xyz/payment/status?reference=ccdd7666-8cb6-45d6-9caf-498b94d10929' \
    --header 'x-service-key: '"$YOUR_SERVICE_KEY" \
    --header 'Accept: */*'
  ```

  ```javascript Node.js theme={"dark"}
  const reference = 'ccdd7666-8cb6-45d6-9caf-498b94d10929';
  const params = new URLSearchParams({ reference });
  const res = await fetch(`https://api.onswitch.xyz/payment/status?${params}`, {
    method: 'GET',
    headers: {
      'x-service-key': process.env.YOUR_SERVICE_KEY,
      Accept: '*/*',
    },
  });

  const json = await res.json();
  console.log(json.data?.status, json.data?.reference);
  ```

  ```python Python theme={"dark"}
  import os, json, urllib.parse, urllib.request

  reference = "ccdd7666-8cb6-45d6-9caf-498b94d10929"
  q = urllib.parse.urlencode({"reference": reference})
  req = urllib.request.Request(
      f"https://api.onswitch.xyz/payment/status?{q}",
      method="GET",
      headers={
          "x-service-key": os.environ["YOUR_SERVICE_KEY"],
          "Accept": "*/*",
      },
  )

  with urllib.request.urlopen(req, timeout=60) as r:
      payload = json.load(r)
      data = payload.get("data") or {}
      print(data.get("status"), data.get("reference"))
  ```
</CodeGroup>

<Note>
  `reference` is required and must be the UUID used to create the payment.
</Note>

### Example Response

```json theme={"dark"}
{
  "success": true,
  "message": "Payment status fetched successfully",
  "timestamp": "2026-03-31T03:52:50.776Z",
  "data": {
    "status": "COMPLETED",
    "type": "OFFRAMP",
    "reference": "ccdd7666-8cb6-45d6-9caf-498b94d10929",
    "rate": 1408.761,
    "source": {
      "amount": 1.745636,
      "network": "BASE",
      "currency": "USDC"
    },
    "destination": {
      "amount": 2459.183917,
      "network": "FIAT",
      "currency": "NGN"
    },
    "deposit": {
      "amount": 1.745636,
      "address": "0x73E60786CA161d1BfabbaF7c7d467a0A677997aC",
      "asset": "base:usdc",
      "note": [
        "Kindly send the exact amount to the wallet address to complete the transaction.",
        "This dynamic wallet address has a 30 minutes expiry window and can only be used once."
      ]
    }
  }
}
```

<Note>
  **`status`** may be values such as `AWAITING_DEPOSIT`, `PROCESSING`, `COMPLETED`, `FAILED`, `REVERSED`, `SCHEDULED`, depending on the state of the transaction.
</Note>

## Need Help?

<CardGroup cols={2}>
  <Card title="Email Support" icon="mail" href="mailto:contact@onswitch.xyz">
    Send us a message.
  </Card>

  <Card title="Book a call" icon="calendar" href="https://calendly.com/contact-onswitch/30min">
    Hop on a call with us.
  </Card>
</CardGroup>
