Sell our products on your own website or bot. You place the order with one API call, the price is taken from your wallet balance and we deliver the product.
POST /orders from your website. We deliver, and the order also shows in your orders on our site.https://test.oentrix.com/api/v1X-API-Key: YOUR_KEY (or Authorization: Bearer YOUR_KEY).Every answer is JSON:
{ "success": true, "data": ... }
{ "success": false,
"error": { "code": "insufficient_balance", "message": "..." } }| 401 | missing_key, invalid_key |
| 402 | insufficient_balance - add money to your wallet |
| 403 | ip_not_allowed, account_disabled |
| 404 | not_found, unknown_endpoint |
| 422 | invalid_request, out_of_stock, order_failed |
| 429 | rate_limited - wait a minute |
Your current wallet balance.
curl -H "X-API-Key: KEY" https://test.oentrix.com/api/v1/balance
{"success":true,"data":{"balance":25.5,"currency":"৳","discount_percent":0}}List products. Prices already include your discount (retail_price is the shop price).
| category_id | only this category |
| q | search in the title |
| page, per_page | paging (per_page max 100) |
Also: GET /products/{id} (one product with description) and GET /categories. Subscription products list their plans and the fields you must send when ordering.
curl -H "X-API-Key: KEY" "https://test.oentrix.com/api/v1/products?category_id=2"
{"success":true,"data":{"items":[{
"id":12,"title":"Example","type":"digital",
"in_stock":true,"price":9.5,"retail_price":10
}],"page":1,"per_page":50,"total":1}}Buy a product with your balance.
| product_id | required |
| plan | plan name - for subscription products |
| fields | object label → value - for subscription products |
| reference | your own unique order number. Sending the same reference twice never creates or charges a second order. |
curl -X POST https://test.oentrix.com/api/v1/orders \
-H "X-API-Key: KEY" \
-H "Content-Type: application/json" \
-d '{"product_id":12,"reference":"shop-1001"}'
{"success":true,"data":{
"order":{"id":345,"reference":"shop-1001",
"status":"delivered","price":9.5,
"delivery":{"type":"file",
"download":"https://test.oentrix.com/api/v1/orders/345/download"}},
"balance":16}}Order status: pending, processing, delivered, active, cancelled, refunded.
List your API orders (page, per_page, status) or read one. A delivered order contains delivery: text (for example account details), url, or download - call GET /orders/{id}/download with your key to get the file.
Set a callback URL in API access. When an order changes we send a POST with {"event":"order.updated","order":{...}} and the header X-Oentrix-Signature = HMAC-SHA256 of the raw body. Or simply poll GET /orders/{id}.
$ch = curl_init('https://test.oentrix.com/api/v1/orders');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-API-Key: KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'product_id' => 12,
'reference' => 'shop-1001',
]),
]);
$res = json_decode(curl_exec($ch), true);
Oentrix Ai Assistant
Online now