Skip to main content
POST
Prepare a token claim
Prepares unsigned transactions for claiming from a Security Token Offering (STO) investment. Use POST /prepare-transactions with method=claimTokens. The prepared transaction is signed and sent by the investor.

The offering must be finalized first

claimTokens reverts with 0x04c7a3b1 IssuanceNotInRollback(uint256) while the issuance has not been finalized. The argument is the issuance index, not an address.Run closeOffer first — and closeOffer itself only works once the offering’s endDate has passed.

What you get back

The same call does one of two things, decided at finalization:
  • Successful offering — the purchased tokens are released to the investor.
  • Rolled-back offering — the payment token is refunded instead, because the soft cap was not reached.

Testing a successful claim end to end

Because there is no minimum offering duration, a short offering is the reliable way to exercise the full lifecycle:
1

Create a short offering with a reachable soft cap

Set minRaiseUSD low enough that your test investment alone can meet it, and set endDate a few minutes out. Remember the Z suffix on both dates.
2

Whitelist, approve and invest

Invest at least the soft cap, so finalization resolves to success rather than rollback.
3

Wait for the end date

There is no way to close early.
4

Close the offer

Run closeOffer and wait for it to confirm.
5

Claim

claimTokens now releases the tokens.

Notes

  • The investor must have participated in the offering.
  • Each investor can only claim once.

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

Authorizations

x-api-key
string
header
required

Body

application/json
method
enum<string>
default:claimTokens
required

Required. Operation to prepare. Must be claimTokens for this endpoint.

Available options:
claimTokens
Example:

"claimTokens"

chainId
string
required

Required. Blockchain network identifier. Hex format is recommended, for example Sepolia aa36a7.

Example:

"aa36a7"

investorAddress
string
required

Required. Investor wallet address that claims the tokens.

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x1111111111111111111111111111111111111111"

investorEmail
string<email>
required

Required. Email of the investor. The investor must already exist in Brickken.

Example:

"investor@example.com"

tokenSymbol
string
required

Required. Symbol of the token to claim. Its offering must have completed successfully.

Example:

"EXMPL"

signerAddress
string

Optional and ignored for this method. The prepared transaction is always signed and sent by investorAddress.

Example:

"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"

Response

200 - application/json

Successful response

transactions
object[]
required

Array of unsigned transaction objects ready for signing

txId
string
required

Unique identifier for this transaction batch (required for /send-transactions). This is NOT a blockchain transaction hash.

Example:

"0x46adea7bdf49c576a760102e0d6bc9ecd650b3998588cd3d7f576a7973426aad"

info
object

Metadata about the operation