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

# Offramps

> Collect stablecoins from customers and send them Naira

## Overview

An **offramp** gives your customer a crypto address for sending USDC or USDT into Daya. Daya records the incoming crypto as a deposit, then sends the value as Naira to a Nigerian bank account.

New integrations create offramps with [Funding Accounts](/concepts/funding-accounts). In the API, an offramp is a funding account with:

| Field   | Value                      |
| ------- | -------------------------- |
| `rail`  | `CRYPTO_ADDRESS`           |
| `asset` | `USDC` or `USDT`           |
| `chain` | Supported network          |
| `type`  | `TEMPORARY` or `PERMANENT` |

<Info>
  The older `/v1/offramps` routes still exist for existing integrations. New integrations should create offramps with `/v1/funding-accounts`.
</Info>

## Customer

Every offramp belongs to a customer. Create the customer first with [`POST /v1/customers`](/api-reference/customers/create-customer), then pass `customer.customer_id` when creating the funding account.

A customer can have multiple temporary offramps. Permanent offramps are reused when there is already a live one for the same customer, asset, and chain.

## Temporary Offramps

Use a temporary offramp for one crypto deposit that should pay out to a Nigerian bank account.

| Behavior        | Details                                           |
| --------------- | ------------------------------------------------- |
| Purpose         | One-off crypto deposit                            |
| Asset and chain | Required                                          |
| Reuse           | Never reused                                      |
| Address expiry  | Yes. Funds must arrive before the address expires |
| Settlement      | `NGN_PAYOUT` only                                 |
| Rate            | Valid SELL `rate_id` required                     |
| Bank account    | Resolve before creating the offramp               |

Create a temporary offramp in this order:

1. Get a SELL rate with [`GET /v1/rates?side=SELL`](/api-reference/rates/get-rates).
2. List banks with [`GET /v1/banks`](/api-reference/banks/list-banks).
3. Resolve the destination account with [`POST /v1/banks/resolve`](/api-reference/banks/resolve-bank-account).
4. Create the offramp with `/v1/funding-accounts`.
5. Display the crypto address, asset, chain, and expiry time to the customer.

Tell the customer to send only the selected asset on the selected chain. Deposits sent after expiry are flagged for review instead of settling automatically.

```json Temporary offramp to NGN payout theme={null}
{
  "type": "TEMPORARY",
  "rail": "CRYPTO_ADDRESS",
  "customer": {
    "customer_id": "650e8400-e29b-41d4-a716-446655440000"
  },
  "asset": "USDC",
  "chain": "BASE",
  "settlement_destination": {
    "type": "NGN_PAYOUT",
    "rate_id": "550e8400-e29b-41d4-a716-446655440000",
    "destination_bank": {
      "account_number": "0123456789",
      "bank_code": "058"
    }
  }
}
```

## Permanent Offramps

Use a permanent offramp when the same customer should keep the same crypto address for repeat deposits.

| Behavior        | Details                                                             |
| --------------- | ------------------------------------------------------------------- |
| Purpose         | Long-lived crypto deposit address                                   |
| Asset and chain | Required                                                            |
| Reuse           | One live permanent address per merchant, customer, asset, and chain |
| Address expiry  | No expiry while active                                              |
| Settlement      | `INTERNAL_BALANCE` or `NGN_PAYOUT`                                  |
| Rate            | Applied when each deposit settles                                   |

If a live permanent offramp already exists for that customer, asset, and chain, Daya returns the same address. Updating settlement does not change the crypto address shown to the customer.

```json Permanent offramp to Daya balance theme={null}
{
  "type": "PERMANENT",
  "rail": "CRYPTO_ADDRESS",
  "customer": {
    "customer_id": "650e8400-e29b-41d4-a716-446655440000"
  },
  "asset": "USDC",
  "chain": "BASE",
  "settlement_destination": {
    "type": "INTERNAL_BALANCE"
  }
}
```

## Bank Payouts

For `NGN_PAYOUT`, resolve the bank account before creating the offramp:

1. List supported banks with [`GET /v1/banks`](/api-reference/banks/list-banks).
2. Resolve the account with [`POST /v1/banks/resolve`](/api-reference/banks/resolve-bank-account).
3. Send the verified `account_number` and `bank_code` in `destination_bank`.

Daya resolves and stores the account name. You do not send `account_name` in the funding account request.

<Warning>
  Invalid bank accounts are rejected. Always resolve the bank account before creating an offramp with `NGN_PAYOUT`.
</Warning>

## Settlement

Choose where the crypto value goes after Daya receives the deposit.

| Settlement destination | What happens                                                   | Allowed types            |
| ---------------------- | -------------------------------------------------------------- | ------------------------ |
| `INTERNAL_BALANCE`     | Funds are credited to your Daya balance                        | `PERMANENT`              |
| `NGN_PAYOUT`           | Funds are converted to NGN and paid to a Nigerian bank account | `TEMPORARY`, `PERMANENT` |

Temporary offramps support `NGN_PAYOUT` only. Permanent offramps support `INTERNAL_BALANCE` and `NGN_PAYOUT`.

## Developer Fees

To keep a percentage of each offramp deposit, send `developer_fee.percentage` when creating the funding account. Use a decimal string from `0` to `50`. Deposit responses and deposit webhooks show the developer fee and the customer amount separately from Daya fees.

For offramps, the developer fee is deducted before the final customer amount is calculated. The deposit response and webhook show the exact fee in `developer_fee` and the amount left for the customer in `customer_amount`.
`developer_fee.percentage` is a percentage value, not basis points. For example, `0.5` means `0.5%`, `2` means `2%`, and `50` means `50%`.

## Supported Chains

Offramps support APTOS, BASE, CELO, ETHEREUM, POLYGON, SOLANA, and TRON. See [Supported Chains](/concepts/supported-chains) for the full deposit and withdrawal matrix per environment.

## Track Deposits

Use `/v1/deposits` to reconcile money received through offramps. Deposit responses include `funding_account_id`, `asset`, `chain`, and `tx_hash`.

For funding-account offramps with `NGN_PAYOUT`, NGN payout delivery happens in the background as part of deposit settlement. Track the customer-facing state from the deposit `status`, `settlement_status`, and `deposit.*` webhooks. Show states such as `Deposit received`, `Settlement processing`, `Settlement settled`, `Settlement failed`, or `Requires review`. Do not wait for a separate transfer or payout webhook for this flow.

Listen for:

| Event                     | Meaning                                    |
| ------------------------- | ------------------------------------------ |
| `funding_account.active`  | Crypto address is ready                    |
| `deposit.received`        | Daya recorded the incoming crypto deposit  |
| `deposit.processing`      | Settlement has started                     |
| `deposit.completed`       | Settlement reached its destination         |
| `deposit.requires_review` | The deposit needs review before continuing |

## Next Steps

<CardGroup cols={3}>
  <Card title="Create Funding Account" icon="plus" href="/api-reference/funding-accounts/create-funding-account">
    Create an offramp with a crypto address.
  </Card>

  <Card title="Banks" icon="building-columns" href="/api-reference/banks/resolve-bank-account">
    Resolve a bank account before NGN payout.
  </Card>

  <Card title="Deposits" icon="money-bill-transfer" href="/concepts/deposits">
    Reconcile crypto deposits.
  </Card>
</CardGroup>
