Prerequisites
Before you begin this quickstart, ensure that you have:- Obtained an API key for Mint from Circle
- Obtained access to the Cross-Currency API
- Installed cURL on your development machine
- Linked a fiat account to your Circle Mint account
Part 1: Request a quote
To begin an onramp from fiat to USDC, you must first request a quote. Quotes have a rate guarantee until they expire.1.1. Get a list of linked fiat accounts
Retrieve a list of the fiat accounts linked to your Circle Mint account using the following request:Shell
JSON
1.2. Specify which fiat account to use
Register your local fiat account with the Cross-Currency API to make it the account that settles trades. The following is an example request to register your fiat account:Shell
JSON
1.3. Request a quote from the API
Using a UUIDv4 generator, generate a UUID to use as the idempotency key. Using the idempotency key, generate a quote for exchanging a specific amount of local currency to USDC. You must include anamount field on either the from or the
to object, but not both. The type field must be set to tradable to get a
locked rate quote. The following is an example request for a quote:
Note: Quotes are valid for 3 seconds and must be refreshed if not used in
that time frame.
Shell
JSON
Part 2: Initiate the trade
Once you have obtained a quote, you can lock in the rate by accepting it and initiating the trade. If you were building a UI for your users, you would display the quote to your users and let them confirm the trade.2.1. Create the trade
Generate another idempotency key, and then use it to confirm the quote and lock in the rate using the following example request:Shell
JSON
Part 3: Send the funds
Once your trade is created, you should send the fiat funds to Circle. Once received, the USDC is transferred to the appropriate address.3.1. Get settlement batches
Retrieve unsettled payment batches from the API using the following example request:Shell
JSON
3.2. Get payment instructions
Retrieve the settlement instructions for the currency you are using with the following example request. Note that this step only needs to be performed once, as the values are static and can be safely cached.Shell
JSON