Skip to Content
Developers
Lead wallets

Add cash or credit to a buyer’s wallet, or take it back

Needs the orders:write scope. About scopes

Try it with a test key

Sends to https://api.traki.io

Test keys only. The key stays in this page while it is open and is never saved.

/v1/account/buyers/{buyerId}/lead-wallet/entries

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.

Authorization

key
headerAuthorizationBearer <traki_account_…>

Path Parameters

buyerId*string
Formatuuid

Request Body

application/json
  1. body
cash?number
Range-1000000 <= value <= 1000000
Default0
credit?number
Range-1000000 <= value <= 1000000
Default0
reason*string
Length3 <= length <= 300

Response Body

Success

application/json
  1. response
buyer*|null
currency*string
cashBalance*string
creditBalance*string
minimum*string|null
autoRecharge*string|null
lastEntryAt*string|null
openPayments*integer
Range-9007199254740991 <= value <= 9007199254740991
Example Request
curl -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}