Order lifecycle
What happens between your request and a delivered eSIM or number.
-
1. POST /orders
Your request arrives with a unique reference.
-
2. Charge balance
Your prepaid API balance is debited. Too low returns 402.
-
3. Fulfil at provider
No provider available returns 502 and refunds you.
-
4. Save the order
A failed save returns 500 and refunds you.
-
5. 201 processing
Poll GET /orders/{reference} until completed.
-
Your API balance is charged first. If it is too low you get
402and nothing happens. -
The order is fulfilled with a provider. If none can fulfil it you get
502and your balance is refunded. -
The order is saved. If saving fails you get
500and your balance is refunded. -
You then poll
GET /orders/{reference}:statusmoves fromprocessingtocompletedonce the eSIM is active or the number has received its code.
The guarantee
You are never charged without delivery, and retries with the same reference are safe.
curl https://naara.app/api/v1/orders/your-order-abc123 \
-H "Authorization: Bearer $NAARA_KEY"
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client(['base_uri' => 'https://naara.app/api/v1/']);
$response = $client->get('orders/your-order-abc123', [
'headers' => ['Authorization' => 'Bearer ' . getenv('NAARA_KEY')],
]);
echo $response->getBody();
const res = await fetch("https://naara.app/api/v1/orders/your-order-abc123", {
headers: {
Authorization: `Bearer ${process.env.NAARA_KEY}`,
},
});
console.log(await res.json());
import os
import requests
res = requests.get(
"https://naara.app/api/v1/orders/your-order-abc123",
headers={"Authorization": f"Bearer {os.environ['NAARA_KEY']}"},
)
print(res.json())