X-Application-IdX-Api-Key
GET /sdk/v1/wallet/balance
Get the agency wallet balance summary.Response
lowBalanceAlert describes your low balance alert. It is read-only here; see Low balance alerts.
Older integrations can ignore the field; nothing else in the response changed.
POST /sdk/v1/wallet/check-payout-balance
Check whether the wallet can cover a payout (including platform fee and settlement rules). This endpoint returns a bare{ sufficient: boolean } object (no success wrapper).
Body
Uses the same payload rules asPOST /sdk/v1/payouts/trigger, except payoutRecipientEmail is optional.
If you include platformFeePayerOverride and, when needed, platformFeeAgencySharePercent, the affordability check uses that override when calculating the required wallet debit.
Response
Common errors
400: invalid payload (currency not supported, >2 decimals, missing amount, etc.)401: missing/invalid SDK headers403: origin not allowed (when allowlist is configured andOriginis present)
POST /sdk/v1/wallet/check-payout-balance-bulk
Check whether the wallet can cover the total of up to 100 payouts. This endpoint returns a bare{ sufficient: boolean } object (no success wrapper).
Body
Response
Low balance alerts
A low balance alert tells you once when your wallet balance falls below an amount you choose. Set it up in the Grade app under Developer > Notifications: turn on the alert, pick the threshold amount and its currency (USD, CAD, GBP or EUR), and choose who gets the email. The SDK can read these settings but cannot change them.How you receive it
- Email to the recipients you chose. You can turn email off and keep the other channels.
- Slack or Discord, through your organization’s chat integrations. Turn on Wallet balance low under Settings > Organization > Notifications (Integrations in the classic app).
- Generic webhook, in the same place. This is the way to get a push in your own systems.
- Polling. Read
lowBalanceAlert.triggeredfromGET /sdk/v1/wallet/balance.
When an alert is sent
- You get one alert when the balance falls below the threshold.
- No further alert is sent until the balance has gone back above the threshold. After that, the next drop below it sends a new one.
- Exchange-rate changes alone never send an alert and never re-arm one. Your balance is held in USD, so Grade compares it with a fixed USD value of your threshold. That value follows the exchange rate only while your balance is above it, so only real money moving out of the wallet can cross it. The balance in the alert uses the same rate as the comparison.
- Saving a changed threshold, currency, or on/off setting starts over: the next drop below the new threshold sends an alert.
Webhook payload
The generic webhook receives aPOST with a JSON body. code is wallet.low_balance. data.eventMetadata holds the amounts, both in the threshold currency, and the same sentence used in the email and in Slack or Discord.
null for this event. settingsUrl opens your integration settings in the Grade app, and test is true only for a test message sent from those settings.
The webhook is unsigned, so treat the call as a hint and read GET /sdk/v1/wallet/balance for the current balance and alert state.