Astra API documentation
API reference
USD is the panel base currency. Catalog prices and API amounts use USD; PHP is available as a display conversion in the panel. Send a form-encoded request with your API key and action, and use numeric IDs for services and orders.
Service list Parameter Description keyYour Astra API key actionservices
Example response [
{
"service": 101,
"name": "Starter audience service",
"type": "default",
"category": "Audience",
"rate": "0.044643",
"min": 100,
"max": 10000,
"refill": true,
"cancel": false
}
]
Place an order Parameter Description keyYour Astra API key actionaddserviceNumeric service ID linkTarget URL (optional for eligible services) quantityRequested quantity within the service limits Idempotency-KeyOptional request header to prevent duplicate orders
Example response {
"order": 5021
}
Order status Parameter Description keyYour Astra API key actionstatusorderNumeric order ID
Example response {
"charge": "2.50",
"start_count": "0",
"status": "pending",
"remains": "1000",
"currency": "USD"
}
Cancel orders Parameter Description keyYour Astra API key actioncancelordersNumeric order IDs separated by commas
Example response [ { "order": 5021, "cancel": 61 } ]
Balance Parameter Description keyYour Astra API key actionbalance
Example response { "balance": "250.00", "currency": "USD" }
PHP request example Fetch the service catalog using your API key.
Copy code
<?php
$response = Http::asForm()->post('https://www.astrasmm.site/api/v2', [
'key' => $apiKey,
'action' => 'services',
]);