Credit an account
POST/v1/accounts/:account_id/credit
Adds money to an account, increasing both ledger_balance and
available_balance.
There are two ways to prevent duplicate credits, and you should use both:
Idempotency-Keyprotects against retries. Using the same key within 24 hours returns the stored response instead of creating another credit.client_transaction_ididentifies the actual credit. It must be unique for the account and doesn't expire. Reusing the same ID with the same amount returns200withIdempotent-Replay: trueand doesn't move any money. Reusing it with a different amount returns409 adjustment_already_applied.
Send both on every funding request.
Request
Responses
- 200
- 409
- 422
The updated account. Carries Idempotent-Replay: true when the
client_transaction_id had already been applied.
Response Headers
Idempotent-Replay
true when this response reproduces an earlier one — the same
Idempotency-Key, or the same client_transaction_id, seen before.
Absent otherwise.
adjustment_already_applied: this client_transaction_id was already
applied to the account with a different amount or direction. Or
idempotency_request_in_progress: the movement carrying it is still in
flight.
Well-formed but fails a business rule.