Announcing our $37 million Series A

Read more
BLOG

How to add USD and USDC onramps and offramps to your fintech: a stablecoin API guide

Grant EveristDecember 4, 2026
Share

This guide shows how to add USD and USDC onramps and offramps to your product with the HIFI API. Your customers send dollars from their bank account and receive USDC in their wallet, then send USDC back and receive dollars in their bank account, including on weekends over RTP.

You'll verify your customers, open virtual accounts, convert at a quoted rate, pay out, and track transfer status. The guide also covers which rails run 24/7, how to structure accounts for your customers, and what to ask any provider before you integrate.

What's in this article?

  • What is a stablecoin onramp and offramp API?
  • Before you begin
  • Build a USD and USDC integration
  • Test your integration
  • Which rails move dollars in and out 24/7?
  • Whose name is on the account
  • Beyond USDC: USDT, USDG, and PYUSD
  • What to ask a stablecoin API provider
  • FAQ
  • Next steps

What is a stablecoin onramp and offramp API?

A stablecoin onramp API converts dollars sent from a bank account into stablecoins delivered to a wallet. A stablecoin offramp API converts stablecoins into dollars and pays them out to a bank account or debit card.

Exchanges sell this conversion to individuals one purchase at a time. An API lets a platform run it for every customer it serves: open accounts, receive deposits, convert, pay out, and reconcile each transfer programmatically, inside its own product and under its own brand.

HIFI is a New York-based stablecoin payments infrastructure company. Its API covers both directions between US dollars and four stablecoins, with named virtual accounts in all 50 states and payouts over RTP, Fedwire, ACH, push to card, SWIFT and local rails.

Before you begin

You'll need sandbox API keys from the HIFI dashboard, under Developer → API Keys. Teams without dashboard access can request access, and the authentication guide covers creating and storing keys. Every example in this guide runs against https://sandbox.hifi.com/v3.

The guide uses these objects:

  • User: a customer of your platform, an individual or a business.
  • Wallet: a HIFI wallet that holds a user's stablecoins.
  • External wallet: a wallet the user controls outside HIFI, registered and screened before it can move funds.
  • Virtual account: US bank account details that convert a user's USD deposits into stablecoins.
  • External account: a user's bank account, registered as a payout destination. Card payouts use an external card.
  • Onramp: one conversion from USD to stablecoins.
  • Offramp: one conversion from stablecoins to USD, paid out to an external account or card.

Build a USD and USDC integration

Step 1: Verify your customers

Create each customer as a user. The customer first accepts HIFI's Terms of Service through a link you generate, then completes KYC, or KYB for businesses, for the USD rail before money moves.

Wallets are verified too. When a customer registers an external wallet, HIFI screens the address with Sumsub for exposure to illicit or sanctioned activity. A wallet has to clear screening before it can send or receive funds, and deposits to a virtual account linked to an uncleared wallet fail.

Step 2: Open virtual accounts

HIFI virtual accounts give each customer US bank account details that convert deposits into stablecoins. Customers fund them over Fedwire, ACH, RTP or FedNow, from their own bank or from a third party, and each deposit is converted and delivered to the wallet set on the account: a HIFI wallet, or an external wallet the customer controls. Virtual accounts are available in all 50 states.

Each virtual account is configured for one conversion pair, such as USD to USDC, and a platform can open several per customer for different stablecoins or chains. They are pass-through accounts: dollars arrive and leave as stablecoins, and customers don't hold dollar balances in them.

Create a virtual account that converts a customer's USD deposits into USDC:

curl -X POST "<https://sandbox.hifi.com/v3/virtual-accounts>" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: 3f2504e0-4f89-11d3-9a0c-0305e82c3301" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "usr_a1B2c3D4e5F6g7H8i9J0k",
    "source": { "currency": "USD", "country": "US", "transferType": "ACH" },
    "destination": { "currency": "USDC", "walletId": "wlt_fkc0E4OsfHWZPNXiPhj4q" },
    "nickname": "Customer funding account"
  }'

The response includes deposit instructions: the bank details to show your customer.

For one-off deposits, the Onramp API generates single-use deposit details for a specific transaction, matched by a reference ID the sender includes in the transfer memo.

Onramps accept US dollars. Customers need access to a USD bank account to fund one.

Step 3: Convert at a quoted rate

Deposits to a virtual account convert automatically. Offramps run on a quote. Create the offramp with the source wallet, the destination account and the amount:

curl -X POST "<https://sandbox.hifi.com/v3/offramps>" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Idempotency-Key: 9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d" \
  -H "Content-Type: application/json" \
  -d '{
    "source": { "walletId": "wlt_fkc0E4OsfHWZPNXiPhj4q", "currency": "USDC", "amount": 500 },
    "destination": { "externalAccountId": "extacct_QW1e2r3t4y", "currency": "USD" }
  }'

The offramp is created with status OPEN_QUOTE and a quote:

{
  "id": "offramp_QW1e2r3t4y",
  "status": "OPEN_QUOTE",
  "quote": {
    "sendGross": { "amount": "500", "currency": "usdc" },
    "sendNet": { "amount": "500", "currency": "usdc" },
    "receiveGross": { "amount": "500", "currency": "usd" },
    "receiveNet": { "amount": "500", "currency": "usd" },
    "rate": "1",
    "expiresAt": "2026-11-23T16:22:08.668Z"
  }
}
  • sendGross and sendNet: the stablecoins converted, before and after fees.
  • receiveGross and receiveNet: the dollars paid out, before and after fees. Check receiveNet before you accept.
  • rate: the conversion rate from stablecoin to USD.
  • expiresAt: when the quote lapses.

Accept the quote to execute:

curl -X POST "https://sandbox.hifi.com/v3/offramps/offramp_QW1e2r3t4y/quote/accept" \
  -H "Authorization: Bearer YOUR_API_KEY"

Quotes expire 10 minutes after creation. If one lapses, create a new offramp and accept the fresh quote.

Platforms can add their own developer fee to an offramp, fixed or percentage-based. It is collected in stablecoins from the source wallet before conversion.

Step 4: Pay out

An offramp pays out to a customer's registered bank account or debit card. US payout rails are RTP, which settles in real time 24/7/365; Fedwire, same day for requests before the 3:00 PM ET cut-off; same-day ACH, in three daily windows settling T+0; standard ACH, settling T+1; and push to card, running on Visa Direct.

Outside the US, HIFI sends USD SWIFT payouts to 190 countries and territories and pays out over local rails such as SEPA Instant and SPEI. → See payout coverage

For flows that should offramp without an API call per transfer, orchestration addresses attach a persistent onchain address to a payout account. Stablecoins sent to the address pay out automatically, per deposit, on a schedule, or once a set amount builds up, and any active address can also be paid out on demand. Orchestration addresses accept USDC and USDT on Ethereum, Polygon, Base and Solana, and USDT on Tron. A merchant collecting USDC from customers can point those payments at an orchestration address and receive dollars in its bank account without touching a wallet.

For treasury controls, any offramp can be created with approval required. It waits in a pending state until an authorized user approves or rejects it, and no funds move in the meantime.

Step 5: Track transfer status

An offramp moves through these statuses on the way to COMPLETED:

  • OPEN_QUOTE: the quote is ready to accept.
  • CRYPTO_INITIATED, CRYPTO_PENDING and CRYPTO_PROCESSED: the stablecoins are converted onchain.
  • FIAT_INITIATED and FIAT_PENDING: the payout is sent over the bank rail.
  • COMPLETED: the dollars are delivered to the external account.

An offramp can also stop at IN_REVIEW while transaction monitoring reviews it, at PENDING_APPROVAL when it was created with approval required, or at QUOTE_FAILED when the quote expired before acceptance. Onramps use the same status set, starting with FIAT_PENDING while the deposit settles.

Webhook events report every status change, so your ledger updates without polling. Subscribe to OFFRAMP.CREATED and OFFRAMP.STATUS.<STATUS> events and update the transfer in your ledger as each one arrives.

Register the endpoint with the event types you want, and store the signingSecret from the response, which HIFI returns only once. Each delivery carries a hifi-signature header in the form t=<timestamp>,v1=<signature>, an HMAC-SHA256 of the timestamp and the raw request body. Verify it before you update your ledger:

const crypto = require("node:crypto");
const express = require("express");
const app = express();

app.post("/webhooks/hifi", express.raw({ type: "application/json" }), (req, res) => {
  const header = req.get("hifi-signature") || "";
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const expected = crypto
    .createHmac("sha256", process.env.HIFI_SIGNING_SECRET)
    .update(`${parts.t}.${req.body}`)
    .digest("hex");

  const valid =
    parts.v1 &&
    parts.v1.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(parts.v1), Buffer.from(expected));
  if (!valid) return res.sendStatus(400);

  res.sendStatus(200);

  const event = JSON.parse(req.body);
  if (event.eventType.startsWith("OFFRAMP.STATUS.")) {
    updateLedger(event.data.id, event.data.status); // your own function
  }
});

Respond with a 2xx before you process the event. Deliveries can arrive out of order, so compare each status with what you've already stored before applying it.

If a transfer fails before the fiat leg starts (CRYPTO_FAILED), nothing leaves a HIFI wallet. If the bank payout fails after the stablecoins have moved (FIAT_FAILED), HIFI returns the stablecoins to the sender. Depending on the rail, the offramp may report FIAT_RETURNED first, and it reaches CRYPTO_RETURNED once the return confirms onchain.

On v3 endpoints, every request that creates or changes a resource accepts an Idempotency-Key header. A retry after a timeout returns the original result instead of creating a second transfer.

Test your integration

In sandbox, simulate a deposit to a virtual account to run an onramp end to end:

curl -X POST "https://sandbox.hifi.com/v3/virtual-accounts/va_BlOxjLJQbTJCdRqgSpiSo/simulate-deposits" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": "100",
    "paymentRail": "WIRE",
    "source": {
      "routingNumber": "021000021",
      "accountNumber": "1234567890",
      "name": "John Doe",
      "bankName": "Test Bank"
    }
  }'

Then force each outcome before you go live. Pass a magic value in the sandboxScenario field when you create an offramp, or when you simulate the deposit that creates an onramp. Each forced outcome resolves on its own 3 minutes later, with a webhook for every status change. Production rejects sandboxScenario.

FlowsandboxScenarioWhat happensStatuses to handle
OfframpCRYPTO_FAILEDRejected before the fiat leg startsCRYPTO_FAILED, then CRYPTO_RETURNED
OfframpFIAT_FAILEDPayout fails after the stablecoins leave the walletFIAT_FAILED, FIAT_RETURNED, CRYPTO_RETURNED
OfframpCOMPLETEDPayout lands, then is reversed after settlementCOMPLETED, FIAT_RETURNED, CRYPTO_RETURNED
OnrampFIAT_FAILEDDeposit is rejected in review before any stablecoins are deliveredFIAT_FAILED, then FIAT_RETURNED
OnrampCOMPLETEDStablecoins are delivered, then the deposit is reversedCOMPLETED, then FIAT_RETURNED
OfframpNoneQuote expires before acceptance: wait 10 minutesQUOTE_FAILED

→ Magic values reference

Check that your webhook handler updates the ledger correctly for each one.

Which rails move dollars in and out 24/7?

RailDirectionHoursSettlementPer-transaction limit
RTPIn and out24/7/365Real time10M USD
FedNowIn and out24/7/365Real time10M USD
FedwireIn and outBusiness days, 3:00 PM ET cut-offSame dayNo network cap
Same-day ACHIn and outBusiness days, three windowsT+01M USD
Standard ACHIn and outBusiness daysT+1No network cap

Limits shown are network maximums.

RTP is the rail that keeps a USD and USDC product open on weekends and bank holidays. HIFI uses it in both directions: for deposits into virtual accounts and for domestic offramps. RTP reaches banks that participate in the RTP network, and same-day ACH and Fedwire cover the rest on business days. A Fedwire or ACH request made on a Saturday is processed on the next business day.

HIFI mints and redeems USDC directly, 24/7, including weekends and bank holidays. A Saturday deposit doesn't depend on a market maker's weekend inventory to become USDC.

Whose name is on the account

A platform can structure customer funding in two ways.

With a pooled account, every customer sends dollars to one account in the platform's name, and the platform attributes each deposit by reference code or memo. This is the simpler model for a business moving its own money, or for a platform whose customers don't need accounts in their own name. The work grows with the customer base: each deposit arrives in the platform's name, a deposit with a missing memo has to be matched by hand, and the customer's bank statement shows a payment to the platform.

With named accounts, each customer funds an account in their own name. HIFI virtual accounts work this way: each one is in the name of the customer it belongs to, and a platform can open a separate virtual account for each of its customers, each with its own wallet. Every deposit identifies its owner without matching logic.

Named accounts fit platforms whose customers are businesses. Platforms that hold funds for business clients often need each deposit to arrive in the client's own name, so the client keeps control of the account while the platform runs the product on top.

Beyond USDC: USDT, USDG, and PYUSD

HIFI onramps into and offramps from four stablecoins: USDC, USDT, USDG and PYUSD. Five chains are standard: Ethereum, Polygon PoS, Solana, Base and Tron. Arbitrum, Optimism, Canton Network and Flow EVM are available on request. USDG and PYUSD run on Ethereum and Solana, and USDCx on Canton and PYUSD0 on Flow EVM are available on request.

A platform can give one customer a USD to USDC virtual account and another a USD to USDT account, or give the same customer both.

What to ask a stablecoin API provider

Under each question is HIFI's answer.

  • Which rails run on weekends, in each direction? A provider can accept deposits on Saturday and still hold payouts until Monday. HIFI runs RTP in and out 24/7/365.
  • Whose name is on the account? Pooled accounts push reconciliation onto your team. HIFI opens named virtual accounts, one per customer, each with its own wallet.
  • What happens when a payout fails? A failed bank leg should return funds without manual work. HIFI returns the stablecoins to the sender and reports it through status events.
  • What controls come built in? Idempotent requests, transfer approvals and wallet screening, with KYC and KYB reviewed by HIFI's in-house compliance team.

→ Weighing an in-house build? Read Build vs buy stablecoin on/offramps
→ Comparing providers? Read Best stablecoin infrastructure for fintechs (2026)

FAQ

What's the best API to convert USD to USDC for a payments company?

Look for an API that converts in both directions, runs on weekends, and gives each customer their own account. HIFI converts USD to USDC through named virtual accounts and pays out over RTP, Fedwire, ACH and push to card, with RTP available 24/7/365.

What's the best stablecoin onramp API for a fintech?

For a fintech, the onramp has to work for every customer, not one account. HIFI opens a named USD virtual account for each customer that converts deposits into USDC or USDT and delivers them to that customer's wallet.

How can my fintech app let users offramp USDC to a US bank account

Register the user's bank account, create an offramp from their wallet, and accept the quote. HIFI pays out over RTP in real time, or over Fedwire, same-day ACH or standard ACH, and returns the USDC if the bank payout fails.

Which providers support both USDC and USDT onramps through an API?

HIFI supports USD onramps into both USDC and USDT through its API, as well as USDG and PYUSD. A platform can open one virtual account per stablecoin for each customer.

Who offers 24/7 stablecoin onramps and offramps?

HIFI accepts deposits and sends payouts over RTP 24/7/365, including weekends and bank holidays, and mints and redeems USDC directly at any hour. Fedwire and ACH transfers follow business-day cut-offs.

How long does a USDC offramp to a US bank account take?

It depends on the rail. With HIFI, RTP settles in real time at any hour, same-day ACH settles T+0 in three daily windows, standard ACH settles T+1, and Fedwire settles same day before the 3:00 PM ET cut-off.

Can users onramp from currencies other than USD?

HIFI onramps accept US dollars. Customers need access to a USD bank account to fund a virtual account.

What is a fiat to stablecoin API?

A fiat to stablecoin API converts money sent from a bank account into stablecoins delivered to a wallet, and usually the reverse. HIFI's API handles both directions between US dollars and four stablecoins.

Next steps

→ Start building: docs.hifi.com

Related Posts