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

# Check a card payment

> POST /card/status - where a card purchase has got to, and what was delivered.

Polls the state of a card purchase. Poll until a terminal state; treat anything
else as still moving.

## Request

<ParamField body="email" type="string" required>
  The buyer's email, the same one used to start the purchase.
</ParamField>

<ParamField body="transactionId" type="string" required>
  The id returned by [`/card/purchase`](/api-reference/card-purchase).
</ParamField>

## Response

<ResponseField name="state" type="string">
  One of:

  | State        | Meaning                                                                          | Terminal |
  | ------------ | -------------------------------------------------------------------------------- | -------- |
  | `pending`    | No transaction record yet - the buyer has not been through the hosted card page. | no       |
  | `processing` | A record exists: the payment has started and is being settled.                   | no       |
  | `completed`  | Settled. **Safe to credit the buyer.**                                           | yes      |
  | `failed`     | Cancelled or rejected.                                                           | yes      |
  | `unknown`    | The provider could not be read. **Not** a failure - keep polling.                | no       |
</ResponseField>

<ResponseField name="transactionId" type="string">
  Echo of the id you asked about.
</ResponseField>

<ResponseField name="deliveredAmount" type="string">
  What the buyer actually **received**, as a decimal string. Absent until the
  provider reports it.
</ResponseField>

<ResponseField name="deliveredCurrency" type="string">
  Which asset `deliveredAmount` is in. Read it rather than assuming.
</ResponseField>

<Warning>
  **Credit `deliveredAmount`, never the amount that was charged.** A single purchase
  carries four different figures: what the buyer typed, what the card was charged,
  what was converted after fees, and what actually landed on-chain. Only the last one
  is real. When it is absent, it is absent - do not substitute another.
</Warning>

<Note>
  `processing` is not a stalled payment. It means the money is in motion but has not
  settled; on sandbox it can stay that way indefinitely, because no chain transfer is
  ever broadcast there. See [Sandbox](/sandbox).
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "$RHEON_API/card/status" \
    -H "Content-Type: application/json" \
    -d '{
      "email": "buyer@example.com",
      "transactionId": "1022fe1d470484769"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 settled theme={null}
  {
    "state": "completed",
    "transactionId": "1022fe1d470484769",
    "deliveredAmount": "0.058231428333752800",
    "deliveredCurrency": "ETH"
  }
  ```

  ```json 200 in flight theme={null}
  {
    "state": "processing",
    "transactionId": "1022fe1d470484769"
  }
  ```
</ResponseExample>

## Errors

| HTTP | `code`            | When                                         |
| ---- | ----------------- | -------------------------------------------- |
| 400  | `invalid_request` | Missing email or transaction id.             |
| 429  | `rate_limited`    | Over the rate limit (5 requests / 10s / IP). |
| 502  | `upstream_error`  | The on-ramp is unavailable.                  |
| 500  | `internal`        | Unexpected server error.                     |
