---
title: Fiat to stable
description: Create your first payin with BlindPay.
navigation:
  order: 3
---

::c-steps

### Get your API Key

::c-prerequisites
::

### Accept Terms of Service

For testing purposes you can accept the terms of service by yourself, for production purposes **you should make your customer that is being created as a customer to accept the terms.**

::c-auth-note
::

```bash [cURL]
curl --request POST \
  --url https://api.blindpay.com/v1/e/instances/in_000000000000/tos \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "idempotency_key": "<your_uuid>"
  }'
```

After you get the url, please open it in your browser, accept the terms and get the `tos_id` following the image below. This `tos_id` is necessary for creating customers.

![https://pub-4fabf5dd55154f19a0384b16f2b816d9.r2.dev/blindpay_tos_acceptance-min.jpg](https://pub-4fabf5dd55154f19a0384b16f2b816d9.r2.dev/blindpay_tos_acceptance-min.jpg)

### Create a Customer

Run the code below in your terminal to create a new customer.

All customers on `development` instances will be automatically approved by our KYC.

::c-auth-note
::

::c-code-group

```bash [cURL]
curl --request POST \
  --url https://api.blindpay.com/v1/instances/in_000000000000/customers \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "tos_id": "<replace_with_your_tos_id>",
    "type": "individual",
    "kyc_type": "standard",
    "email": "email@example.com",
    "tax_id": "12345678",
    "address_line_1": "8 The Green",
    "address_line_2": "#12345",
    "city": "Dover",
    "state_province_region": "DE",
    "country": "US",
    "postal_code": "02050",
    "ip_address": "127.0.0.1",
    "phone_number": "+13022006100",
    "proof_of_address_doc_type": "UTILITY_BILL",
    "proof_of_address_doc_file": "https://pub-4fabf5dd55154f19a0384b16f2b816d9.r2.dev/v4-460px-Get-Proof-of-Address-Step-3-Version-2.jpg.jpeg",
    "first_name": "John",
    "last_name": "Doe",
    "date_of_birth": "1998-01-01T00:00:00Z",
    "id_doc_country": "US",
    "id_doc_type": "PASSPORT",
    "id_doc_front_file": "https://pub-4fabf5dd55154f19a0384b16f2b816d9.r2.dev/1000_F_365165797_VwQbNaD4yjWwQ6y1ENKh1xS0TXauOQvj.jpg",
    "selfie_file": "https://pub-4fabf5dd55154f19a0384b16f2b816d9.r2.dev/selfie.png"
  }'
```

::

### Add a Blockchain Wallet

In this example we're going to add an existing blockchain wallet on `Polygon Amoy Testnet`.

This blockchain wallet should be a valid one, so please replace `address` with your own information and leave `is_account_abstraction` as `true`.

::c-alert{icon="circle-info" variant="warning"}
**Attention**: BlindPay is not responsible for funds sent to wrong wallets, so please make sure you're filling the correct information.
::

::c-auth-note{customer}
::

::c-code-group

```bash [cURL]
  curl https://api.blindpay.com/v1/instances/in_000000000000/customers/re_000000000000/blockchain-wallets \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
    "name": "Wallet Display Name",
    "network": "polygon",
    "address": "0xDD6a3aD0949396e57C7738ba8FC1A46A5a1C372C",
    "is_account_abstraction": true
  }'
```

::

### Create a Payin Quote

On this step we're going to create a quote and check how much money someone is going to send in fiat money and how much stablecoins will be received.

In this case we're going to initiate a payin for `ach` payment method and `USDC` stablecoin. This mean that someone will send an ACH transfer in the US and BlindPay is going to send USDC to the wallet registered previously.

::c-auth-note
::

::c-code-group

```bash [cURL]
  curl https://api.blindpay.com/v1/instances/in_000000000000/payin-quotes \
    --request POST \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
    --data '{
    "blockchain_wallet_id": "bw_000000000000",
    "currency_type": "sender",
    "cover_fees": true,
    "request_amount": 1000,
    "payment_method": "ach",
    "token": "USDC"
  }'
```

::

### Initiate a Payin

It's mandatory to create a payin quote before initiating a payin. So now you can use the payin quote id to initiate the fiat to stablecoins transfer.

::c-alert{icon="circle-info"}
**Remember**: replace `YOUR_SECRET_TOKEN` with your API key, `in_000000000000` with your instance ID and `pq_000000000000` with your payin quote ID which you created previously.
::

::c-code-group

```bash [cURL]
  curl https://api.blindpay.com/v1/instances/in_000000000000/payins/evm \
    --request POST \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
    --data '{
    "payin_quote_id": "pq_000000000000"
  }'
```

::

And on the response of this request you will see `memo_code` and `blindpay_bank_details` which are the information that you need to share with the end user.

::c-code-group

```json [Response]
{
  // ...
  "memo_code": "12345678",
  "blindpay_bank_details": {
    "routing_number": "121145349",
    "account_number": "621327727210181",
    "account_type": "Business checking",
    "beneficiary": {
      "name": "BlindPay, Inc.",
      "address_line_1": "8 The Green, #19364",
      "address_line_2": "Dover, DE 19901"
    },
    "receiving_bank": {
      "name": "Column NA - Brex",
      "address_line_1": "1 Letterman Drive, Building A, Suite A4-700",
      "address_line_2": "San Francisco, CA 94129"
    }
  }
  // ...
}
```

::

After initiating a payin, BlindPay will monitor for incoming funds for **5 business days**. If no payment is received within this period, the transaction will be automatically cancelled. Once payment is confirmed, BlindPay will transfer the stablecoins to your registered blockchain wallet address.

::
