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

# Fiat Onramp

## Onramper

Etherspot have partnered with [Onramper](https://onramper.com/)
to provide a seamless fiat onramp experience for both dapp developers
and users.

## Onramper Docs

| Docs               | Link                                                                                               |
| ------------------ | -------------------------------------------------------------------------------------------------- |
| Crypto supported   | [https://docs.onramper.com/docs/coverage-crypto](https://docs.onramper.com/docs/coverage-crypto)   |
| Networks supported | [https://docs.onramper.com/docs/coverage-network](https://docs.onramper.com/docs/coverage-network) |
| Fiat supported     | [https://docs.onramper.com/docs/coverage-fiat](https://docs.onramper.com/docs/coverage-fiat)       |
| Payment methods    | [https://docs.onramper.com/docs/coverage-payment](https://docs.onramper.com/docs/coverage-payment) |

Using the SDK, developers can easily call a function which will open
the [Onramper widget](https://buy.onramper.com/?defaultAmount=10\&defaultFiat=USD) with all the values the user wishes. These include
things such as the address of the smart contract account, the type of fiat
they want to onramp from, the amount, and the type of crypto they wish to purchase.

With the Etherspot SDK instantiated, you can simply call:

```javascript theme={null}
primeSdk.getFiatOnRamp()
```

Without any values passed in this will open the [default Onramper widget](https://buy.onramper.com/).

The Etherspot SDK offers a number of values that can be passed in to make sure the
user is directed correctly. All of these are optional.

## Optional Parameters

| Parameter             | Type    | Description                                              |
| --------------------- | ------- | -------------------------------------------------------- |
| defaultAmount         | number  | Default fiat amount to display when the widget loads     |
| defaultFiat           | string  | Default fiat currency to display when the widget loads   |
| isAmountEditable      | boolean | Default fiat currency to display when the widget loads   |
| onlyFiats             | string  | Select the specific fiat currencies to display           |
| excludeFiats          | string  | Select the specific fiat currencies to exclude           |
| defaultCrypto         | string  | Default crypto currency to display when the widget loads |
| excludeCryptos        | string  | Parameter to exclude specific crypto currencies          |
| onlyCryptos           | string  | Select the specific crypto currencies to display         |
| excludeCryptoNetworks | string  | Parameter to exclude specific crypto networks            |
| onlyCryptoNetworks    | string  | Select the specific crypto networks to display           |
| themeName             | string  | Select the theme the widget will use (dark or light)     |

So now we can tailor the widget specifically to what the dev wants their user to purchase.

In this example we want **USD** to show as the fiat.
We only want **ETH** to show as the crypto to buy.
We don't want to make the amount configurable.
We don't want the amount to be editable.

We can put together the function like this:

```javascript theme={null}
primeSdk.getFiatOnRamp(defaultFiat="USD", onlyCryptos="ETH", defaultAmount=10, isAmountEditable=false)
```

Which will generate a link like this.

**[https://buy.onramper.com/?networkWallets=ETHEREUM:0x705F9070da822804Ed045E26Bac7C3d2F8a4804C\&defaultAmount=10\&defaultFiat=USD\&onlyCryptos=ETH\&isAmountEditable=false](https://buy.onramper.com/?networkWallets=ETHEREUM:0x705F9070da822804Ed045E26Bac7C3d2F8a4804C\&defaultAmount=10\&defaultFiat=USD\&onlyCryptos=ETH\&isAmountEditable=false)**

The address will be set to the Etherspot smart account generated by the SDK.
