Skip to main content
POST
Prepare an STO closure
Prepares unsigned transactions for finalizing a Security Token Offering (STO). Use POST /prepare-transactions with method=closeOffer. Finalizing is what unlocks claimTokens: until it runs, investors can neither receive their tokens nor be refunded.

The end date has to have passed

An offering cannot be closed early. The escrow refuses to finalize an offering that has not started, and refuses to finalize one whose endDate has not yet passed — returning 0xffac9d14 IssuanceNotEnded(address,uint256). There is no administrative or time override, in Sandbox or in production.
An offering therefore runs for its full configured window. Since there is no minimum duration, give test offerings a short endDate so you can exercise close and claim quickly.

Success or rollback

What finalization does depends on whether the raise reached minRaiseUSD, the offering’s soft cap:
Waiting for the end date does not by itself produce a successful offering. An offering that ends under its soft cap finalizes into rollback, and claimTokens then refunds. To demonstrate a successful claim, size the soft cap so the offering can actually reach it.

Notes

  • Only the issuer of the offering can close it.
  • Existing investments remain valid throughout; nothing is lost by waiting for the window to end.
  • Finalization is irreversible once the transaction is confirmed.

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:closeOffer
required

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

Available options:
closeOffer
Example:

"closeOffer"

chainId
string
required

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

Example:

"aa36a7"

signerAddress
string
required

Required. Tokenizer wallet that signs the closure. On V2 tokens it also receives the withdrawn funds.

Example:

"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"

tokenizerEmail
string<email>
required

Required. Email of the tokenizer that owns the offering.

Example:

"tokenizer@example.com"

tokenSymbol
string
required

Required. Symbol of the token whose ongoing offering is closed.

Example:

"EXMPL"

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