Skip to main content
This guide walks one trade from start to finish. A buyer agrees a rate, pays with mobile money, approves the charge on their phone, and the trade settles into your account. Every step is one API call, run in the order shown. Each one needs something from the call before it.

What you’ll need

  • Your secret key. Every call in this guide authenticates with it.
  • An account in the currency you are buying, to settle into. See Get Balances.
  • A buyer’s mobile money number on a supported provider.
Use test mode while you follow this guide. No real money moves and no real phone is charged.
These endpoints take a secret key, not a dashboard token. A JWT returns 403 Forbidden with the message This endpoint requires one of the following authentication types: [SECRET_KEY].

The shape of the flow

1

Create an intent

You say what you want to trade and at what rate. You get a quote back.
2

Pick a mobile money provider

You look up which providers work for the buyer’s currency.
3

Accept the quote with the buyer's payment details

This locks the trade and charges the buyer’s phone in one call.
4

Authorize with the OTP

The buyer gets a code and you pass it back.
5

Watch the payment, then complete the trade

You poll until the payment succeeds, then finalise.

Step 1: Create a marketplace intent

An intent is your side of the deal: the two currencies, how much, and the rate. Check the rate first:
The parameters are base and quote, not source and destination.
Then create the intent:
Keep the quoteId — every later call needs it. Two things to read carefully:
  • allocationResult shows who is filling your trade. fullAllocation: true means the whole amount was matched. The rate you get is weightedAverageRate, which comes from the liquidity available and can differ from the rate you asked for.
  • ttl is how many seconds the quote lives. Here, 899.
If no liquidity provider covers your pair, this returns 400 with "No providers available for the given intent configuration" — even when a rate exists for that pair. A rate is not the same as someone offering to trade.
Reference: Create Payment Intent

Step 2: Find the buyer’s mobile money provider

Check which currencies can be paid by mobile money:
Then list the providers for that currency:
The code is what you pass in the next step. Codes are lowercase.
currency is required. Asking for a currency mobile money does not support returns 400 unsupported_currency.
References: List Mobile Money Currencies · List Mobile Money Providers

Step 3: Accept the quote and charge the buyer

This one call does two things: it locks in the trade, and it starts the mobile money charge on the buyer’s phone.
The quote moves to AWAITING_PAYMENT and the buyer gets a prompt on their phone. authorizationMode tells you what the provider wants next — otp here.
ttl resets on accept. It was 899 seconds on the quote; now it is 3599.
Reference: Accept Quote

Step 4: Authorize with the OTP

The buyer reads the code off their phone and gives it to you.
The response is the full quote again. What changes is the message inside metadata.mobileMoneyPayIn:
The code was accepted. The money has not arrived yet. A wrong or expired code returns 400. The buyer can request a new one and you call this again. Reference: Authorize Quote Payment

Step 5: Watch the payment

Poll until the payment settles.
Watch metadata.mobileMoneyPayIn.status, not the top-level status. The payment status moves inProgresssuccessful while the quote itself stays on AWAITING_PAYMENT until you complete it in the next step.
In test mode the payment settles in a few seconds. Poll every few seconds rather than in a tight loop.
Reference: Get Order Status

Step 6: Complete the trade

Once the payment reads successful, finalise it.
status reads SUCCESSFUL and ttl is 0. The trade is done. Check your balances and you will see the money move — the destination account up by totalDestinationAmount, the source account down by totalSourceAmount:
Reference: Get Complete Quote

When things go wrong

See Error Codes for the full list.

What to do next