WalletD developers
Ledger and reporting

Update the tenant fee plan (audited; admin)

Replaces the fee rule for each money path the body names and leaves every path it does not name untouched, so naming a path is what asks for it to change.

PUT/v1/fee_plan

Replaces the fee rule for each money path the body names and leaves every path it does not name untouched, so naming a path is what asks for it to change. Requires fees:manage and a machine or staff principal; a user token is refused forbidden (403). Out-of-range basis points or amounts give invalid_request (400) and an unknown tenant tenant_not_found (404). The change is audited with before and after.

Authorization

bearerAuth
AuthorizationBearer <token>

A tenant API key (sk_{env}_{id}_{secret}), a wallet user token, or an IdP access token. Which principal the credential resolves to decides the scopes it carries; see the authentication guide.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Each named path's rule is replaced whole and every unnamed path is left alone, so clearing a cap is expressible by sending the path without a max_fee.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

curl -X PUT "https://example.com/v1/fee_plan" \  -H "Content-Type: application/json" \  -d '{}'
{  "fees": {    "payment": {      "bps": 0,      "flat": 0,      "min_fee": 0,      "max_fee": 0    },    "subscription": {      "bps": 0,      "flat": 0,      "min_fee": 0,      "max_fee": 0    },    "commission": {      "bps": 0,      "flat": 0,      "min_fee": 0,      "max_fee": 0    },    "p2p": {      "bps": 0,      "flat": 0,      "min_fee": 0,      "max_fee": 0    },    "topup": {      "bps": 0,      "flat": 0,      "min_fee": 0,      "max_fee": 0    },    "payout": {      "bps": 0,      "flat": 0,      "min_fee": 0,      "max_fee": 0    }  },  "commission_mode": "deduct"}