> ## 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.

# Legacy Migration Guide

> Move older onramp, offramp, payout, and webhook integrations to the current API model

## Overview

Older Daya integrations may still use onramp, offramp, payout, and legacy webhook names. Those routes remain available for existing integrations, but new receive-money work should use funding accounts and deposits.

This guide shows what to use instead. No removal date has been published for the legacy routes. Daya will share sunset dates before any legacy route is removed.

## What Changed

| Older integration path                                          | Current path                                                                      |
| --------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| Create or list NGN onramps with `/v1/onramps`                   | Create or list funding accounts with `rail: NGN_VIRTUAL_ACCOUNT`                  |
| Create or list crypto offramps with `/v1/offramps`              | Create or list funding accounts with `rail: CRYPTO_ADDRESS`, `asset`, and `chain` |
| Reconcile onramp or offramp deposits by legacy receive-flow IDs | Reconcile deposits with `/v1/deposits` and store `funding_account_id`             |
| Track settlement delivery with payout events                    | Track receive-flow settlement with `deposit.*` events                             |
| Send money to a bank recipient through payout-style flows       | Create a transfer with `/v1/transfers`                                            |
| Track old webhook names such as `deposit.settled`               | Use current names such as `deposit.completed`                                     |

## Receive NGN

Use a funding account with `rail: NGN_VIRTUAL_ACCOUNT` when a customer needs NGN bank details.

```json theme={null}
{
  "type": "TEMPORARY",
  "rail": "NGN_VIRTUAL_ACCOUNT",
  "customer": {
    "customer_id": "650e8400-e29b-41d4-a716-446655440000"
  },
  "currency": "NGN",
  "amount": 50000,
  "settlement_destination": {
    "type": "INTERNAL_BALANCE"
  }
}
```

The response includes `instructions` with the bank account details to show your customer. When money arrives, the deposit response includes `funding_account_id`.

Use these endpoints:

| Task                       | Endpoint                                                                                                     |
| -------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Create NGN payment details | [`POST /v1/funding-accounts`](/api-reference/funding-accounts/create-funding-account)                        |
| List NGN payment details   | [`GET /v1/funding-accounts?rail=NGN_VIRTUAL_ACCOUNT`](/api-reference/funding-accounts/list-funding-accounts) |
| Reconcile received money   | [`GET /v1/deposits`](/api-reference/deposits/list-deposits)                                                  |

## Receive Crypto

Use a funding account with `rail: CRYPTO_ADDRESS` when a customer needs to send USDC or USDT to Daya.

```json 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": "0690000031",
      "bank_code": "044"
    }
  }
}
```

The response includes `instructions` with the wallet address. When crypto lands, the deposit response includes `funding_account_id`, `asset`, `chain`, and `tx_hash`.

Use these endpoints:

| Task                          | Endpoint                                                                                                |
| ----------------------------- | ------------------------------------------------------------------------------------------------------- |
| Create crypto payment details | [`POST /v1/funding-accounts`](/api-reference/funding-accounts/create-funding-account)                   |
| List crypto payment details   | [`GET /v1/funding-accounts?rail=CRYPTO_ADDRESS`](/api-reference/funding-accounts/list-funding-accounts) |
| Reconcile received money      | [`GET /v1/deposits`](/api-reference/deposits/list-deposits)                                             |

## Payouts and Transfers

Payouts are legacy read-only records for settlement delivery from older receive-money flows. Do not build new send-money workflows on `/v1/payouts`.

Use:

| Goal                                              | Current API                                                                                       |
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| Send NGN or USD to a bank account                 | [`POST /v1/transfers`](/api-reference/transfers/create-transfer)                                  |
| Save reusable bank or wallet details              | [`POST /v1/recipients`](/api-reference/recipients/create-recipient)                               |
| Move collection balance to withdrawal balance     | [`POST /v1/merchant/balance/transfer`](/api-reference/merchant-balance/transfer-merchant-balance) |
| Send stablecoins on-chain from withdrawal balance | [`POST /v1/merchant/balance/withdraw`](/api-reference/merchant-balance/withdraw-merchant-balance) |

If you only need to inspect older payout records, use the legacy [List payouts](/api-reference/payouts/list-payouts) and [Get payout](/api-reference/payouts/get-payout) routes.

## Webhook Names

Use the current webhook names when creating or updating webhook filters.

| Older name                | Current name               |
| ------------------------- | -------------------------- |
| `deposit.flagged`         | `deposit.requires_review`  |
| `deposit.settled`         | `deposit.completed`        |
| `transfer.flagged`        | `transfer.requires_review` |
| `transfer.settled`        | `transfer.completed`       |
| `withdrawal.settled`      | `withdrawal.completed`     |
| `virtual_account.created` | `funding_account.active`   |
| `onramp.created`          | `funding_account.active`   |
| `onramp.failed`           | `funding_account.failed`   |

Existing endpoints that receive all events may temporarily receive both the current and legacy event name for the same state change. See [Legacy Webhooks](/legacy/webhooks) for the compatibility list.

## Migration Checklist

1. Create new receive instructions with `/v1/funding-accounts`.
2. Store `funding_account_id` from funding account responses and deposit payloads.
3. Reconcile NGN and crypto payments from `/v1/deposits`.
4. Replace payout-based send flows with `/v1/transfers` or merchant withdrawals.
5. Update webhook filters and handlers to use current event names.
6. Keep legacy route support only for existing customers or historical records.

## Legacy Routes

The following routes remain documented for older integrations:

| Resource | Routes                                                                                                                                                                                     |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Onramps  | [`POST /v1/onramps`](/api-reference/onramp/create-onramp), [`GET /v1/onramps`](/api-reference/onramp/list-onramps), [`GET /v1/onramps/{id}`](/api-reference/onramp/get-onramp)             |
| Offramps | [`POST /v1/offramps`](/api-reference/offramps/create-offramp), [`GET /v1/offramps`](/api-reference/offramps/list-offramps), [`GET /v1/offramps/{id}`](/api-reference/offramps/get-offramp) |
| Payouts  | [`GET /v1/payouts`](/api-reference/payouts/list-payouts), [`GET /v1/payouts/{id}`](/api-reference/payouts/get-payout)                                                                      |

<Info>
  Legacy receive-flow routes are compatibility routes. Funding accounts, deposits, transfers, and withdrawals are the current integration path.
</Info>
