Get order
curl --request GET \
--url https://api.lojou.app/v1/orders/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.lojou.app/v1/orders/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lojou.app/v1/orders/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lojou.app/v1/orders/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lojou.app/v1/orders/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lojou.app/v1/orders/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lojou.app/v1/orders/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"success": true,
"message": "Order fetched successfully.",
"data": {
"order_number": "95428522",
"checkout_url": "https://pay.lojou.app/token/954_aB3xY9k2m",
"currency": "MZN",
"amount": 748.6,
"original_amount": 748.6,
"discount_amount": 0,
"fees": 108.81,
"transaction_id": "T821671018874668",
"net_amount": 639.79,
"status": "approved",
"can_retry_checkout": false,
"affiliate_id": null,
"coupon_code": null,
"product": {
"product_pid": "QUyMp",
"name": "Spy App"
},
"customer": {
"name": "Tshepo Joshua",
"email": "[email protected]",
"mobile_number": "+270637423882"
},
"return_url": null,
"cancel_url": null,
"created_at": "2026-08-27T12:26:09.000000Z",
"updated_at": "2026-08-27T16:00:58.000000Z"
}
}{
"status": "error",
"message": "Unauthorized user."
}{
"status": "error",
"message": "Permission denied for this endpoint.",
"error_code": "insufficient_scope",
"required_scopes": [
"orders.read"
],
"missing_scopes": [
"orders.read"
],
"granted_scopes": [
"products.read",
"products.write"
]
}{
"status": "error",
"message": "Resource not found."
}Orders
Get order
GET
/
v1
/
orders
/
{id}
Get order
curl --request GET \
--url https://api.lojou.app/v1/orders/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.lojou.app/v1/orders/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lojou.app/v1/orders/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lojou.app/v1/orders/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lojou.app/v1/orders/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.lojou.app/v1/orders/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lojou.app/v1/orders/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"success": true,
"message": "Order fetched successfully.",
"data": {
"order_number": "95428522",
"checkout_url": "https://pay.lojou.app/token/954_aB3xY9k2m",
"currency": "MZN",
"amount": 748.6,
"original_amount": 748.6,
"discount_amount": 0,
"fees": 108.81,
"transaction_id": "T821671018874668",
"net_amount": 639.79,
"status": "approved",
"can_retry_checkout": false,
"affiliate_id": null,
"coupon_code": null,
"product": {
"product_pid": "QUyMp",
"name": "Spy App"
},
"customer": {
"name": "Tshepo Joshua",
"email": "[email protected]",
"mobile_number": "+270637423882"
},
"return_url": null,
"cancel_url": null,
"created_at": "2026-08-27T12:26:09.000000Z",
"updated_at": "2026-08-27T16:00:58.000000Z"
}
}{
"status": "error",
"message": "Unauthorized user."
}{
"status": "error",
"message": "Permission denied for this endpoint.",
"error_code": "insufficient_scope",
"required_scopes": [
"orders.read"
],
"missing_scopes": [
"orders.read"
],
"granted_scopes": [
"products.read",
"products.write"
]
}{
"status": "error",
"message": "Resource not found."
}Autorizações
Send an API key or an OAuth access token in the Authorization header
as a Bearer token. See Authentication for details.
Parâmetros de caminho
Resource identifier.
Resposta
Success
The response is of type object.
