Pay an order
curl --request POST \
--url https://connect.laces.run/v1/orders/{orderId}/pay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"msisdn": "0763494235"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({msisdn: '0763494235'})
};
fetch('https://connect.laces.run/v1/orders/{orderId}/pay', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://connect.laces.run/v1/orders/{orderId}/pay"
payload = { "msisdn": "0763494235" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://connect.laces.run/v1/orders/{orderId}/pay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'msisdn' => '0763494235'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"code": 200,
"message": "Payment initiated successfully",
"data": {
"order_id": "Hk2mQ8vR",
"order_code": "LC-7K2M9X",
"status": "prompt_sent",
"total": 52400,
"currency": "UGX",
"payment_status": "prompt_sent",
"next_action": {
"kind": "await_confirmation"
},
"skipped_provider": false,
"failure_kind": null
}
}Orders
Pay an order
Send a mobile money prompt, or confirm a free order. Card is coming soon.
POST
/
orders
/
{orderId}
/
pay
Pay an order
curl --request POST \
--url https://connect.laces.run/v1/orders/{orderId}/pay \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"msisdn": "0763494235"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({msisdn: '0763494235'})
};
fetch('https://connect.laces.run/v1/orders/{orderId}/pay', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://connect.laces.run/v1/orders/{orderId}/pay"
payload = { "msisdn": "0763494235" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://connect.laces.run/v1/orders/{orderId}/pay",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'msisdn' => '0763494235'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"code": 200,
"message": "Payment initiated successfully",
"data": {
"order_id": "Hk2mQ8vR",
"order_code": "LC-7K2M9X",
"status": "prompt_sent",
"total": 52400,
"currency": "UGX",
"payment_status": "prompt_sent",
"next_action": {
"kind": "await_confirmation"
},
"skipped_provider": false,
"failure_kind": null
}
}Authorizations
bearerAuthoauth2
A token from POST /oauth/token, valid 1 hour. Paste it as LCSTOK-…-X (without the word Bearer).
Headers
Any unique string you generate (a UUID is ideal), stored with your cart and reused on every retry of the same action. Scoped to your API client.
Maximum string length:
255Path Parameters
Body
application/json
The payer's Ugandan mobile number (07…, 2567… or +2567…). Must be on the network the order was priced for: MTN for momo, Airtel for airtel. Required for a paid mobile money order; not needed for a free order.
Example:
"0763494235"