Wallet Distribution
Set Token Wallet Distribution
Sets how a person's pay is split in stablecoin across their verified wallets (percentage or fixed amount). Business-rule failures (payroll cutoff, blocked country, terms not accepted, over the limit) return HTTP 200 with success false and a message.
This is the v1 (legacy) API. The current API is in the API reference.
curl --request POST \
--url 'https://app.toku.com/api/tokuApi/v1/setTokenWalletRefsDistribution' \
--header 'Authorization: Bearer <token>' \
--header 'x-role-type: USER' \
--header 'Content-Type: application/json' \
--data '{
"roleInOrgID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tokenWalletRefsConfig": [
{
"walletID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"distRatio": 0.1,
"distributionType": "PERCENTAGE",
"fixedAmount": 0
}
],
"isContractorStablecoinPayroll": true,
"hasAcceptedTerms": true,
"userAgent": "string"
}'{
"data": {
"success": true,
"message": "string"
},
"error": null
}Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your API token.
Headers
x-role-typestringrequiredSeat role the token acts as. The token's creator must hold this role in the token's organization; TOKU_ADMIN and unknown values are refused with 401. This operation accepts USER, CLIENT_ORG_ADMIN, FINANCE_ADMIN, CLIENT_ORG_APPROVER and INVESTOR; other roles get 403. FINANCE_ADMIN and CLIENT_ORG_APPROVER seats are refused in new-system organizations.
Available options: USER, CLIENT_ORG_ADMIN, FINANCE_ADMIN, CLIENT_ORG_APPROVER, INVESTOR
Body
application/json
roleInOrgIDstring<uuid>requiredtokenWalletRefsConfigobject[]requiredShow child attributes
walletIDstring<uuid>requireddistRationumberrequiredShare of pay for this wallet, 0 to 1. Use 0 with FIXED_AMOUNT.
distributionTypestringDefault PERCENTAGE
Available options: PERCENTAGE, FIXED_AMOUNT
fixedAmountnumberRequired with FIXED_AMOUNT
isContractorStablecoinPayrollbooleanContractor payroll: allows up to 100% and skips the terms check
hasAcceptedTermsbooleanThe person accepts the stablecoin payment terms with this save. Needed for a first positive allocation if they have not accepted the current terms before.
userAgentstringStored with the terms agreement
Response
200Token distribution configured
dataobjectrequiredShow child attributes
successbooleanrequiredmessagestringSet when success is false
errorobject | nullrequiredAlways null on success
401The token is missing, invalid or expired
errorstringrequiredWhat went wrong
403The token's seat doesn't have the permission this operation needs
errorobjectrequiredShow child attributes
messagestringrequired429Too many requests from this address or token. Wait for the number of seconds in the Retry-After header, then retry.
errorstringrequiredWhat went wrong
500The operation failed. This includes input that doesn't match what the operation accepts; error.message says what was wrong.
errorobjectrequiredShow child attributes
messagestringrequired