Every request on this page goes to
https://connect.laces.run/v1, from
your server, with Authorization: Bearer <token>. Laces must first turn
on payments for your organization, and your API key needs payments:write,
orders:write and orders:read. Never send an
organization id: Laces takes the organization from the token. The client
secret stays on your server, never in a browser or an LLM chat. There is
no sandbox: a pay request moves real money.Amounts are whole numbers in minor units
A decimal, a string, zero, a negative number, or an amount too large or too
small to charge is
400 invalid_amount. currency is optional; if it is not
your organization’s, the answer is 400 currency_mismatch.
Laces can set a highest amount for your organization:
400 amount_too_large. It applies to your amount, before the fee.
A buyer in another country: payer_country
Send it on both the quote and the create. Accepted today: UG, KE,
GH, RW, ZM. Anything else is 400 unsupported_country, and the error
lists the accepted codes. US, GB and EU are organization zones, not payer
countries: for a card buyer there, leave payer_country out. Also leave it out
for a card buyer in Zambia: with ZM there is no card
(400 rail_unavailable), without it they can pay by card where your organization’s country has it.
Left out, the buyer is taken to be in your organization’s country.
Response 200 (a Ugandan organization, a buyer in Kenya)
currency, price_minor and every fee and total are now
in the buyer’s currency. fx.rate is how many units of currency one unit
of source_currency buys, and fx.source_price_minor is what you asked for.
There is no fx when no conversion is needed.
The quote’s rate is indicative. The create uses a fresh one, so show
order.total from the create before the buyer pays:
Response 201
The rate holds for the 15-minute payment window. After that, pay answers
409 rate_lock_expired: create a new payment. If no rate can be had, create
and quote answer 503 fx_unavailable: try again shortly.
Money from a buyer in another currency lands in your organization’s balance
in that currency. The organizer converts it in the Laces app.
Organizations in US dollars, pounds or euros
Their buyers pay by card only:Quote for amount 5000 in a USD organization
laces_fee_minorandtotal_minorarenull: no mobile money.- Leave
payment_methodout and it iscard. momoorairtelis422 no_rate_for_method.- Phone numbers must carry the country code (
+…), or the answer is400 invalid_request.
Phone numbers
customer.phone is a contact, and optional. Best sent as + and the country
code. A local number is read in payer_country if you sent one, else in your
organization’s country. The number that is charged is msisdn on the pay
call: local form is accepted only for Ugandan numbers, and it must be a
number of the payment’s country (400 invalid_msisdn). A Kenyan buyer needs
payer_country: "KE".