# Onramp Configuration

Whether the user's tenant offers card-to-crypto in an environment, and what the app needs to offer it.

## Overview

- `switchedOn` is true only when the Aurea operator switched the onramp on for your tenant in that environment **and** connected it there. When it is false, hide the onramp: `publishableKey` and `defaultSourceCurrency` are `null` and `pairs` is empty.
- `publishableKey` loads the payment widget (`StripeOnramp(publishableKey)`).
- `provenAddresses`: whether a user may also receive at an address they proved ([Address Challenge](https://docs.aureahub.com/docs/card-onramp-address-challenge.md)); false while the onramp is off.
- Each pair carries `aureaChain`, the name Aurea's wallets and `/v1/tokens/meta/chains` use, and `family` (`evm` or `solana`), so the app can pick the user's wallet for it, and `sourceCurrencies`, the fiat currencies it is sold in for that environment (see [Pairs and regions](https://docs.aureahub.com/docs/guide-card-onramp.md)): open the session in one of them.
- Answers `403` to a token without a tenant.

## Endpoint

### `GET /v1/ramp/card/config`

Authentication: bearer token required.

What the user's tenant offers through the card onramp in one environment.

**Query parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `isTestnet` | boolean | no | `true` for the sandbox (the payment provider test mode); `false` or omitted for production |

**Responses**

`200` Switched on

```json
{
  "environment": "sandbox",
  "switchedOn": true,
  "publishableKey": "pk_test_51QAbCdEfGhIjKlMnOpQrStUv",
  "defaultSourceCurrency": "eur",
  "provenAddresses": false,
  "pairs": [
    {
      "name": "usdc/ethereum",
      "currency": "usdc",
      "network": "ethereum",
      "aureaChain": "ethereum",
      "family": "evm",
      "sourceCurrencies": ["eur", "usd"]
    },
    {
      "name": "usdc/solana",
      "currency": "usdc",
      "network": "solana",
      "aureaChain": "solana",
      "family": "solana",
      "sourceCurrencies": ["usd"]
    }
  ]
}
```

`200` Switched off

```json
{
  "environment": "sandbox",
  "switchedOn": false,
  "publishableKey": null,
  "defaultSourceCurrency": null,
  "provenAddresses": false,
  "pairs": []
}
```

---

Web version: https://docs.aureahub.com/#card-onramp-config
