MagnusBilling.net · API

Documentación API

Documentación de la API de cliente y la API de revendedor

MagnusBilling.net · Client API

Client API Documentation

Manage your own SIP accounts, balance, vouchers, tariff plan, Caller ID, call history, refill history and account password through a clean JSON API.

Base URL https://magnusbilling.net/client-api/index.php
Authorization X-API-Key header
Response format JSON

Authorization

Every request must include your API key in the HTTP header.

X-API-Key: YOUR_API_KEY
Do not send the API key in the URL. Keep it private.

Account status

GET ?endpoint=me
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/client-api/index.php?endpoint=me"
{
  "success": true,
  "data": {
    "id": 1001,
    "username": "1234567801",
    "balance": "1.0000",
    "active": 1,
    "id_plan": 101,
    "plan_name": "STANDARD-PLAN"
  }
}

Balance

GET ?endpoint=balance
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/client-api/index.php?endpoint=balance"

Available plans

GET ?endpoint=plans

Returns only tariff plans available to your account.

curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/client-api/index.php?endpoint=plans"
You can choose only from the plans returned by this endpoint.

Change plan

POST ?endpoint=change-plan

Change your tariff plan to one of the available plans.

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id_plan":8}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=change-plan"
You cannot create, edit or delete tariff plans through this API.

SIP accounts

GET ?endpoint=sip

List your SIP accounts, including SIP login and SIP password.

curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/client-api/index.php?endpoint=sip"

Create additional SIP account

POST ?endpoint=create-sip

Create an additional SIP account under your own account.

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=create-sip"

You can also provide your own SIP password:

{
  "password": "StrongSipPass123"
}
Limit: maximum 100 SIP accounts per client.

Change SIP password

POST ?endpoint=update-sip-password
curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"1234567802","password":"NewSipPass456"}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=update-sip-password"
You can change only your own SIP accounts.

Delete SIP account

POST ?endpoint=delete-sip
curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"1234567802"}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=delete-sip"
The main SIP account cannot be deleted. Only additional SIP accounts can be deleted.

IP Authentication

Manage IP-based SIP authentication for your own SIP accounts. Your regular SIP login/password continues working.

List IP authorizations

GET ?endpoint=ip-auth-list

List your SIP accounts and active/inactive IP-auth records.

curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/client-api/index.php?endpoint=ip-auth-list"

Create IP authorization

POST ?endpoint=ip-auth-create

Add a public static PBX IP address to one of your SIP accounts.

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sip_login":"1234567801","ip":"203.0.113.10"}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=ip-auth-create"
{
  "success": true,
  "message": "IP authentication created",
  "data": {
    "id": 6,
    "sip_login": "1234567801",
    "peer_name": "1234567801_ipa1",
    "ip": "203.0.113.10",
    "port": 5060,
    "status": 1
  }
}

Disable IP authorization

POST ?endpoint=ip-auth-disable

The IP-auth record stays in your account but becomes inactive. The SIP peer is removed from Asterisk.

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":6}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=ip-auth-disable"

Enable IP authorization

POST ?endpoint=ip-auth-enable

Re-enable a previously disabled IP-auth record.

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":6}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=ip-auth-enable"

Delete IP authorization

POST ?endpoint=ip-auth-delete

Delete the IP-auth record permanently.

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":6}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=ip-auth-delete"
IP authentication works only with a public static IPv4 address. Private or local IP addresses are rejected.
The same public IP cannot be active on two different client accounts at the same time.

Caller ID

GET ?endpoint=callerids
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/client-api/index.php?endpoint=callerids"

Add Caller ID

POST ?endpoint=add-callerid
curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cid":"+1234567890","name":"Main Caller ID","set_active":true}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=add-callerid"

Set existing Caller ID as active

POST ?endpoint=set-callerid
{
  "cid": "+1234567890"
}

Delete Caller ID

POST ?endpoint=delete-callerid
{
  "id": 80
}

Clear active SIP Caller ID

POST ?endpoint=clear-callerid
curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=clear-callerid"

Call history

GET ?endpoint=calls&limit=50&offset=0
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/client-api/index.php?endpoint=calls&limit=50&offset=0"
Maximum limit per request: 200.

Refill history

GET ?endpoint=refills&limit=50&offset=0
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/client-api/index.php?endpoint=refills&limit=50&offset=0"

Redeem voucher

POST ?endpoint=redeem-voucher

Redeem an existing voucher code and add its value to your balance.

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"voucher":"123456"}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=redeem-voucher"
This API does not create vouchers. It only redeems vouchers that already exist.

Change account password

POST ?endpoint=change-password
curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"current_password":"OldPassword","new_password":"NewPassword987"}' \
  "https://magnusbilling.net/client-api/index.php?endpoint=change-password"
The old account password is never returned by the API. It can only be changed.

API SMS / CryptoSMS

Envía SMS desde tu cuenta MagnusBilling usando el mismo X-API-Key. El coste se descuenta del saldo de la cuenta.

URL base https://magnusbilling.net/sms-api/index.php
Proveedor público cryptosms / CryptoSMS

Autorización

Usa la misma clave API que ya usas para Client API o Reseller API.

X-API-Key: YOUR_API_KEY
Aviso sobre Sender ID / Caller ID
Sender ID / Caller ID no está garantizado. El remitente mostrado depende del proveedor, país de destino y reglas del operador móvil.
La tarifa SMS se cobra por el intento de envío. La entrega final depende del operador móvil de destino.

Endpoints

  • GET ?endpoint=providers — Lista de proveedores
  • GET ?endpoint=rates — Tarifas SMS
  • GET ?endpoint=quota&provider=cryptosms — Estimación de SMS disponibles
  • POST ?endpoint=send — Enviar SMS
  • POST ?endpoint=schedule — Programar SMS
  • GET ?endpoint=scheduled&limit=20 — Lista de SMS programados
  • POST ?endpoint=cancel-scheduled — Cancelar SMS programado
  • POST ?endpoint=bulk — Campaña SMS masiva
  • GET ?endpoint=campaigns&limit=20 — Lista de campañas masivas
  • POST ?endpoint=cancel-campaign — Cancelar campaña masiva
  • GET ?endpoint=status&id=SMS_ID — Comprobar estado SMS
  • GET ?endpoint=history&limit=20 — Historial SMS

Enviar SMS

POST ?endpoint=send
curl -k -sS \
  -X POST "https://magnusbilling.net/sms-api/index.php?endpoint=send" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+447575396991",
    "provider": "cryptosms",
    "sender_id": "MyBrand",
    "message": "MyBrand: Your code is 123456"
  }'
{
  "success": true,
  "sms_id": 1,
  "provider": "cryptosms",
  "provider_name": "CryptoSMS",
  "status": "SENT_TO_PROVIDER",
  "balance_after": "49.6500",
  "sender_id": {
    "requested": "MyBrand",
    "guaranteed": false,
    "warning": "Sender ID / Caller ID is not guaranteed."
  }
}

Programar SMS

POST ?endpoint=schedule
curl -k -sS \
  -X POST "https://magnusbilling.net/sms-api/index.php?endpoint=schedule" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "+1234567890",
    "provider": "cryptosms",
    "sender_id": "MyBrand",
    "message": "API scheduled test",
    "scheduled_at": "2026-05-09 23:00:00"
  }'
{
  "success": true,
  "scheduled_sms_id": 10,
  "provider": "cryptosms",
  "status": "SCHEDULED",
  "server_utc_offset": "+03:00"
}

Cancelar SMS programado

POST ?endpoint=cancel-scheduled
curl -k -sS \
  -X POST "https://magnusbilling.net/sms-api/index.php?endpoint=cancel-scheduled" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"scheduled_sms_id":10}'

Campaña SMS masiva

POST ?endpoint=bulk
curl -k -sS \
  -X POST "https://magnusbilling.net/sms-api/index.php?endpoint=bulk" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "cryptosms",
    "sender_id": "MyBrand",
    "message": "API bulk test",
    "scheduled_at": "2026-05-09 23:00:00",
    "phones": ["+1234567890", "+1234567891"]
  }'
{
  "success": true,
  "campaign_id": 20,
  "recipients_queued": 2,
  "status": "QUEUED"
}

Lista de campañas masivas

GET ?endpoint=campaigns&limit=20
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/sms-api/index.php?endpoint=campaigns&limit=20"

Cancelar campaña masiva

POST ?endpoint=cancel-campaign
curl -k -sS \
  -X POST "https://magnusbilling.net/sms-api/index.php?endpoint=cancel-campaign" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"campaign_id":20}'

Comprobar estado SMS

GET ?endpoint=status&id=SMS_ID
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/sms-api/index.php?endpoint=status&id=1"

Historial SMS

GET ?endpoint=history&limit=20
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/sms-api/index.php?endpoint=history&limit=20"

API eSIM / Paquetes globales de datos

Vende paquetes de datos eSIM desde tu cuenta MagnusBilling.net con el mismo X-API-Key.

Base URL https://magnusbilling.net/esim-api/index.php

Authorization

Use the same API key that is already used for Client API or Reseller API.

Endpoints

  • GET ?endpoint=packages&q=Europe&limit=20 — List packages and current prices
  • GET ?endpoint=coverage&package_code=PACKAGE_CODE — Package coverage by country and network
  • GET ?endpoint=balance — Account balance
  • POST ?endpoint=buy — Buy eSIM package
  • GET ?endpoint=orders — Order history, QR/activation data and usage
  • GET ?endpoint=sync-order&order_id=ORDER_ID — Refresh order, QR and data usage

List packages

curl -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/esim-api/index.php?endpoint=packages&q=Europe&limit=5"

Buy eSIM

curl -sS -X POST "https://magnusbilling.net/esim-api/index.php?endpoint=buy" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"package_code":"P2CYMUS93"}'

Orders and usage

curl -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/esim-api/index.php?endpoint=orders"

Security rules

  • The client can access only their own account.
  • The client can access only their own SIP accounts.
  • The client can manage IP authentication only for their own SIP accounts.
  • The client can add, change and delete only their own Caller IDs.
  • The client can choose tariff plan only from the available plan list.
  • The client cannot create, edit or delete tariff plans.
  • The client can redeem only existing voucher codes.
  • The client cannot delete the main SIP account.
  • The client cannot manage other clients, resellers or admin data.
MagnusBilling.net · Reseller API

Reseller API Documentation

Create SIP clients, manage balances, view reseller plans, check client status, and control customers through a clean JSON API.

Base URL https://magnusbilling.net/reseller-api/index.php
Authorization X-API-Key header
Response format JSON

Authorization

Every request must include your API key in the HTTP header.

X-API-Key: YOUR_API_KEY
Do not send the API key in the URL. Keep it private.

Account status

GET ?endpoint=me
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/reseller-api/index.php?endpoint=me"
{
  "ok": true,
  "reseller": {
    "id": 1001,
    "username": "1234567890",
    "group": "Agent",
    "balance": 1,
    "active": true
  }
}

Plans

GET ?endpoint=plans
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/reseller-api/index.php?endpoint=plans"
{
  "ok": true,
  "plans": [
    {
      "id": 33,
      "name": "TEST-RESELLER-PLAN",
      "signup": true,
      "initial_credit": 0,
      "tariff_limit": 3,
      "agent_rates": 66875
    }
  ]
}

Create client

POST ?endpoint=create-client

Create a new SIP client under your reseller account.

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"plan_id":101}' \
  "https://magnusbilling.net/reseller-api/index.php?endpoint=create-client"

You can also provide your own login and password:

{
  "login": "1234567891",
  "password": "StrongPass123",
  "plan_id": 101
}
SIP password is returned only once during client creation.
Sin plan_id, la API usa el plan retail existente del reseller. Precio por defecto: tarifa base +20%.

Get client

GET ?endpoint=client&login=LOGIN
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/reseller-api/index.php?endpoint=client&login=1234567892"

Client list

GET ?endpoint=clients&limit=10&offset=0
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/reseller-api/index.php?endpoint=clients&limit=10&offset=0"

Modelo real de facturación reseller

El endpoint transfer acredita saldo retail al cliente propio del reseller. No debita al reseller inmediatamente.

Por defecto, las tarifas de clientes reseller se crean con margen +20%. El reseller puede cambiar el margen y los precios retail de sus clientes.

Cuando el cliente realiza llamadas, su saldo se cobra al precio retail, y el saldo del reseller al precio wholesale.

Si el saldo wholesale del reseller se agota o no alcanza para el bloque mínimo, sus clientes no pueden llamar aunque tengan crédito retail.

Acreditar saldo retail

POST ?endpoint=transfer

Acredita saldo retail a uno de los clientes propios del reseller. No debita al reseller inmediatamente; el saldo wholesale se cobra cuando el cliente realiza llamadas.

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"login":"1234567892","amount":1,"external_id":"ORDER-DEMO-10001"}' \
  "https://magnusbilling.net/reseller-api/index.php?endpoint=transfer"
external_id debe ser único para cada crédito retail.

Transactions

GET ?endpoint=transactions
curl -k -sS \
  -H "X-API-Key: YOUR_API_KEY" \
  "https://magnusbilling.net/reseller-api/index.php?endpoint=transactions&limit=10&offset=0"

Filter only successful transactions:

https://magnusbilling.net/reseller-api/index.php?endpoint=transactions&status=success&limit=10&offset=0

Set client status

POST ?endpoint=set-client-status

Deactivate client:

curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"login":"1234567892","active":false}' \
  "https://magnusbilling.net/reseller-api/index.php?endpoint=set-client-status"

Activate client:

{
  "login": "1234567892",
  "active": true
}

Change client plan

POST ?endpoint=change-plan
curl -k -sS \
  -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"login":"1234567892","plan_id":101}' \
  "https://magnusbilling.net/reseller-api/index.php?endpoint=change-plan"

API white-label del portal agente

Endpoints para portal PHP del agente: login cliente, panel, SIP, llamadas, pagos, tarifas, margen y token Web Phone.

Para resellers que instalan un portal white-label en su dominio. El portal usa solo reseller X-API-Key y nunca conecta directamente a la base central MagnusBilling.
Base URL https://magnusbilling.net/reseller-api/index.php
Authorization X-API-Key: YOUR_RESELLER_API_KEY

Endpoints del portal cliente

  • GET ?endpoint=portal-bootstrap — Verificación API/instalación
  • POST ?endpoint=client-auth — Login cliente en portal agente
  • GET ?endpoint=client-dashboard&login=CLIENT_LOGIN — Panel cliente y saldo visible
  • GET ?endpoint=client-sip&login=CLIENT_LOGIN — Cuentas SIP del cliente; cuentas de servicio ocultas por defecto
  • GET ?endpoint=client-calls&login=CLIENT_LOGIN&limit=50 — Llamadas exitosas
  • GET ?endpoint=client-failed-calls&login=CLIENT_LOGIN&limit=50 — Llamadas fallidas
  • GET ?endpoint=client-refills&login=CLIENT_LOGIN&limit=50 — Historial de recargas cliente
  • GET ?endpoint=client-callerids&login=CLIENT_LOGIN — Caller ID cliente
  • GET ?endpoint=client-rates&login=CLIENT_LOGIN&limit=100 — Tarifas retail cliente

Pago/recarga

Pagos del cliente llegan al portal vía Plisio, Heleket o custom; tras confirmar llama register-agent-payment.

curl -sS -X POST "https://magnusbilling.net/reseller-api/index.php?endpoint=register-agent-payment" \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "login": "CLIENT_LOGIN",
    "amount": "20.00",
    "currency": "EUR",
    "provider": "plisio",
    "external_id": "plisio_order_123",
    "provider_txid": "tx_or_invoice_id",
    "status": "paid"
  }'

Endpoints de margen tarifario

set-agent-markup usa el plan retail existente. Si el margen ya está aplicado, no reescribe tarifas.

  • GET ?endpoint=agent-markup — Margen actual y tarifa retail
  • POST ?endpoint=preview-agent-markup — Vista previa de precios con nuevo margen
  • POST ?endpoint=set-agent-markup — Aplicar nuevo margen a tarifa retail
curl -sS -X POST "https://magnusbilling.net/reseller-api/index.php?endpoint=set-agent-markup" \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"markup_percent":50}'

Token Janus Web Phone

El portal muestra botón Web Phone. Cuentas de servicio como _web1 son internas de Janus y no se muestran en la lista SIP normal salvo include_service=1.

curl -sS -X POST "https://magnusbilling.net/reseller-api/index.php?endpoint=client-softphone-token" \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"login":"CLIENT_LOGIN"}'
Reglas seguridad white-label: El cliente final nunca debe ver saldo reseller, coste wholesale, margen, dependencia de crédito, API key o datos de la base central.

API SMS reseller / CryptoSMS

Los resellers pueden enviar SMS para sus propios clientes con el mismo Reseller X-API-Key. client_login es obligatorio.

URL base https://magnusbilling.net/sms-api/index.php
Autorización X-API-Key: YOUR_RESELLER_API_KEY
Obligatorio para resellers client_login debe ser el login de su propio cliente.
Un reseller solo puede gestionar SMS de sus propios clientes.

Endpoints disponibles

  • POST ?endpoint=send — Enviar un SMS
  • POST ?endpoint=schedule — Programar un SMS
  • GET ?endpoint=scheduled&client_login=CLIENT_LOGIN&limit=20 — SMS programados
  • POST ?endpoint=cancel-scheduled — Cancelar SMS programado
  • POST ?endpoint=bulk — Crear campaña SMS masiva
  • GET ?endpoint=campaigns&client_login=CLIENT_LOGIN&limit=20 — Lista de campañas
  • POST ?endpoint=cancel-campaign — Cancelar campaña
  • GET ?endpoint=quota&provider=cryptosms&client_login=CLIENT_LOGIN — Estimación SMS del cliente
  • GET ?endpoint=history&client_login=CLIENT_LOGIN&limit=20 — Historial SMS del cliente
  • GET ?endpoint=status&id=SMS_ID&client_login=CLIENT_LOGIN — Estado SMS del cliente

Example: send SMS for your client

curl -sS -X POST "https://magnusbilling.net/sms-api/index.php?endpoint=send" \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "client_login": "CLIENT_LOGIN",
    "phone": "+1234567890",
    "message": "Your SMS text",
    "provider": "cryptosms",
    "sender_id": "MyBrand"
  }'

Example: bulk SMS campaign

curl -sS -X POST "https://magnusbilling.net/sms-api/index.php?endpoint=bulk" \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "client_login": "CLIENT_LOGIN",
    "phones": ["+1234567890", "+1234567891"],
    "message": "Bulk SMS text",
    "provider": "cryptosms",
    "sender_id": "MyBrand",
    "scheduled_at": "2026-05-10 16:30:00"
  }'
Sender ID / Caller ID no está garantizado. El coste SMS se descuenta del saldo del cliente seleccionado.

API eSIM Reseller

Los resellers pueden vender paquetes de datos eSIM usando la misma X-API-Key de reseller. Las compras eSIM se descuentan del saldo del reseller.

URL base https://magnusbilling.net/esim-api/index.php
Autorización X-API-Key: YOUR_RESELLER_API_KEY

Endpoints disponibles

  • GET ?endpoint=packages&q=Europe&limit=20 — Listar paquetes eSIM y precios actuales del reseller
  • GET ?endpoint=coverage&package_code=PACKAGE_CODE — Países y redes incluidos en un paquete
  • GET ?endpoint=balance — Comprobar saldo del reseller
  • POST ?endpoint=buy — Comprar paquete eSIM
  • GET ?endpoint=orders — Órdenes eSIM del reseller, datos de activación y uso
  • GET ?endpoint=sync-order&order_id=ORDER_ID — Actualizar datos de activación y datos restantes

Listar paquetes eSIM

curl -sS \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  "https://magnusbilling.net/esim-api/index.php?endpoint=packages&q=Europe&limit=5"

Comprar paquete eSIM

curl -sS -X POST "https://magnusbilling.net/esim-api/index.php?endpoint=buy" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  -d '{"package_code":"P2CYMUS93"}'

Órdenes eSIM del reseller y uso

curl -sS \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  "https://magnusbilling.net/esim-api/index.php?endpoint=orders"

La respuesta de la orden incluye nombre del paquete, precio, estado, ICCID, datos de activación, datos totales, usados, restantes y expiración cuando estén disponibles. El uso puede actualizarse con un pequeño retraso de red.

Security rules

  • The reseller can access only clients created under their Agent account.
  • The reseller can use only their own plans.
  • The reseller cannot access admin clients or other resellers' clients.
  • El reseller solo puede acreditar saldo retail a sus propios clientes. Las llamadas aún requieren saldo wholesale disponible del reseller.
  • SIP passwords are returned only once during client creation.
  • Existing SIP passwords and secrets are not returned by client endpoints.
  • White-label portal clients must never see reseller balance, wholesale rates, markup percentage or internal reseller credit logic.
  • Service SIP accounts such as _webN and _ipaN are hidden from normal client SIP lists; Web Phone must use client-softphone-token.

API de gestión de cuenta del portal agente

Endpoints adicionales para portales white-label de agente: restablecimiento de contraseña, restablecimiento de contraseña SIP y actualización del perfil del cliente.

Reglas de seguridad: Estos métodos funcionan solo para clientes propios del reseller. Las contraseñas existentes nunca se devuelven. Los métodos de reset generan una nueva contraseña temporal y la devuelven una sola vez al portal server-side de confianza.

Endpoints

curl -sS -X POST "https://magnusbilling.net/reseller-api/index.php?endpoint=reset-client-password" \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"login":"6307210"}'
curl -sS -X POST "https://magnusbilling.net/reseller-api/index.php?endpoint=reset-client-sip-password" \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"login":"6307210"}'
curl -sS -X POST "https://magnusbilling.net/reseller-api/index.php?endpoint=client-profile-update" \
  -H "X-API-Key: YOUR_RESELLER_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"login":"6307210","email":"client@example.com","phone":"+123456789","language":"en"}'

Las cuentas de servicio como _webN y _ipaN están excluidas del reset de contraseña SIP.