POST /prepare-transactions endpoint
and sign-and-send flow apply to both versions.
Which version a token uses
- New tokens are V2.
newTokenizationcreates a V2 token on every network where Protocol V2 is active. You do not choose: there is no version field to send, and Brickken picks the factory for the requested network. - Existing tokens keep their version. A token created on Protocol V1 stays on V1, and its operations keep following the V1 flow. Every later call branches on the token’s own version, so you never send a version either.
- Networks are enabled one by one. In Sandbox, Ethereum Sepolia runs Protocol V2. Check
get-network-infofor any other network:universalEscrowAddressandpaymentHandlerAddressare set where Protocol V2 is active andnullwhere it is not. A network with no tokenization factory answersnewTokenizationwithTokenization is not available on the requested chain.
Send
tokenType: "FUND" to create a fund. The asset keeps FUND as its business type and the factory
uses contract type 4 (STO7943). REVENUE_SHARE, numeric contract types, and unknown business
types return 400 on V2 newTokenization.
Every prepare is simulated
Before returning unsigned transactions, the API simulates them against the chain. A transaction that would revert is rejected at prepare time with the decoded reason, for examplev2Tokenization simulation failed: <reason>, instead of failing after you sign and pay gas.
Method by method
newTokenization
newTokenization keeps its fields, with these
differences on V2:
transactionsin the response is a single transaction object, not an array.infocarriesfactoryAddress, plusfeeTokenandfeeAmount: the token-creation fee, paid by the signer. The signer needs an allowance tofactoryAddressfor at leastfeeAmountoffeeTokenbefore you send, or the simulation fails.preMintsandinitialHoldersare rejected. Create the token first, thenmintTokento the holders.initialTokenSupplyandshareholdersare ignored: a V2 token starts with zero supply.DEBTandBILL_FACTORINGrequire a positivesupplyCapand an explicitdebtInterestRate. Enter the rate as a percentage from 0 to 100, with up to two decimal places. Zero is valid.
whitelist
A V2 whitelist is onemulticall on the token that enables both sending and receiving for each
address. The signer needs the token’s WHITELIST_ROLE, otherwise the prepare fails with
Signer <address> does not have WHITELIST_ROLE on token <address>.
get-whitelist-status reports an address as whitelisted
only when it can both send and receive.
mintToken
Mints are grouped in onemulticall on the token. When some recipients still need whitelisting, the
response holds two transactions, the whitelist first and the mint second. Sign and send them in order.
approve, transferFrom, transferTo
Unchanged: standard ERC-20 calldata. The token still enforces its whitelists when the transfer executes.burnToken
newSto
newSto validates the offering terms before preparing a
transaction. Publish both the Subscription Agreement and the By-laws. New start dates require five
minutes of lead time, and offerings can last up to one year. See the V2 offering rules
for cap, ticket, price, and supply validation.
An offering can require several calls while Brickken configures the token and the Universal Escrow.
- When
nextActionis"wait-and-retry", including 202 responses, wait and repeatnewStowith the same body. Any returned transaction ID refers to a transaction already tracked by Brickken. - If the response calls for signing, sign and send the returned transaction. After a confirmed
tokenSetup, repeatnewStowith the same body. The issuance transaction creates the offering. - If the offering terms change, the API can replace an unsigned issuance prepared with older terms. An issuance already broadcast must settle first.
- A failed fee configuration returns 409. Contact Brickken if it fails.
newInvest
On V2 the investor buys from the network’sUniversalEscrow:
- The investor must approve the payment token to the escrow first. Without that allowance the prepare
fails with
Insufficient payment token allowance. Prepare and confirm the approval before investing. - The minimum ticket applies, except when the amount left in the offering is smaller than it.
- An investment larger than what is left is accepted, and the escrow takes only the remaining amount.
closeOffer
Finalizes the issuance on the escrow and withdraws the raised funds to the signer. An offering that is already closed answers 409Cannot finalize issuance: IssuanceNotActive. If you already sent a
close transaction, track its hash instead of preparing a new one.
claimTokens
One claim per investor, prepared and sent like any other transaction.dividendDistribution
dividendDistribution on V2 supports
STO7943 assets, including FUND. The signer needs the payment distributor role for the asset.
Approve the payment token to the network’s paymentHandlerAddress from
get-network-info before preparing the distribution.
Debt and Bill Factoring repayments
V2DEBT and BILL_FACTORING assets use the same DTO7943 repayment flow. In the Brickken
dashboard, Send Dividends prepares capital and interest repayments and shows confirmed repayments
in the asset’s repayment history.
Repayments use the payment token from the first confirmed offering. Keep that payment token for
subsequent offerings on the same asset. The dashboard can resume an active repayment while its
required steps confirm.
The public API’s dividendDistribution method is limited to STO7943 on V2. Initiate DTO7943
repayments from the dashboard.
Changes for every token, V1 included
This release also changes behaviour that does not depend on the token’s version.Signer and identity fields come from your API key
Signer and identity fields come from your API key
For
newSto, whitelist, dividendDistribution and closeOffer, the API sets tokenizerEmail
and signerAddress from your API key, and the token must belong to your own company. Otherwise the
call fails with 403 API key does not own token symbol "<SYMBOL>" (or it does not exist).For newInvest and claimTokens, investorEmail is required. The API signs with the investor’s
registered wallet, and the investor must already be related to one of your tokens: holding it,
whitelisted on it, or invited to it.get-allowance returns owner-to-spender allowances
get-allowance returns owner-to-spender allowances
get-allowance now reads allowance(ownerAddress, spenderAddress).
Before this release the two addresses were swapped. The value is formatted with the payment token’s
own decimals instead of 18, and missing data answers 404. Re-check any code that compensated for
the old behaviour.A batch where every transaction fails returns an error status
A batch where every transaction fails returns an error status
When every transaction in a
send-transactions batch fails, the response now carries the error’s
HTTP status (or 502) instead of 200 with success: false. Check the status code before the body.Another key's transaction is not found
Another key's transaction is not found
get-transaction-status for a transaction that belongs to a different API key answers 400
Transaction not found.Read endpoints
Read endpoints
get-network-infoaddspaymentHandlerAddressanduniversalEscrowAddress.- A missing offering answers 404
Sto not found. get-stos,get-sto-by-id, andget-sto-balancereport an offering asSCHEDULEDbefore its start date. It still occupies the token’s active offering slot.maxTokenSupplyinget-token-infois a decimal serialized as a string.
Not available through the API yet
- Burning a V2 token, as described above.
- Freezing balances, forced transfers, and granting or inspecting on-chain roles.
- Initiating capital and interest repayments for
DEBTandBILL_FACTORINGassets.
Tokenize an asset and run an STO
The full lifecycle, end to end.
Troubleshooting
Decode a failed call, from validation errors to raw revert data.