Funds
Add or Remove Funds
Credit or debit a customer’s balance when they pay you outside Juiced.
POST
Use this when a customer pays you through your own billing system, like an invoice or a bank transfer, and the money belongs in their Juiced balance. It works just like adding or removing funds on the customer in Juiced. Their bids see the new balance right away, and the customer’s activity timeline shows your API key’s label.
No card is charged. A credit adds to the customer’s balance and a debit takes from it, and that’s all that happens. Collect the payment yourself before you send the credit.
- A
creditaddsamountto the customer’s balance. Add areceipt_urlto link the customer to your own receipt. It’s only accepted on credits. - A
debittakesamountfrom the customer’s balance. It can’t be more than the customer’sbalancefrom Get a Customer, which subtracts funds held for pending pings. A larger debit is refused withvalidation_failedonamount, the message names that balance, and nothing moves.
amount is in dollars, with at most 2 decimal places, from 0.01 up to 99,999,999.99. It’s always positive, since type sets the direction. description is required and shows on the customer’s transactions in their portal, so write it for them.
The response’s balance is the customer’s wallet balance right after this credit or debit, before funds held for pending pings. It’s the same figure the transaction shows in List Transactions, and a replayed response carries it too.
Archived customers can be credited and debited too. Credits and debits for one customer run one at a time, so each request sees the balance the one before it left. This endpoint needs the funds:write ability.
The Idempotency-Key header is required
Because this endpoint moves money, every request must send anIdempotency-Key header. A request without one returns 422 with validation_failed, the error names the Idempotency-Key header, and no money moves.
Use an ID from your own system, such as your payment or invoice ID, so a retry of the same payment always sends the same key. A key belongs to the customer URL it was first sent to.
- Same key, same body, same customer within 24 hours returns the first response again, with an
Idempotent-Replayed: trueheader. The funds only move once. - Same key, different body returns
409withidempotency_conflict. - Same key and body for a different customer also returns
409withidempotency_conflict, and nothing moves. It’s never replayed as the first customer’s response. - The first request is still running returns
409withidempotency_in_progressand aRetry-Afterheader. - A server error (
5xx) moves no money and isn’t saved against the key, so send the same request again.
Authorizations
An API key from Configure → API Keys (it starts with jz_live_), sent as a bearer token. See API Keys.
Headers
Required. An ID from your own system, such as your payment ID. A retry with the same key and body to the same customer within 24 hours returns the first response, and the funds move once. The same key sent for a different customer, or with a different body, is a 409 conflict.
Maximum string length:
255Body
application/json

