curl --request POST \
--url https://api.sandbox.brickken.com/prepare-transactions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"method": "dividendDistribution",
"chainId": "aa36a7",
"signerAddress": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"tokenSymbol": "EXMPL",
"amount": "1000"
}
'import requests
url = "https://api.sandbox.brickken.com/prepare-transactions"
payload = {
"method": "dividendDistribution",
"chainId": "aa36a7",
"signerAddress": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"tokenSymbol": "EXMPL",
"amount": "1000"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'dividendDistribution',
chainId: 'aa36a7',
signerAddress: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
tokenSymbol: 'EXMPL',
amount: '1000'
})
};
fetch('https://api.sandbox.brickken.com/prepare-transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.brickken.com/prepare-transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'method' => 'dividendDistribution',
'chainId' => 'aa36a7',
'signerAddress' => '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
'tokenSymbol' => 'EXMPL',
'amount' => '1000'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.brickken.com/prepare-transactions"
payload := strings.NewReader("{\n \"method\": \"dividendDistribution\",\n \"chainId\": \"aa36a7\",\n \"signerAddress\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"tokenSymbol\": \"EXMPL\",\n \"amount\": \"1000\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.brickken.com/prepare-transactions")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"dividendDistribution\",\n \"chainId\": \"aa36a7\",\n \"signerAddress\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"tokenSymbol\": \"EXMPL\",\n \"amount\": \"1000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.brickken.com/prepare-transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"dividendDistribution\",\n \"chainId\": \"aa36a7\",\n \"signerAddress\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"tokenSymbol\": \"EXMPL\",\n \"amount\": \"1000\"\n}"
response = http.request(request)
puts response.read_body{
"transactions": [
{
"from": "0x1234567890abcdef1234567890abcdef12345678",
"to": "0xabcdef1234567890abcdef1234567890abcdef12",
"value": "0x00",
"nonce": 3792,
"chainId": 11155111,
"data": "0xd362e8a70000000000000000000000000000000000000000000000000000000000000040...",
"type": 2,
"maxPriorityFeePerGas": "1150000",
"maxFeePerGas": "1156037",
"gasLimit": "0xccef"
}
],
"txId": "0x46adea7bdf49c576a760102e0d6bc9ecd650b3998588cd3d7f576a7973426aad",
"info": {
"tokenizerEmail": "tokenizer@example.com",
"tokenSymbol": "EXMPL",
"investorEmail": "investor@example.com"
}
}dividendDistribution
Distribute payment-token dividends to the holders of a tokenized asset.
curl --request POST \
--url https://api.sandbox.brickken.com/prepare-transactions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"method": "dividendDistribution",
"chainId": "aa36a7",
"signerAddress": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"tokenSymbol": "EXMPL",
"amount": "1000"
}
'import requests
url = "https://api.sandbox.brickken.com/prepare-transactions"
payload = {
"method": "dividendDistribution",
"chainId": "aa36a7",
"signerAddress": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"tokenSymbol": "EXMPL",
"amount": "1000"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'dividendDistribution',
chainId: 'aa36a7',
signerAddress: '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
tokenSymbol: 'EXMPL',
amount: '1000'
})
};
fetch('https://api.sandbox.brickken.com/prepare-transactions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.brickken.com/prepare-transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'method' => 'dividendDistribution',
'chainId' => 'aa36a7',
'signerAddress' => '0x742d35Cc6634C0532925a3b844Bc454e4438f44e',
'tokenSymbol' => 'EXMPL',
'amount' => '1000'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.brickken.com/prepare-transactions"
payload := strings.NewReader("{\n \"method\": \"dividendDistribution\",\n \"chainId\": \"aa36a7\",\n \"signerAddress\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"tokenSymbol\": \"EXMPL\",\n \"amount\": \"1000\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.brickken.com/prepare-transactions")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"dividendDistribution\",\n \"chainId\": \"aa36a7\",\n \"signerAddress\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"tokenSymbol\": \"EXMPL\",\n \"amount\": \"1000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.brickken.com/prepare-transactions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"dividendDistribution\",\n \"chainId\": \"aa36a7\",\n \"signerAddress\": \"0x742d35Cc6634C0532925a3b844Bc454e4438f44e\",\n \"tokenSymbol\": \"EXMPL\",\n \"amount\": \"1000\"\n}"
response = http.request(request)
puts response.read_body{
"transactions": [
{
"from": "0x1234567890abcdef1234567890abcdef12345678",
"to": "0xabcdef1234567890abcdef1234567890abcdef12",
"value": "0x00",
"nonce": 3792,
"chainId": 11155111,
"data": "0xd362e8a70000000000000000000000000000000000000000000000000000000000000040...",
"type": 2,
"maxPriorityFeePerGas": "1150000",
"maxFeePerGas": "1156037",
"gasLimit": "0xccef"
}
],
"txId": "0x46adea7bdf49c576a760102e0d6bc9ecd650b3998588cd3d7f576a7973426aad",
"info": {
"tokenizerEmail": "tokenizer@example.com",
"tokenSymbol": "EXMPL",
"investorEmail": "investor@example.com"
}
}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 itstokenAddressasspenderAddressin theapproverequest. - Do not use
escrowAddressas 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 aspaymentToken.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 |
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 |
400 before anything is prepared, so nothing was broadcast and no funds
moved. Fix the allowance or the balance and prepare again.
approve for the complete allowance workflow and field mapping.
Next step
Preparing does not touch the chain. The response gives youtxId and an array of unsigned transactions — you still have to sign and submit them.
Sign every returned transaction
signerAddress, or investorAddress for newInvest and claimTokens. It must be whitelisted by Brickken, and it needs native gas on the target chain.Submit the signed payloads
POST them to /send-transactions 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.Poll until it confirms
GET /get-transaction-status with the txId. A pending status means it is broadcast but not yet mined — do not resubmit.Authorizations
Body
Required. Operation to prepare. Must be dividendDistribution for this endpoint.
dividendDistribution "dividendDistribution"
Required. Blockchain network identifier. Hex format is recommended, for example Sepolia aa36a7.
"aa36a7"
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.
"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
Required. Symbol of the token whose holders receive the dividend.
"EXMPL"
Required. Payment-token amount to distribute.
"100"
Optional. Payment token contract address. When provided, it must match the payment token configured for the token.
^0x[a-fA-F0-9]{40}$"0x5555555555555555555555555555555555555555"
Response
Successful response
Array of unsigned transaction objects ready for signing
Show child attributes
Show child attributes
Unique identifier for this transaction batch (required for /send-transactions). This is NOT a blockchain transaction hash.
"0x46adea7bdf49c576a760102e0d6bc9ecd650b3998588cd3d7f576a7973426aad"
Metadata about the operation
Show child attributes
Show child attributes