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

# dividendDistribution

> Distribute payment-token dividends to the holders of a tokenized asset.

Prepares unsigned transactions for distributing payment token dividends to holders of a specific token. Use `POST /prepare-transactions` with `method=dividendDistribution`.

## Notes

* Amounts are specified in whole units (e.g., 10 for 10 USDT)
* The signer must have sufficient balance of the payment token
* The signer must first approve the configured payment token to the STO contract. Retrieve the STO address from `GET /get-tokenizer-info?tokenSymbol=...` and use its `tokenAddress` as `spenderAddress` in the `approve` request.
* Do not use `escrowAddress` as the approval spender for this operation. Wait for the payment-token approval to be confirmed on-chain before preparing the distribution.
* Only the tokenizer can distribute dividends for their tokens

## Which token, and which spender

The allowance is read as `paymentToken.allowance(signerAddress, tokenAddress)`, where the payment
token is resolved from the asset on-chain. Getting either half wrong produces the same error:

| Approve this | With this spender |
| - | - |
| The asset's **payment token** (for example `USDT`) — not the security token | The **security token contract**, `tokenAddress` |

> [!WARNING]
>
> `GET /get-token-info` returns the asset's configured payment token, not the security token's own
> address. The address you need as `spenderAddress` is `tokenAddress` from
> `GET /get-tokenizer-info`. Approving the security token itself, or approving to `escrowAddress`,
> both leave the dividend allowance at zero.

## Preflight errors

| Message | Meaning |
| - | - |
| `Insufficient allowance to distribute dividends` | The allowance from `signerAddress` to `tokenAddress`, on the payment token, is below the requested amount |
| `Insufficient balance to distribute dividends` | The signer does not hold enough payment token |

Both are returned as `400` before anything is prepared, so **nothing was broadcast** and no funds
moved. Fix the allowance or the balance and prepare again.

> [!NOTE]
>
> There is no additional platform fee folded into this check: the allowance only has to cover the
> dividend amount you requested.

Once distributed, it can take a little while for a storefront's claim action to become available to
holders.

See [`approve`](https://docs.brickken.com/api-reference/endpoint/prepare-approve) for the complete allowance workflow and field mapping.

## Next step

Preparing does not touch the chain. The response gives you `txId` and an array of unsigned `transactions` — you still have to sign and submit them.

**1. Sign every returned transaction**

Sign each entry locally with the wallet that sends the transaction — `signerAddress`, or `investorAddress` for `newInvest` and `claimTokens`. It must be whitelisted by Brickken, and it needs native gas on the target chain.

**2. Submit the signed payloads**

`POST` them to [`/send-transactions`](https://docs.brickken.com/api-reference/endpoint/send) as `{ txId, signedTransactions }` and Brickken broadcasts for you.

If you would rather broadcast yourself, prepare with `executionMode: "client-broadcast"` and confirm afterwards with `{ txId, txHash }` instead.

**3. Poll until it confirms**

Call [`GET /get-transaction-status`](https://docs.brickken.com/api-reference/endpoint/get-transaction-status) with the `txId`. A `pending` status means it is broadcast but not yet mined — do not resubmit.

Full walkthrough: [Tokenize an asset and run an STO](https://docs.brickken.com/api-reference/guides/tokenize-and-run-an-sto.md).


## OpenAPI

````yaml api-reference/prepare/dividendDistribution.json POST /prepare-transactions
openapi: 3.1.0
info:
  title: Brickken API V2 - prepare dividendDistribution
  description: >-
    Method-scoped view of `POST /prepare-transactions` for
    `method=dividendDistribution`. Before preparing the distribution, approve
    the configured payment token with the STO contract (`tokenAddress` from `GET
    /get-tokenizer-info`) as spender. The full endpoint, with every supported
    method and the common request body parameters, is documented in
    `api-reference/openapi.json`.
  version: 2.0.0
servers:
  - url: https://api.sandbox.brickken.com
    description: Sandbox Environment
  - url: https://api.brickken.com
    description: Production Environment
security: []
paths:
  /prepare-transactions:
    post:
      summary: Prepare a dividend distribution
      description: >-
        Prepares the unsigned transaction that distributes payment-token
        dividends to token holders. The payment-token allowance must be granted
        to the STO `tokenAddress`, not to `escrowAddress`, and the approval must
        be confirmed on-chain first.
      operationId: prepare_dividendDistribution
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - method
                - chainId
                - signerAddress
                - tokenSymbol
                - amount
              properties:
                method:
                  type: string
                  example: dividendDistribution
                  enum:
                    - dividendDistribution
                  description: >-
                    Required. Operation to prepare. Must be
                    `dividendDistribution` for this endpoint.
                  default: dividendDistribution
                chainId:
                  type: string
                  description: >-
                    Required. Blockchain network identifier. Hex format is
                    recommended, for example Sepolia `aa36a7`.
                  example: aa36a7
                signerAddress:
                  type: string
                  description: >-
                    Required. Wallet that funds and signs the distribution. It
                    must hold at least `amount` of the configured payment token
                    and have approved the STO `tokenAddress` for that amount.
                    Retrieve that address with `GET /get-tokenizer-info`;
                    `escrowAddress` is not the spender for this allowance.
                  example: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e'
                tokenSymbol:
                  type: string
                  description: >-
                    Required. Symbol of the token whose holders receive the
                    dividend.
                  example: EXMPL
                amount:
                  type: string
                  description: Required. Payment-token amount to distribute.
                  example: '100'
                paymentTokenAddress:
                  type: string
                  description: >-
                    Optional. Payment token contract address. When provided, it
                    must match the payment token configured for the token.
                  example: '0x5555555555555555555555555555555555555555'
                  pattern: ^0x[a-fA-F0-9]{40}$
              example:
                method: dividendDistribution
                chainId: aa36a7
                signerAddress: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e'
                tokenSymbol: EXMPL
                amount: '1000'
            example:
              method: dividendDistribution
              chainId: aa36a7
              signerAddress: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e'
              tokenSymbol: EXMPL
              amount: '1000'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  transactions:
                    type: array
                    description: Array of unsigned transaction objects ready for signing
                    items:
                      type: object
                      properties:
                        from:
                          type: string
                          description: Sender address
                          example: '0x1234567890abcdef1234567890abcdef12345678'
                        to:
                          type: string
                          description: Recipient address
                          example: '0xabcdef1234567890abcdef1234567890abcdef12'
                        value:
                          type: string
                          description: Transaction value in hex
                          example: '0x00'
                        nonce:
                          type: integer
                          description: Transaction nonce
                          example: 3792
                        chainId:
                          type: integer
                          description: Blockchain network chain ID
                          example: 11155111
                        data:
                          type: string
                          description: Transaction data payload
                          example: >-
                            0xd362e8a70000000000000000000000000000000000000000000000000000000000000040...
                        type:
                          type: integer
                          description: Transaction type (EIP-1559)
                          example: 2
                        maxPriorityFeePerGas:
                          type: string
                          description: Maximum priority fee per gas
                          example: '1150000'
                        maxFeePerGas:
                          type: string
                          description: Maximum fee per gas
                          example: '1156037'
                        gasLimit:
                          type: string
                          description: Gas limit in hex
                          example: '0xccef'
                  info:
                    type: object
                    description: Metadata about the operation
                    properties:
                      tokenizerEmail:
                        type: string
                        description: Email of the tokenizer
                        example: tokenizer@example.com
                      tokenSymbol:
                        type: string
                        description: Symbol of the token
                        example: EXMPL
                      investorEmail:
                        type: string
                        description: Email of the investor (when applicable)
                        example: investor@example.com
                  txId:
                    type: string
                    description: >-
                      Unique identifier for this transaction batch (required for
                      /send-transactions). This is NOT a blockchain transaction
                      hash.
                    example: >-
                      0x46adea7bdf49c576a760102e0d6bc9ecd650b3998588cd3d7f576a7973426aad
                required:
                  - transactions
                  - txId
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

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