Credit a subscriber wallet

POST /api/v1/users/{id}/deposit prm_users_deposit

View as Markdown

Moves money into the subscriber's wallet and writes the matching ledger line. Idempotent on request_id through a unique constraint on the ledger itself, so the charge and the record of it cannot disagree.

replay true means this exact request already happened and nothing moved this time. It is a success, and the balance shown is the one from the original operation.

At a glance

Authentication
Staff token or session
Requires permission
prm_users_deposit Deposit to user wallet
Rate limit
t_mutate
Idempotency key
request_id

Parameters

Parameter Description
idrequired path · integer Subscriber id.
amountrequired body · number Major units, a bare JSON number. 150.50, not "150.50" and not 15050.
request_idrequired body · string Idempotency key.
issue_invoice body · boolean Also record an invoice document. Skipped on a replay.

Errors

Code When it is returned
ERR_VALIDATION400 request_id missing, too long or reserved
ERR_CONFLICT409 the request_id is already held by a different ledger line

Try it on your own network.

50 subscribers for 7 days. You pay nothing.