Wallet

The prepaid wallet reserves money for an order, charges for what is delivered, and returns the rest.

Your wallet is prepaid, in US dollars. Every amount on this page, and every wholesale cost the wallet pays, is an integer in US cents. What you charge a customer can be in another currency: a price list, quote, sale or invoice carries its own currency, in minor units too. See Currency.

curl https://resellerhq.com/api/v1/wallet \
  -H "Authorization: Bearer $RHQ_API_KEY"
{ "available": 20500, "held": 4500, "currency": "USD" }
  • available is what you can spend now.
  • held is reserved for orders still in progress.

How an order is paid for

  1. Reserve. The order's total moves from available to held. If the wallet cannot cover it, the order is refused with 402 insufficient_funds and nothing changes.
  2. Charge. Each item that is delivered is charged from the reserved amount.
  3. Return. Anything reserved for items that could not be delivered goes back to available.

So a failed order costs nothing, and a partly filled order costs only the part that was filled.

History

GET /v1/wallet/transactions lists every movement, newest first:

kindMeaning
topupFunds added
holdReserved for an order
captureCharged from a reservation
releaseReservation returned
refundMoney returned after a charge, for example a cancelled number

Every movement is recorded as a balanced double-entry journal line, so the history always adds up to the balance.

Adding funds

In the sandbox, add test funds from the Wallet page. On the live side, funds are added by invoice; card payments are not connected yet.

In the API reference