# Drafting payout

<mark style="color:green;">`POST`</mark> `/api/public/v1/payouts/draft`

This is a **dry-run** endpoint that creates a payout draft without yet sending funds to the network.

Payout drafts are valid for 30 seconds and expire afterwards.

To confirm your payout draft and send the funds, make a separate `PUT` `/api/public/v1/payouts/:id` call, where `:id` is the payout draft ID:

{% content-ref url="confirming-payout-draft" %}
[confirming-payout-draft](https://docs.txn.io/payouts/confirming-payout-draft)
{% endcontent-ref %}

***

**Destination Tag Requirement for XRP Addresses:**

XRP addresses require an additional parameter: a *destination tag*.

A destination tag functions similarly to a reference number in bank transfers, helping to identify the intended beneficiary of a transaction.

**Important Notes:**

* A destination tag ***cannot be left blank***. Collect this tag from your customers before submitting a payout request to Txn
* If end-users do not specify a destination tag, use `"0"` by formatting the address as follows:

  ```css
  rwCQVZLSMNY6DgMH61317qvH3nHYqm68PF?dt=0
  ```

{% hint style="danger" %}
**Warning:** If you enter `"0"` as the destination tag for a wallet shared by multiple users, e.g. online wallets or exchange platforms, the funds may be *permanently lost*.
{% endhint %}

***

**cURL**

```json
## Draft payout XRP

curl -X "POST" "https://api.sandbox.txn.pro/api/public/v1/payouts/draft" \
     -H 'Content-Type: application/vnd.api+json' \
     -H 'Authorization: Bearer ' \
     -d $'{
  "data": {
    "type": "payouts",
    "attributes": {
      "reference": "b8ad764b-7951-4cbc-9a15-efa91d47fe4e",
      "amount": "1000",
      "currency": "TRY",
      "chargeCurrency": "EUR",
      "accountChargedId": "13a85b45-8543-41c7-b963-394d4ea128ae",
      "absorbPayoutFee": true,
      "absorbNetworkFee": false,
      "address": "rLsBa2vWV2uuPx2UKbocAZG2WHXoaGyMPf?dt=61",
      "payNetwork": "txrp",
      "paymentMethod": "on_chain",
      "receiverBinanceId": ""
    }
  }
}'
```

**Headers**

<table><thead><tr><th width="320">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/vnd.api+json</code></td></tr><tr><td>Authorization</td><td><code>Bearer &#x3C;api_key></code></td></tr></tbody></table>

**Request Body**

<table><thead><tr><th>Name</th><th width="100">Type</th><th width="105">Required</th><th>Description</th></tr></thead><tbody><tr><td>data.type</td><td>string</td><td>Yes</td><td>Can only be <code>payouts</code>.</td></tr><tr><td>data.attributes.reference</td><td>string</td><td>No</td><td>The custom reference ID to tie the payout to end-user who gets paid. This can be anything you choose. Must be a unique value for each pyout you create.</td></tr><tr><td>data.attributes.amount</td><td>number</td><td>Yes</td><td>Payout amount. This is the amount that Txn will debit from your account on the Txn platform. Refer to <a href="payout-limitations">Payout Limitations</a>.</td></tr><tr><td>data.attributes.currency</td><td>string</td><td>Yes</td><td>Payout amount currency code. This is effectively the currency account which Txn will take the payout amount from. Refer to <a href="../api-basics/supported-currencies">Supported Currencies</a>.</td></tr><tr><td>data.attributes.chargeCurrency</td><td>string</td><td>No</td><td>Specifies from which merchant's currency account the payout amount and fees should be taken. Can be EUR, USD, USDT or USDC. If omitted, the money will be taken from the data.attributes.currency account. </td></tr><tr><td>data.attributes.accountChargedId</td><td>string</td><td></td><td>Specifies the ID of the account from which the payout amount should be debited. Can be a master or subaccount ID. If not present, the payment will be debited from your master account by default. Requires <code>data.attributes.chargeCurrency</code>.</td></tr><tr><td>data.attributes.payNetwork</td><td>string</td><td>Yes</td><td>Refer to <a href="../api-basics/supported-currencies">Supported Currencies</a>.</td></tr><tr><td>data.attributes.address</td><td>string</td><td>Yes</td><td>Wallet address of a payout recipient.</td></tr><tr><td>data.attibutes.absorbFees</td><td>boolean</td><td>No</td><td><mark style="color:red;">This parameter is deprecating</mark>. Use <code>absorbPayoutFee</code> and <code>absorbNetworkFee</code> instead which allow more ganural controls.</td></tr><tr><td>data.attibutes.absorbPayoutFee</td><td>boolean</td><td>No</td><td>If false or omitted, the payout  fee is deducted from the transaction amount. If true, the payout fee is deducted from the merchant account balance.</td></tr><tr><td>data.attibutes.absorbNetworkFee</td><td>boolean</td><td>No</td><td>If false or omitted, the network  fee is deducted from the transaction amount. If true, the network fee is deducted from the merchant account balance.</td></tr><tr><td>data.attibutes.paymentMethod</td><td>string</td><td>No</td><td><p>Can be ONE of these possible values:</p><ul><li><code>on_chain</code> - Produces an <strong>on-chain cryptocurrency transaction</strong>. Users will receive crypto directly into their wallet.</li><li><code>binance_pay</code> - Indicates it is an <strong>off-chain payout within the Binance platform</strong>. If this value is supplied, you will also need to supply the recipient's Binance ID together. See <code>data.attibutes.receiverBinanceId</code> below.</li></ul><p>If no value supplied, defaults to <code>"on_chain"</code>.</p></td></tr><tr><td>data.attibutes.receiverBinanceId</td><td>string</td><td>No</td><td>The recipient's Binance ID. You should collect it from the user upfront and, ideally, validate the Binance ID before submitting your payout request via this endpoint<a data-mention href="validating-recipients-binance-id">validating-recipients-binance-id</a>. It must always be numeric and can range from 8 to 10 digits. As the number of Binance users increases, it may grow to 11 or 12 digits in the future.</td></tr></tbody></table>

**Response Body**

<table><thead><tr><th>Name</th><th width="96">Type</th><th>Description</th></tr></thead><tbody><tr><td>data.id</td><td>string</td><td>Payout draft ID.</td></tr><tr><td>data.type</td><td>string</td><td>Aways <code>payouts</code>.</td></tr><tr><td>data.attributes.reference</td><td>string</td><td>The custom reference ID to tie the payout to end-user who gets paid. This can be anything you choose.</td></tr><tr><td>data.attributes.status</td><td>string</td><td>Payout status. Refer to <a href="payout-status-flow">Payout Status Flow</a>.</td></tr><tr><td>data.attributes.address</td><td>string</td><td>Wallet address of a payout recipient.</td></tr><tr><td>data.attributes.createdAt</td><td>string</td><td>Payout creation timestamp.</td></tr><tr><td>data.attributes.absorbFees</td><td>boolean</td><td>This parameter is deprecated. Use both <code>absorbPayoutFees</code> and <code>absorbNetworkFee</code> instead.</td></tr><tr><td>data.attributes.absorbPayoutFee</td><td>boolean</td><td>If false, the payout  fee is deducted from the transaction amount. If true, the payout fee is deducted from the merchant account balance.</td></tr><tr><td>data.attributes.absorbNetworkFee</td><td>boolean</td><td>If false, the network  fee is deducted from the transaction amount. If true, the network fee is deducted from the merchant account balance.</td></tr><tr><td>data.attributes.amount</td><td>number</td><td>Payout amount.</td></tr><tr><td>data.attributes.currency</td><td>string</td><td>Payout amount currency code.</td></tr><tr><td>data.attributes.payCurrency</td><td>string</td><td>The code of a token or cryptocurrency transferred to the receiving address.</td></tr><tr><td>data.attributes.payAmount</td><td>string</td><td>The amount of tokens or cryptocurrency transferred to the receiving address.</td></tr><tr><td>data.attributes.txid</td><td>string</td><td>The token or cryptocurrency transaction hash. This is effectively a unique identifier of a transaction on a relevant blockchain. You can share it with the receipient as a proof of payment.</td></tr><tr><td>data.attributes.payNetwork</td><td>string</td><td>Refer to <a href="../api-basics/supported-currencies">Supported Currencies</a>.</td></tr><tr><td>data.attributes.payNetworkName</td><td>string</td><td>Network name. E.g. Tron (TRC20).</td></tr><tr><td>data.attributes.networkFee</td><td>string</td><td>Network fee amount.</td></tr><tr><td>data.attributes.networkFeeCurrency</td><td>string</td><td>Network fee currency.</td></tr><tr><td>data.attributes.payoutFee</td><td>string</td><td>Payout fee amount.</td></tr><tr><td>data.attributes.payoutFeeCurrency</td><td>string</td><td>Payout fee currency.</td></tr><tr><td>data.attributes.displayFee</td><td>string</td><td>Fee associated with the payout represented in data.attributes.currency. For example, if the payout currency is TRY, the fee is also expressed in TRY.</td></tr><tr><td>data.attributes.displayFeeCurrency</td><td>string</td><td>Fee associated with the payout represented in data.attributes.currency. For example, if the payout currency is TRY, the fee is also expressed in TRY.</td></tr><tr><td>data.attributes.amountCharged</td><td>string</td><td>The amount deducted from the merchant's account.</td></tr><tr><td>data.attributes.amountChargedCurrency</td><td>string</td><td>The amount deducted from the merchant's account.</td></tr><tr><td>data.attributes.payChargeRate</td><td>string</td><td>Pay currency to charge currency exchange rate applied by Txn. E.g., XRP/EUR.</td></tr><tr><td>data.attributes.payChargeRateCurrency</td><td>string</td><td>Pay currency to charge currency exchange rate applied by Txn.</td></tr><tr><td>data.attributes.exchangeRate</td><td>string</td><td>Pay currency to currency exchange rate applied by Txn. E.g., XRP/TRY.</td></tr><tr><td>data.attibutes.paymentMethod</td><td>string</td><td>Payment method used for the payout.</td></tr><tr><td>data.attibutes.receiverBinanceId</td><td>string</td><td>Recipient's Binance ID.</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="HTTP 201" %}

```json
{
  "data": {
    "id": "6ecebf80-b210-413b-b396-df4760d142c5",
    "type": "payouts",
    "attributes": {
      "address": "rLsBa2vWV2uuPx2UKbocAZG2WHXoaGyMPf?dt=61",
      "expiresAt": "2026-04-01T06:57:23.830Z",
      "createdAt": "2026-04-01T06:56:53.830Z",
      "absorbFees": null,
      "absorbPayoutFee": true,
      "absorbNetworkFee": false,
      "paymentMethod": "on_chain",
      "receiverBinanceId": null,
      "binanceStatus": null,
      "approvalStatus": null,
      "reference": "c533ca8f-63eb-4c0a-a784-4cdfc731ca31",
      "status": "draft",
      "amount": "1000.00",
      "currency": "TRY",
      "payCurrency": "XRP",
      "payAmount": "15.045067",
      "payNetwork": "txrp",
      "payNetworkName": "Ripple",
      "txid": null,
      "networkFee": "1.000000",
      "networkFeeCurrency": "XRP",
      "payoutFee": "0.22",
      "payoutFeeCurrency": "USD",
      "displayFee": "10.00",
      "displayFeeCurrency": "TRY",
      "exchangeRate": "62.3244527497791",
      "amountCharged": "22.70",
      "amountChargedCurrency": "USD",
      "payChargeRate": "1.4010781",
      "payChargeRateCurrency": "USD"
    },
    "relationships": {
      "accountCharged": {
        "data": {
          "type": "accounts",
          "id": "80b8dd61-35bc-49cc-9e04-f2c0f741a096"
        }
      },
      "author": {
        "data": {
          "type": "apiKeys",
          "id": "b56961f4-46cf-4e60-bb32-b36addb09f66"
        }
      }
    }
  },
  "included": [
    {
      "id": "80b8dd61-35bc-49cc-9e04-f2c0f741a096",
      "type": "accounts",
      "attributes": {
        "master": true,
        "currencyCode": "USD",
        "label": "master",
        "bankReference": "BDR3455470827278341",
        "balance": "446.68",
        "totalBalance": null,
        "bankWithdrawalAvailable": false,
        "bankDepositAvailable": true,
        "transferAvailable": true,
        "currencyType": "fiat"
      },
      "relationships": {
        "company": {
          "meta": {
            "included": false
          }
        },
        "networks": {
          "meta": {
            "included": false
          }
        },
        "txnBankCredentials": {
          "meta": {
            "included": false
          }
        }
      }
    },
    {
      "id": "b56961f4-46cf-4e60-bb32-b36addb09f66",
      "type": "apiKeys",
      "attributes": {
        "name": "Test API key",
        "createdAt": "2024-06-17T19:41:33.398Z"
      }
    }
  ],
  "meta": {},
  "jsonapi": {
    "version": "1.0"
  }
}
```

{% endtab %}

{% tab title="HTTP 422" %}

```json
{
  "errors": [
    {
      "status": 422,
      "title": "amount is below minimum",
      "detail": "amount: 10.0, minimum: 50.00",
      "code": "amount_below_minimum"
    }
  ]
}

// Amount too low.
```

{% endtab %}

{% tab title="HTTP 422" %}

```json
{
  "errors": [
    {
      "status": 422,
      "title": "amount is above maximum",
      "detail": "amount: 500000.0, maximum: 100000.00",
      "code": "amount_above_maximum"
    }
  ]
}

// Amount too high.
```

{% endtab %}

{% tab title="HTTP 422" %}

```json
{
  "errors": [
    {
      "status": 422,
      "title": "Invalid address",
      "code": "invalid_address"
    }
  ]
}

// Invalid address format.
```

{% endtab %}

{% tab title="HTTP 422" %}

```json
{
  "errors": [
    {
      "status": 422,
      "title": "Invalid attribute",
      "detail": "Reference has already been taken",
      "code": "payout_invalid",
      "source": {
        "pointer": "/data/attributes/externalId"
      }
    }
  ]
}

// Duplicate reference.
```

{% endtab %}

{% tab title="HTTP 422" %}

```json
{
  "errors": [
    {
      "status": 422,
      "title": "account has insufficient balance",
      "code": "account_has_insufficient_balance"
    }
  ]
}

// Your source account has insufficient funds.
```

{% endtab %}

{% tab title="HTTP 422" %}

```json
{
  "errors": [
    {
      "status": 422,
      "title": "We couldn’t send funds to this address, please try another address",
      "code": "address_has_high_risk_score"
    }
  ]
}

// Destination wallet address risk profile is too high.
```

{% endtab %}
{% endtabs %}
