Lead wallets
Add cash or credit to a buyer’s wallet, or take it back
Needs the orders:write scope. About scopes
The same as adding to a wallet on the Lead payments screen: cash received outside the platform, or credit, positive or negative (never below zero), with the reason the ledger keeps. Send an Idempotency-Key: a retry adds one entry.
keyheader
AuthorizationBearer <traki_account_…>buyerId*stringFormat
uuidapplication/json- body
cash?numberRange
-1000000 <= value <= 1000000Default
0credit?numberRange
-1000000 <= value <= 1000000Default
0reason*stringLength
3 <= length <= 300Success
application/json- response
buyer*|nullcurrency*stringcashBalance*stringcreditBalance*stringminimum*string|nullautoRecharge*string|nulllastEntryAt*string|nullopenPayments*integerRange
-9007199254740991 <= value <= 9007199254740991curl -X POST 'https://api.traki.io/v1/account/buyers/497f6eca-6276-4993-bfeb-53cbbbba6f08/lead-wallet/entries' \ -H "Authorization: Bearer $TRAKI_KEY" \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: a-unique-id-for-this-change' \ -d '{ "reason": "string"}'Example Response
{ "buyer": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "externalId": "string", "name": "string" }, "currency": "string", "cashBalance": "string", "creditBalance": "string", "minimum": "string", "autoRecharge": "string", "lastEntryAt": "string", "openPayments": -9007199254740991}