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

# Amounts & Currencies

> How Quidkey represents money: integer minor units and ISO 4217 currencies

The Payment API represents money in a single, consistent way: amounts are **integer minor units**, and currencies are **ISO 4217** codes. Getting this right is the single most important detail when creating a payment.

## Amounts Are Integer Minor Units

On the redirect, embedded, and hosted checkout endpoints, `amount` is an **integer** in the currency's smallest unit: pence for GBP, cents for EUR/USD. For example, `1999` = £19.99.

| Display amount | Currency | `amount` to send |
| -------------- | -------- | ---------------- |
| £19.99         | GBP      | `1999`           |
| £0.20          | GBP      | `20`             |
| €100.00        | EUR      | `10000`          |
| \$5.00         | USD      | `500`            |

```json theme={null}
{
  "amount": 1999,
  "currency": "GBP",
  "locale": "en-GB"
}
```

<Warning>
  **The 100× footgun.** Sending `20` does **not** mean £20; it means **£0.20**. To charge £20.00, send `2000`. A decimal value such as `19.99` is rejected with a `400` validation error. Always multiply major units by 100 (for two-decimal currencies) before sending.
</Warning>

To convert a display price to minor units, multiply by 100 and round to an integer:

<CodeGroup>
  ```javascript Node.js theme={null}
  // £19.99 -> 1999
  const amount = Math.round(19.99 * 100); // 1999
  ```

  ```python Python theme={null}
  # £19.99 -> 1999
  amount = round(19.99 * 100)  # 1999
  ```

  ```bash cURL theme={null}
  # £19.99 is sent as the integer 1999
  curl -X POST 'https://core.quidkey.com/api/v1/payment-requests:redirect' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -H 'Content-Type: application/json' \
    -d '{ "amount": 1999, "currency": "GBP", "locale": "en-GB" }'
  ```
</CodeGroup>

<Tip>
  Webhook payloads carry the same minor-unit **value**, but as a **JSON string**: `data.object.amount` (and the numeric `fees` fields) arrive as a stringified integer such as `"1999"`, not the number `1999`. Parse with `Number(...)` before doing arithmetic, and divide by 100 only at the presentation layer. See [Webhooks](/guides/payment-api/concepts/webhooks).
</Tip>

## Currencies Are ISO 4217

The `currency` field is an ISO 4217 currency code, for example `GBP`, `EUR`, or `USD`. The currency you send determines how `amount` is interpreted.

<Note>
  There is **no FX (currency conversion)** on the redirect payment path. The payment is created and settled in the currency you specify.
</Note>

## Legacy Decimal Endpoint

<Warning>
  The legacy `POST /api/v1/payment-requests` (v1) endpoint takes a **decimal** amount in **major** units (`"19.99"` for £19.99), not minor units. It is retained for backward compatibility only. **New integrations should use the minor-unit endpoints** ([redirect](/guides/payment-api/accept-a-payment/redirect), [embedded](/guides/payment-api/accept-a-payment/embedded), and [hosted checkout](/guides/payment-api/accept-a-payment/hosted-checkout)).
</Warning>

| Endpoint                                    | Amount format       | Example for £19.99 |
| ------------------------------------------- | ------------------- | ------------------ |
| `POST /api/v1/payment-requests:redirect`    | Integer minor units | `1999`             |
| Embedded / hosted checkout                  | Integer minor units | `1999`             |
| `POST /api/v1/payment-requests` (legacy v1) | Decimal major units | `"19.99"`          |

## Next Steps

<CardGroup cols={2}>
  <Card title="Accept a Payment (Redirect)" icon="arrow-right-arrow-left" href="/guides/payment-api/accept-a-payment/redirect">
    Create a payment with minor-unit amounts
  </Card>

  <Card title="Errors" icon="triangle-exclamation" href="/guides/payment-api/concepts/errors">
    Validation errors from bad amounts
  </Card>

  <Card title="Webhooks" icon="webhook" href="/guides/payment-api/concepts/webhooks">
    Amounts in webhook payloads
  </Card>

  <Card title="Testing" icon="flask" href="/guides/payment-api/concepts/testing">
    Try payments in the sandbox
  </Card>
</CardGroup>
