Skip to content

Adjust a sub-account's balance

PATCH
/v1/Accounts/{auth_id}/Balances/{tenant_auth_id}
curl --request PATCH \
--url https://api.siprtc.io/v1/Accounts/example/Balances/example \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "balance": 25.5 }'

Vendor accounts only. Adds balance US dollars to the prepaid balance of one of the vendor’s own sub-accounts; a negative amount debits it. The amount is added to the current balance (it never replaces it), and a debit is not limited: it can take the balance below zero. Each successful adjustment is recorded as a completed MANUAL_RECHARGE transaction on the sub-account, with the vendor as parent. The vendor’s own balance is not changed. An account cannot change its own balance through the API; only a vendor can adjust its sub-accounts’. Any auth_id in the body is ignored: the sub-account is always the one in the path.

auth_id
required
string

Auth ID of the vendor account

tenant_auth_id
required
string

Auth ID of the vendor’s sub-account to credit or debit

Amount to add (or, if negative, to take away)

Media type application/json
object
balance
required

Amount in US dollars to add to the sub-account’s prepaid balance. A negative value debits it. Must not be 0. The amount is added to the current balance; it does not replace it.

number

Example

25.5

Balance changed (body: "Balance updated")

Media type application/json
string

Example generated

example

The body is not valid JSON (body: "Binding Error")

Media type application/json
string

Example generated

example

Missing or wrong credentials (body: "Authentication failed")

Media type application/json
string

Example generated

example

balance is missing or 0 (body: the sub-account’s Auth ID)

Media type application/json
string

Example generated

example

The path account is not a vendor (body: "Vendor AuthID is not valid vendor")

Media type application/json
string

Example generated

example

The sub-account does not exist or is not this vendor’s (body: "Not Found")

Media type application/json
string

Example generated

example