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

# ramps.noah.initiatePayout

> Initiate a Noah payout from a previously quoted payout.

## Function Signature

```dart theme={null}
Future<NoahInitiatePayoutResponse> initiatePayout(NoahInitiatePayoutRequest request)
```

## Description

Executes a payout that was previously quoted with [`getPayoutQuote`](./noah-getpayoutquote). Returns the destination address and the on-chain deposit conditions your transfer must satisfy. The SDK does not send that transfer — do it yourself, for example with [`sendAsset`](./sendasset).

The payout must be authorized by a trigger. If you omit `trigger`, Portal builds a `single` trigger from the quote (an `EQ` amount condition on its `cryptoAmountEstimate`) using the `network`, `sourceAddress`, `expiry`, and `nonce` you passed. Pass `trigger` to use a `permanent` or `quoted` trigger, or your own amount conditions.

Completion and failures are reported asynchronously through Noah `Transaction` webhooks.

## Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `request.payoutId` | `String` | Yes | Identifier from `getPayoutQuote`. |
| `request.sourceAddress` | `String` | Yes | Address funding the crypto leg. |
| `request.expiry` | `String` | Yes | ISO-8601 expiry for the deposit authorization. |
| `request.nonce` | `String` | Yes | Stable nonce for this payout attempt. **Reuse it on retry** so repeated calls stay idempotent. Must be 36 characters or fewer. |
| `request.network` | `String` | Yes | CAIP-2 network for the deposit leg. Use a `NoahNetwork` constant. |
| `request.trigger` | `NoahOnchainDepositSourceTrigger?` | No | Explicit on-chain deposit trigger. See below. |
| `request.businessFee` | `NoahBusinessFee?` | No | Accepted for parity with the native SDKs, but ignored by Portal. Business fees come from the [Noah configuration](/integrations/On-Off-Ramp/noah) in the Portal Dashboard. |

### Deposit source triggers

`NoahOnchainDepositSourceTrigger` has one nullable field per variant. Set **exactly one** of them; otherwise the SDK throws a `PortalException` with code `INVALID_PAYOUT_TRIGGER` before calling the native SDK. Use the same `sourceAddress`, `expiry`, and `nonce` on the trigger as on the request.

| Field | Type | Use it for |
| - | - | - |
| `single` | `NoahSingleOnchainDepositSourceTriggerInput?` | One payout matching specific amount conditions on a network. Takes `conditions` (each with `amountConditions` and `network`), `sourceAddress`, `expiry`, and `nonce`. |
| `permanent` | `NoahPermanentOnchainDepositSourceTriggerInput?` | A source that stays active across multiple deposits until expiry. Takes `conditions` (each with `network`), `sourceAddress`, `expiry`, `nonce`, and optional `networkAgnostic` to match any supported network. |
| `quoted` | `NoahQuotedOnchainDepositSourceTriggerInput?` | A rate-locked payout. Takes the `signedQuote` from a `getPayoutQuote` call made with `quoted: true`, plus `conditions` (each with `network`), `sourceAddress`, `nonce`, and optional `expiry`. |

Amount conditions take a `comparisonOperator` string — a `NoahComparisonOperator` value (`eq.value`, `lteq.value`, or `gteq.value`) — and a `value`.

## Returns

**`NoahInitiatePayoutResponse`** - An envelope containing:

| Property | Type | Description |
| - | - | - |
| `data` | `NoahInitiatePayoutData` | The response payload. |
| `metadataJson` | `String?` | JSON-encoded response metadata. Read it decoded through the `metadata` getter. |

`NoahInitiatePayoutData`:

| Property | Type | Description |
| - | - | - |
| `destinationAddress` | `String?` | Address to send the crypto leg to. Derived from `conditions[0].destinationAddress`; `null` when that shape is missing. |
| `conditions` | `List<NoahDepositSourceTriggerCondition?>?` | Conditions the on-chain transfer must satisfy. Each has `amountConditions`, `cryptoCurrency`, `network`, and `destinationAddress`. |
| `ruleId` | `String?` | Identifier of the Noah rule created for permanent and quoted triggers. |

## Example

```dart theme={null}
import 'dart:math';

import 'package:portal_flutter/portal_flutter.dart';

final portal = Portal();

final quote = await portal.ramps.noah.getPayoutQuote(
  NoahGetPayoutQuoteRequest(
    channelId: 'ch-1',
    cryptoCurrency: 'USDC_TEST',
    fiatAmount: '10',
  ),
);

final sourceAddress = (await portal.getAddress(NoahNetwork.ethereumSepolia))!; // Requires an existing wallet
final expiry = DateTime.now().toUtc().add(const Duration(days: 1)).toIso8601String();

// Use a stable nonce per payout attempt and reuse it on retries
final random = Random.secure();
final nonce = List.generate(16, (_) => random.nextInt(256).toRadixString(16).padLeft(2, '0')).join();

try {
  final response = await portal.ramps.noah.initiatePayout(
    NoahInitiatePayoutRequest(
      payoutId: quote.data.payoutId,
      sourceAddress: sourceAddress,
      expiry: expiry,
      nonce: nonce,
      network: NoahNetwork.ethereumSepolia,
    ),
  );

  final destination = response.data.destinationAddress;
  if (destination != null) {
    print('Send funds to: $destination');
  } else {
    // Handle this however your app prefers — surface it, log it, or fail the flow.
    print('Noah did not return a destination address for this payout');
  }
} on PortalException catch (e) {
  print('initiatePayout failed: [${e.code}] ${e.message}');
}
```

With an explicit `single` trigger:

```dart theme={null}
final response = await portal.ramps.noah.initiatePayout(
  NoahInitiatePayoutRequest(
    payoutId: quote.data.payoutId,
    sourceAddress: sourceAddress,
    expiry: expiry,
    nonce: nonce,
    network: NoahNetwork.ethereumSepolia,
    trigger: NoahOnchainDepositSourceTrigger(
      single: NoahSingleOnchainDepositSourceTriggerInput(
        conditions: [
          NoahSingleOnchainDepositSourceTriggerCondition(
            amountConditions: [
              NoahSingleOnchainDepositSourceTriggerAmountCondition(
                comparisonOperator: NoahComparisonOperator.eq.value,
                value: quote.data.cryptoAuthorizedAmount,
              ),
            ],
            network: NoahNetwork.ethereumSepolia,
          ),
        ],
        sourceAddress: sourceAddress,
        expiry: expiry,
        nonce: nonce,
      ),
    ),
  ),
);
```

## Errors

| Code | Description |
| - | - |
| `NOT_INITIALIZED` | Portal was not initialized |
| `INVALID_PAYOUT_TRIGGER` | `trigger` sets none, or more than one, of `single`, `permanent`, and `quoted`. Thrown before the native call |
| `NOAH_INITIATE_PAYOUT_ERROR` | Failed to initiate the payout — for example a `payoutId` that was already initiated, an expired quote, or an unsupported `network` |

## Related

* [Noah virtual accounts and payouts guide](../guide/noah)
* [ramps.noah.getPayoutQuote](./noah-getpayoutquote)
* [sendAsset](./sendasset) — satisfy the returned deposit conditions
* [Noah payouts workflow](/integrations/On-Off-Ramp/noah-payouts)
* [Noah webhooks](/integrations/On-Off-Ramp/noah-webhooks)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.