What you’ll need
- Your secret key.
- The
accountIdyou are settling into, from Read Your Balances. - A pair with real liquidity behind it — see Find a Liquidity Provider.
Express vs. the intent flow
1
Intent flow — two calls to price
POST /partners/marketplace/intent returns a quote with a ttl, and you
can inspect or negotiate before committing.2
Express — one call to price
POST /partners/marketplace/express/quote returns the same priced quote
directly.3
From here they are identical
Accept, authorize, poll, complete — the same four calls on the same paths.
The real difference is the
ttl. The intent flow hands you a quote with a
countdown you can show a customer before they commit. Express gives you no
ttl until you accept — so express suits a flow where you price and commit in
one motion, and the intent flow suits one where a human is deciding.Step 1: Create the express quote
quoteId.
amount (5) and totalSourceAmount (5.17301038) differ by the fee of
0.17301038 — the buyer pays slightly more than the headline amount. The
separate transactionFee of 20.00 NGN is charged on the destination side.
Two fees, two currencies.The pair must have real liquidity. Asking for more than a provider holds
returns 400
"Unable to fulfill requested volume at the moment." — a
different error from "No providers available", which means nobody trades the
pair at all. See
Find a Liquidity Provider.Step 2: Accept the quote and charge the buyer
From here the flow is identical to the intent flow. Note the path dropsexpress:
AWAITING_PAYMENT, mobileMoneyPayIn has appeared, and ttl
is 3599 — the countdown starts here, not at pricing.
Mobile money on dev is GHS only, and provider codes are lowercase —
mtn, airtel, telecel.Step 3: Authorize with the OTP
Step 4: Poll until the payment settles
In test mode this settled within about four seconds. Poll every few seconds
rather than in a tight loop, and give up against
ttl rather than a fixed
number of tries.Step 5: Complete the trade
status is SUCCESSFUL and ttl is 0. Done.
Confirming the money moved
Reading the NGN balance before and after:totalDestinationAmount.
Completing twice is safe. Calling
complete a second time returned 200
with SUCCESSFUL again and the balance stayed at 5000127232.75 — no double
credit. A retry after a network timeout is a safe no-op.NGN/GHS listing went
from 768.27 to 190.27 — the 578.00 this trade consumed. That is the
clearest independent confirmation the trade really settled.
When things go wrong
What to do next
- Let a Buyer Pay for a Trade — the intent flow, with a
ttlto show a customer - Find a Liquidity Provider — size a trade before you quote
- Read Your Balances — confirm the trade landed