> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onboard.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Stablecoin Account

As a fintech, you can use Onboard to provide stablecoin-powered accounts to
your customers while Onboard handles the heavy lifting of dealing with the
blockchain, security, and compliance.

Depending on your needs, choose one of the following approaches.

## Approach 1: Use Onboard's ledger

Use Onboard's ledger directly to manage a stablecoin-backed virtual account
per customer.

<Steps>
  <Step title="Create a sub-account per customer">
    [`POST /ledger/subaccounts`](/api-reference/endpoints/virtual-account/create-subaccount),
    using your internal customer identifier as the `subAccountIdRef`.
  </Step>

  <Step title="Handle deposits">
    Generate a crypto deposit address for the sub-account with
    [`POST /ledger/subaccounts/{subAccountIdRef}/funding-address`](/api-reference/endpoints/stablecoin/create-subaccount-funding-address),
    then listen for `transaction_activity.crypto_deposit.*` webhooks to notify
    your customer when funds arrive.
  </Step>

  <Step title="Handle withdrawals">
    Initiate withdrawals directly from the sub-account with
    [`POST /ledger/crypto-transfer`](/api-reference/endpoints/stablecoin/create-crypto-transfer),
    and listen for `transaction_activity.crypto_withdrawal.*` webhooks.
  </Step>

  <Step title="Onramp and offramp per customer">
    For onramp, generate a [virtual account number](/guides/product-features/virtual-account/account-number)
    or a one-off [cash deposit](/guides/product-features/cash-deposits/introduction)
    per sub-account. For offramp, initiate a
    [cash payout](/guides/product-features/cash-payouts/introduction) directly
    from the sub-account.
  </Step>
</Steps>

## Approach 2: Use your own ledger

If you already run your own USD/account ledger and only want Onboard's
stablecoin rail for receiving deposits per customer, this approach fits best.

<Steps>
  <Step title="Create a sub-account per customer">
    Same as Approach 1 — [`POST /ledger/subaccounts`](/api-reference/endpoints/virtual-account/create-subaccount)
    with your internal customer identifier.
  </Step>

  <Step title="Handle deposits">
    Generate a deposit address, listen for
    `transaction_activity.crypto_deposit.*`, and on a successful deposit:
    debit the Onboard sub-account (transfer to your main account), then credit
    the customer's balance in your own ledger.
  </Step>

  <Step title="Handle withdrawals">
    Debit or hold the customer's balance in your own system for the withdrawal
    amount plus fees, initiate the withdrawal from your Onboard main account,
    and listen for `transaction_activity.crypto_withdrawal.*` (or poll
    [`GET /ledger/crypto-transfer/{transferReference}`](/api-reference/endpoints/stablecoin/get-crypto-transfer))
    before releasing the hold.
  </Step>
</Steps>
