Fiat to stable

Create your first payin with BlindPay.

Get your API Key

Before you start, you need to:

  1. Create an account on BlindPay
  2. Create a development instance
  3. Create your API key

Create a Receiver

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

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

cURL
curl --request POST \
  --url https://api.blindpay.com/v1/instances/in_000000000000/receivers \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "type": "individual",
    "kyc_type": "standard",
    "email": "[email protected]",
    "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": "+1234567890",
    "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"
  }'

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.

cURL
  curl https://api.blindpay.com/v1/instances/in_000000000000/receivers/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.

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.

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.

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.