Skip to main content
WalletVersion: v3

Add complimentary credits to a sub-account wallet

POST/wallet/balance/complimentary-credits

Adds complimentary credits to one of the agency's sub-account wallets and returns the resulting balance. The agency is resolved from the access token; the sub-account is named by the required locationId field. The amount is added to the existing complimentary credit balance. Requires an Idempotency-Key header: the same key replays the original response instead of granting the credits a second time, so a timed-out request is safe to retry.

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your access token.

Scope:wallet.write
Auth methods:OAuthPrivate Integration
Token type:Agency Token

Request​

Headers

Versionstringrequired

API Version

Available optionsv3
Example:v3
Idempotency-Keystringrequired

Unique key identifying this grant, for example a UUID. Reusing a key returns the original response without crediting the wallet again. Keys are remembered for 24 hours and are scoped to the sub-account.

Example:2f1c7e9a-5b3d-4f8a-9c21-7d6e4b0a1f33

Body

locationIdstringrequired

Sub-account whose wallet is credited. Required: credits are granted by an agency to one of its sub-accounts.

Example:AUKAtFVo0lWezBsBQ3FE
complimentaryCreditsAmountnumberrequired

Credits to add to the sub-account wallet. Added to the existing complimentary credit balance rather than replacing it, so two calls with 100 leave the wallet 200 higher. Must be greater than zero -- this route only grants credits, it cannot take them away.

Possible values: > 0

Example:100

Response

Complimentary credits added successfully

walletIdstringrequired

Wallet the balance belongs to: the sub-account id for a Sub-Account token, the agency id for an Agency token reading its own wallet.

Example:xyz789
balancenumberrequired

Current wallet balance

Example:1500.5
complimentaryCreditsnumber

Complimentary credits on the wallet. Sub-account wallets only -- agency wallets have no complimentary credits, and the field is omitted rather than reported as zero.

Example:100