# 快速启动

### 一行代码即可接入 FaTPay

业务流程中增加以下 FaTPay 链接即可集成 FaTPay on-ramp 页面，并自动适配桌面端和移动端。

推荐使用2种方式集成：

#### **链接跳转方式**

<pre class="language-html" data-overflow="wrap"><code class="lang-html"><strong>&#x3C;a href="https://ramp.fatpay.xyz/home?partnerId=public" target="_blank">Buy with FaTPay&#x3C;/a>
</strong></code></pre>

以上链接使用公共合作伙伴 partnerId=public，已包含基础的配置，用户进入可享受 FaTPay 的服务，复制粘贴即可。

#### **iframe嵌入方式**

{% code overflow="wrap" %}

```html
<iframe
  src="https://ramp.fatpay.xyz/home?partnerId=public&windowOpen=1"
  allow="accelerometer; autoplay; camera; gyroscope; payment"
  width="100%"
  height="100%"
  frameborder="0"
/>
</iframe>
```

{% endcode %}

以上链接使用公共合作伙伴 partnerId=public，已包含基础的配置，用户进入可享受 FaTPay 的服务，复制粘贴即可。

{% hint style="info" %}
少部分国家支付服务商可能不支持在iframe内完成支付，建议如上追加windowOpen参数，控制FaTPay后续流程新窗口打开页面完成后续流程
{% endhint %}

棒，你已经完成了 FaTPay 的快速启动。

### 尝试进阶的配置

FaTPay 支持控件与界面的自定义，简单追加参数就可以完成配置

**如果期望这样**

* 默认选择泰语
* 指定美元
* 默认输入200美元
* 默认选择USDC（ERC20）
* 只可选择USDC（ERC20）、USDT（ERC20）

**你可以这么做**

链接方式

<pre class="language-html" data-overflow="wrap"><code class="lang-html"><strong>&#x3C;a href="https://ramp.fatpay.xyz/home?partnerId=public&#x26;language=th&#x26;defaultFiatCurrency=usd&#x26;amount=200&#x26;defaultCurrency=USDT_ERC20&#x26;cryptoCurrency=USDT_ERC20,USDC_ERC20" target="_blank">Buy with FaTPay&#x3C;/a>
</strong></code></pre>

iFrame方式

{% code overflow="wrap" %}

```html
<iframe
  src="https://ramp.fatpay.xyz/home?partnerId=public&language=th&defaultFiatCurrency=usd&amount=200&defaultCurrency=USDT_ERC20&cryptoCurrency=USDT_ERC20,USDC_ERC20"
  allow="accelerometer; autoplay; camera; gyroscope; payment"
  width="100%"
  height="100%"
  frameborder="0"
/>
</iframe>
```

{% endcode %}

你会发现URL后面追加了language、defaultFiatCurrency、amount、defaultCurrency、cryptoCurrency这些参数指定了控件的值，[点击这里看效果](https://ramp.fatpay.xyz/?partnerid=public\&windowOpen=1\&language=TH\&defaultFiatCurrency=usd\&amount=200\&defaultCurrency=USDT_ERC20,USDC_ERC20)

更多自定义能力可查看[widget-customization](https://dev.fatpay.org/zh/reference/integration-tutorial/widget-customization "mention")

**期望变更主题配色，你可以这么做**

链接方式

<pre class="language-html" data-overflow="wrap"><code class="lang-html"><strong>&#x3C;a href="https://ramp.fatpay.xyz/home?partnerId=public&#x26;theme=green" target="_blank">Buy with FaTPay&#x3C;/a>
</strong></code></pre>

iFrame方式

{% code overflow="wrap" %}

```html
<iframe
  src="https://ramp.fatpay.xyz/home?partnerId=public&windowOpen=1&theme=green"
  allow="accelerometer; autoplay; camera; gyroscope; payment"
  width="100%"
  height="100%"
  frameborder="0"
/>
</iframe>
```

{% endcode %}

你会发现URL后面追加了theme参数变更了界面的配色，[点击这里看效果](https://ramp.fatpay.xyz/?partnerid=public\&windowOpen=1\&theme=green)

更多用法可查看[interface-customization](https://dev.fatpay.org/zh/reference/integration-tutorial/interface-customization "mention")

**更多场景的最佳实践**

在快速启动方案的基础上，我们还为不同类型的项目提供了对应的最佳实践。请注意，最佳实践仅是一种参考方案，您可以根据您项目的具体情况，结合我们丰富的可配置项和 API 来做具体调整

{% content-ref url="../best-practices/exchanges" %}
[exchanges](https://dev.fatpay.org/zh/best-practices/exchanges)
{% endcontent-ref %}

{% content-ref url="../best-practices/crypto-projects" %}
[crypto-projects](https://dev.fatpay.org/zh/best-practices/crypto-projects)
{% endcontent-ref %}

{% content-ref url="../best-practices/wallets" %}
[wallets](https://dev.fatpay.org/zh/best-practices/wallets)
{% endcontent-ref %}

{% content-ref url="../best-practices/affiliate-partners" %}
[affiliate-partners](https://dev.fatpay.org/zh/best-practices/affiliate-partners)
{% endcontent-ref %}
