Fiat On & Off-Ramp

Learn how to exchange local fiat for stablecoins and vice versa.

Before You Begin

Make sure to read more about Float Accounts, Daily Net Settlement, and Supported Fiat and Crypto to learn how we provide a near-instantaneous on & off-ramping experience for your users.

Fiat On-Ramp

In the following example, we will be exchanging Chilean Pesos (CLP) for USDC.

Create 10000 CLP <> USDC Quote

1. Make a POST request to https://sandbox.conduit.financial/quotes with the following body:

Copy
Copied
{
  "data": {
    "attributes": {
      "source": {
        "assetType": "asset:fiat:CLP",
        "amount": "10000000000"
      },
      "target": {
        "assetType": "asset:eth:USDC"
      }
    }
  }
}

2. If successful, you will see a similar response from the API:

Tip

Quotes are valid for 4 minutes. Please also note down the quote id and amount to be used in the next step.

Copy
Copied
{
  "data": {
    "id": "id:quote:2JHnGDjZputjFOCwHIVDNA4Uftr",
    "type": "quote",
    "attributes": {
      "source": {
        "assetType": "asset:fiat:CLP",
        "amount": "10000000000"
      },
      "target": {
        "assetType": "asset:eth:USDC",
        "amount": "12370806"
      },
      "expiresAt": "2022-12-22T21:17:17.276Z",
      "status": "open"
    }
  },
  "links": {
    "self": "/quotes/id:quote:2JHnGDjZputjFOCwHIVDNA4Uftr"
  }
}

Accept Quote

1. Make a POST request to https://sandbox.conduit.financial/transactions with the following body, but:

  • Replace quote with your generated quote id
  • Replace destination with your allocation id
  • Replace amount with the amount from the generated quote
Copy
Copied
{
  "data": {
    "attributes": {
      "quote": "id:quote:2JHnGDjZputjFOCwHIVDNA4Uftr",
      "source": "wlt:fiat:2IEdAlD1KKXLW7AEjCgmRsDzyxN",
      "destination": "id:allc:2J8OkA50iEKCUdAP64xbgU14Irf",
      "assetType": "asset:eth:USDC",
      "amount": "12370806"
    }
  }
}

2. If successful, you will see a similar response from the API:

Copy
Copied
{
    "data": {
        "id": "id:trxn:2JHnLopbIRvx7a7KMzEYF7McDlv",
        "type": "transaction",
        "attributes": {
            "createdAt": "2022-12-22T21:17:04.338Z",
            "createdBy": "client",
            "effectiveDate": "2022-12-23",
            "amount": "12370806",
            "source": "wlt:fiat:2IEdAlD1KKXLW7AEjCgmRsDzyxN",
            "destination": "id:allc:2J8OkA50iEKCUdAP64xbgU14Irf",
            "status": "pending",
            "assetType": "asset:eth:USDC",
            "quote": "id:quote:2JHnGDjZputjFOCwHIVDNA4Uftr"
        },
        "relationships": {
            "source": {
                "links": {
                    "self": "/transactions/id:trxn:2JHnLopbIRvx7a7KMzEYF7McDlv/relationships/source",
                    "related": "/transactions/id:trxn:2JHnLopbIRvx7a7KMzEYF7McDlv/source"
                },
                "data": {
                    "id": "wlt:fiat:2IEdAlD1KKXLW7AEjCgmRsDzyxN",
                    "type": "wallet"
                }
            },
            "destination": {
                "links": {
                    "self": "/transactions/id:trxn:2JHnLopbIRvx7a7KMzEYF7McDlv/relationships/destination",
                    "related": "/transactions/id:trxn:2JHnLopbIRvx7a7KMzEYF7McDlv/destination"
                },
                "data": {
                    "id": "id:allc:2J8OkA50iEKCUdAP64xbgU14Irf",
                    "type": "allocation"
                }
            },
            "quote": {
                "links": {
                    "self": "/transactions/id:trxn:2JHnLopbIRvx7a7KMzEYF7McDlv/relationships/quote",
                    "related": "/transactions/id:trxn:2JHnLopbIRvx7a7KMzEYF7McDlv/quote"
                },
                "data": {
                    "id": "id:quote:2JHnGDjZputjFOCwHIVDNA4Uftr",
                    "type": "quote"
                }
            }
        }
    }
}

Check Balance

You should now see the quoted USDC amount added to your account. Let's verify this by querying the account and looking at the balance.

Tip

There is an intentional delay of up to 10 minutes for the USDC deposit in our Sandbox environment to give you a sense of our settlement process that happens in our Live environment. Learn more about our settlement process and how we can give your users a near instant experience using Float accounts.

1. Make a GET request to https://sandbox.conduit.financial/accounts/id:acct:{your_account_id} with your account id.

2. If successful, you will see a response from the API that shows the balance increased by the transferred quoted amount:

Copy
Copied
{
  "data": {
    "id": "id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE",
    "type": "account",
    "attributes": {
      "balances": {
        "available": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "12370806"
          }
        ],
        "pending": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "0"
          }
        ]
      },
      "wallets": [
        {
          "assetType": "asset:eth:USDC",
          "networkId": "net:eth:ropsten",
          "address": "wlt:eth:0x274ed96d9c5c612dc6bcd36150e3ab7c87de7425"
        }
      ]
    },
    "relationships": {
      "account-holders": {
        "links": {
          "self": "/accounts/id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE/relationships/account-holders",
          "related": "/accounts/id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE/account-holders"
        },
        "data": [
          {
            "id": "id:ahl:2J8Ocs7KFZJt3CMPi9f0x8UCCQ0",
            "type": "account-holder"
          }
        ]
      },
      "allocations": {
        "links": {
          "next": null,
          "self": "/accounts/id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE/relationships/allocations",
          "related": "/accounts/id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE/allocations"
        },
        "data": [
          {
            "id": "id:allc:2J8OkA50iEKCUdAP64xbgU14Irf",
            "type": "allocation"
          }
        ]
      }
    }
  },
  "included": [
    {
      "id": "id:allc:2J8OkA50iEKCUdAP64xbgU14Irf",
      "poolName": "default_pool_usdc",
      "balances": {
        "available": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "12370806"
          }
        ],
        "pending": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "0"
          }
        ],
        "accruedYield": [
          {
            "assetType": "asset:eth:USDC",
            "amount": "0"
          }
        ]
      }
    }
  ]
}

Fiat Off-Ramp

In the following example, we will be exchanging USDC for Chilean Pesos (CLP).

Create 10 USDC <> CLP Quote

1. Make a POST request to https://sandbox.conduit.financial/quotes with the following body:

Copy
Copied
{
  "data": {
    "attributes": {
      "source": {
        "assetType": "asset:eth:USDC",
        "amount": "10000000"
      },
      "target": {
        "assetType": "asset:fiat:CLP"
      }
    }
  }
}

2. If successful, you will see a similar response from the API:

Tip

Quotes are valid for 4 minutes. Please also note down the quote id and amount to be used in the next step.

Copy
Copied
{
  "data": {
    "id": "id:quote:2JHqkOy9Ww9TGeIpFNVjJ9oFHkd",
    "type": "quote",
    "attributes": {
      "source": {
        "assetType": "asset:eth:USDC",
        "amount": "10000000"
      },
      "target": {
        "assetType": "asset:fiat:CLP",
        "amount": "8393116000"
      },
      "expiresAt": "2022-12-22T21:45:57.908Z",
      "status": "open"
    }
  },
  "links": {
    "self": "/quotes/id:quote:2JHqkOy9Ww9TGeIpFNVjJ9oFHkd"
  }
}

Accept Quote

1. Make a POST request to https://sandbox.conduit.financial/transactions with the following body, but:

  • Replace quote with your generated quote id
  • Replace source with your allocation id
Copy
Copied
{
  "data": {
    "attributes": {
      "quote": "id:quote:2JHqkOy9Ww9TGeIpFNVjJ9oFHkd",
      "source": "id:allc:2JEtgy38BDntal10u4QtcKVTecr",
      "destination": "wlt:fiat:2IEdAlD1KKXLW7AEjCgmRsDzyxN",
      "assetType": "asset:eth:USDC",
      "amount": "10000000"
    }
  }
}

2. If successful, you will see a similar response from the API:

Copy
Copied
{
    "data": {
        "id": "id:trxn:2JHqnKPOouVtf7dVYvBbGt4o96x",
        "type": "transaction",
        "attributes": {
            "createdAt": "2022-12-22T21:45:24.853Z",
            "createdBy": "client",
            "effectiveDate": "2022-12-23",
            "amount": "10000000",
            "source": "id:allc:2JEtgy38BDntal10u4QtcKVTecr",
            "destination": "wlt:fiat:2IEdAlD1KKXLW7AEjCgmRsDzyxN",
            "status": "pending",
            "assetType": "asset:eth:USDC",
            "quote": "id:quote:2JHqkOy9Ww9TGeIpFNVjJ9oFHkd"
        },
        "relationships": {
            "source": {
                "links": {
                    "self": "/transactions/id:trxn:2JHqnKPOouVtf7dVYvBbGt4o96x/relationships/source",
                    "related": "/transactions/id:trxn:2JHqnKPOouVtf7dVYvBbGt4o96x/source"
                },
                "data": {
                    "id": "id:allc:2JEtgy38BDntal10u4QtcKVTecr",
                    "type": "allocation"
                }
            },
            "destination": {
                "links": {
                    "self": "/transactions/id:trxn:2JHqnKPOouVtf7dVYvBbGt4o96x/relationships/destination",
                    "related": "/transactions/id:trxn:2JHqnKPOouVtf7dVYvBbGt4o96x/destination"
                },
                "data": {
                    "id": "wlt:fiat:2IEdAlD1KKXLW7AEjCgmRsDzyxN",
                    "type": "wallet"
                }
            },
            "quote": {
                "links": {
                    "self": "/transactions/id:trxn:2JHqnKPOouVtf7dVYvBbGt4o96x/relationships/quote",
                    "related": "/transactions/id:trxn:2JHqnKPOouVtf7dVYvBbGt4o96x/quote"
                },
                "data": {
                    "id": "id:quote:2JHqkOy9Ww9TGeIpFNVjJ9oFHkd",
                    "type": "quote"
                }
            }
        }
    }
}

Check Balance

You should now see the USDC amount deducted from your account. Let's verify this by querying the account and looking at the balance.

1. Make a GET request to https://sandbox.conduit.financial/accounts/id:acct:{your_account_id} with your account id.

2. If successful, you will see a response from the API that shows the balance decreased by the transferred amount:

Copy
Copied
{
  "data": {
    "id": "id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE",
    "type": "account",
    "attributes": {
      "balances": {
        "available": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "2370806"
          }
        ],
        "pending": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "0"
          }
        ]
      },
      "wallets": [
        {
          "assetType": "asset:eth:USDC",
          "networkId": "net:eth:ropsten",
          "address": "wlt:eth:0x274ed96d9c5c612dc6bcd36150e3ab7c87de7425"
        }
      ]
    },
    "relationships": {
      "account-holders": {
        "links": {
          "self": "/accounts/id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE/relationships/account-holders",
          "related": "/accounts/id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE/account-holders"
        },
        "data": [
          {
            "id": "id:ahl:2J8Ocs7KFZJt3CMPi9f0x8UCCQ0",
            "type": "account-holder"
          }
        ]
      },
      "allocations": {
        "links": {
          "next": null,
          "self": "/accounts/id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE/relationships/allocations",
          "related": "/accounts/id:acct:2J8Ok1bfIrvpNcX2V8QwDMigUKE/allocations"
        },
        "data": [
          {
            "id": "id:allc:2J8OkA50iEKCUdAP64xbgU14Irf",
            "type": "allocation"
          }
        ]
      }
    }
  },
  "included": [
    {
      "id": "id:allc:2J8OkA50iEKCUdAP64xbgU14Irf",
      "poolName": "default_pool_usdc",
      "balances": {
        "available": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "2370806"
          }
        ],
        "pending": [
          {
            "assetType": "asset:eth:ETH",
            "amount": "0"
          },
          {
            "assetType": "asset:eth:USDC",
            "amount": "0"
          }
        ],
        "accruedYield": [
          {
            "assetType": "asset:eth:USDC",
            "amount": "0"
          }
        ]
      }
    }
  ]
}

Next Steps

Now that you know how to on and off-ramp fiat, learn how to transfer and make payments.