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.Before you start
1
Ask Laces to turn it on
Payments only is off for every organization until Laces staff switch it
on. Email support@laces.run with your
organization’s name, your website, and what you will sell. Until it is on,
create and quote answer
403 shop_payments_not_enabled. An organizer or a
developer cannot switch it on. Your organization must also be cleared to
take payments, as for tickets (403 payments_disabled when it is not).2
Give your API key the permissions
In the Laces app (app.laces.run), an owner or
admin opens Settings → Developers and edits the key:
Then fetch a new token (clear any cached one) and check that its
scope lists payments:write. A token only carries scopes the key held
when it was issued.3
Register your site
Add your site’s origin (for example
https://shop.example.com) to the
key’s Return URL domains. source_url, on_success_url and
on_failure_url are refused unless their origin is in that list. You can
also save a default site and default return URLs; see
API keys.4
Add a webhook endpoint
Settings → Developers → Webhooks. It is how you learn that a payment
succeeded. See Webhooks for payments.
Who does what
- The buyer pays the Laces fee, on top of your amount. You send the item price; Laces adds the fee and returns the total. Never work out the fee yourself, and never put it in your prices: get a quote.
- You are the seller. Laces processes the payment. The Laces refund policy applies to every payment, and the organizer funds refunds: the price, not the fee (Refunds). Laces handles the refund: tap Request a refund on the payment in the Laces app, or email support@laces.run with the order code and the amount. The Partner API has no refund route. Where it is sent to a mobile money number as a payout, you pay the cost of sending it. If the part of your balance that payment went to doesn’t cover it, you pay the buyer directly. Some payments can’t be refunded automatically, so don’t promise your buyers an instant refund.
- Laces does not: issue a ticket, QR code or badge; keep an attendee list; hold stock or places; send reminders; check anyone in; calculate tax or shipping; or host a page for your product. All of that is yours.
Quickstart: your first payment
Step 1: Get a token
Step 2: Show the buyer the total
POST /payments/quote returns the fee and
total for each payment method. It creates nothing and needs no
Idempotency-Key. Limit: about 60 a minute per API client.
Response 200
Figures here are examples. Rates change and differ per organization, so always
show what the API returns. Amounts are whole numbers in minor units: UGX
has no minor unit, so
50000 is UGX 50,000, while 5000 in a USD organization is USD 50.00.
Next: show the total for the method the buyer picks.
Step 3: Create the payment
POST /payments. Nothing is charged yet.
Make the Idempotency-Key once per purchase, save it, and send the same
one on every retry.
Response 201
data.order.id with your purchase before you go on. Show
data.order.total as the amount due. The answer may also carry
payment_gateway; ignore it. A retry with the same key and body answers 200
with the original answer (status cart, even if it has been paid since)
and the message “Payment already created (idempotent replay)”.
Step 4: Send the buyer to pay
POST /orders/{orderId}/pay, with a second
Idempotency-Key. For mobile money, send the payer’s number:
Response 200
data.next_action.kind:
More: Mobile money.
Step 5: Wait for proof, then fulfil once
Proof of payment is a server-sideGET /orders/{orderId} that says
"status": "paid" now. A verified order.paid webhook tells you when to look.
A return URL, an email, or anything the browser tells you is not proof.
Response 200
requested_amount and requested_currency are what you asked for,
that the order is yours (partner_reference), that status is paid now,
then fulfil once.
total can differ from your quote, because a card buyer can change how they
pay on the Laces page.
No webhook is sent when a buyer simply walks away. Read the order if you
need to know, for example before you release something you were keeping for
them.
The whole thing in Node
laces.js
retryPayment picks or creates an order and gives you
the total to show, pay charges it.
checkout.js
Your
db here: saveAttempt, attemptsOf(purchaseId) (oldest first),
ticketOrdersOf(purchaseId) ([] if you never sold event tickets),
stateOf(purchaseId) ({ fulfilled, undone, released }, read now, see
Webhooks) and withLock(purchaseId, fn), which runs one fn at a time for a purchase on
all your servers, so a double click can’t pay twice. The lock must outlive
the 60 s pay timeout plus the reads: give it 5 minutes, released when fn
ends.
The webhook handler is on Webhooks for payments.
Example 1: a product
The quickstart above is this example: one jersey,product: "jersey", your
cart id in metadata, the product page in source_url.
Example 2: an event on your own site
You run the registration form. Laces only collects. One family registers one adult and two children at UGX 75,000 each, and pays once.- Save the registration on your side first, with the names, guardians and consent. Laces never sees them. Keep the places for the buyer: Laces cannot hold them.
-
Quote the sum:
3 × 75000 = 225000. Part of the fee is per payment, so never multiply a one-place total.Response 200 -
Create the payment.
productis the event: the same value for every payment for that event, so the app totals them together.metadatacarries an id from your system, never attendee details.Response 201 -
Pay with
POST /orders/Zs5kF8nA/pay, as in step 4 above. -
Fulfil on
order.paid: confirm the registration, send your own ticket or badge. When your own deadline passes, read the order: release the places if it isfailedorexpired, wait if it is live.order.failedalone is not enough, the buyer may be retrying. If a lateorder.paidarrives after that, rebook, or ask Laces to refund it.
order.paid
What the buyer receives from Laces
Nothing else: no reminders, no abandoned-cart email, no ticket. No email sends
a buyer to a Laces payment page. Send your own order confirmation.
Testing
There is no sandbox, andis_test_mode is always false. Quotes and creating
a payment move no money, so test those freely. The pay call moves real
money: make one small payment from your own phone, check the webhook, then
stop. See Going live.
Moving from event orders
Already selling throughPOST /orders and an event on Laces? Your token, pay
call, polling and webhook endpoint stay. You swap POST /orders for
POST /payments and stop needing an event id. Old orders stay where they are
and need no migration. Full steps, payloads and a prompt for your LLM:
Move from event orders.
Next
Mobile money
Prompts, retries and limits.
Card and return URLs
The hosted page and the way back.
Countries and currencies
Buyers in another country.
Webhooks
Verify, fulfil once, reconcile.
Errors
Every code and what to do.
Going live
The launch checklist.