Deposit to wallet
Wallets
Deposit Between Wallets (Currency Conversion)
Move funds from one of your wallets to another, with automatic currency conversion and fee deduction.
POST
Deposit to wallet
Overview
POST /wallets/deposit moves funds between two wallets you own, applying currency conversion and a fee. The sourceWallet is debited by totalAmount (amount + feeAmount); the destinationWallet is credited by the converted amount.
This endpoint is used to internally rebalance your wallets — for example, to convert XAF you collected into USD before issuing cards.
Note: This endpoint is not a customer-facing payment endpoint. To charge a mobile-money account usePOST /payment/collectorPOST /wallets/fund.
When to use it
- Convert an XAF/XOF/CDF balance to USD so you can issue cards.
- Internally rebalance funds between currency-segregated wallets you own.
Prerequisites
- Both
sourceWalletanddestinationWalletbelong to your company. - The
sourceWallethas at leasttotalAmountavailable. - You have a valid current exchange rate — typically obtained via
POST /company/exchange-rates/convert.
Request
Headers
| Name | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <access_token> |
Content-Type | Yes | application/json |
Body
| Field | Type | Required | Description |
|---|---|---|---|
sourceWallet.id | string | Yes | UUID of the wallet to debit. |
sourceWallet.currency | string | Yes | The source wallet’s currency. Sanity check. |
sourceWallet.amount | number | Yes | The amount to convert (in source currency). ≥ 0.01. |
sourceWallet.feeAmount | number | Yes | Conversion fee in source currency. ≥ 0. |
sourceWallet.totalAmount | number | Yes | Total to debit from source = amount + feeAmount. |
destinationWallet.id | string | Yes | UUID of the wallet to credit. |
destinationWallet.currency | string | Yes | Destination wallet’s currency. |
destinationWallet.amount | number | Yes | Converted amount to credit (in destination currency). ≥ 0.01. |
exchangeRate.rate | number | Yes | Rate applied: destination_amount = source_amount × rate. ≥ 0.0001. |
exchangeRate.fromCurrency | string | Yes | Must equal sourceWallet.currency. |
exchangeRate.toCurrency | string | Yes | Must equal destinationWallet.currency. |
Response
200 — Deposit successful
Error responses
| Status | message example | Trigger |
|---|---|---|
400 | "Insufficient source wallet balance" | Source wallet balance < totalAmount. |
400 | "Currency mismatch" | One of the currency fields doesn’t match its wallet. |
400 | "Invalid totalAmount" | totalAmount ≠ amount + feeAmount. |
403 | "Only authenticated users can perform wallet deposits" | Token is a system-level token rather than a user token. |
404 | "Wallet not found" | One of the wallet IDs is invalid or belongs to another company. |
Code examples
cURL
Node.js (axios)
Related
POST /company/exchange-rates/convert— quote a conversion before applying.GET /wallets— verify the new balances after the deposit.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json