IPRN SHOP
Dashboard Support
REST APIHandler APIWebhook

IPRN SHOP API Documentation

Use your IPRN SHOP account, wallet and live routing from your own bot, software or reseller panel. Generate an API key from Dashboard → API & Security.

Keep your API key private. Send it in the X-API-Key header or as a Bearer token. Do not place the API key in a URL or query string.

Authentication

Preferred header:

X-API-Key: iprn_YOUR_API_KEY

Bearer authentication is also supported:

Authorization: Bearer iprn_YOUR_API_KEY

Base URLs

REST: https://iprn.shop/api/v1 Handler: https://iprn.shop/api/handler

All requests must use HTTPS.

REST API

MethodEndpointPurpose
GET/api/v1/balanceBalance and account summary
GET/api/v1/rates?service=tgLive countries, stock, prices and route tokens
POST/api/v1/ordersBuy a number using a route token
GET/api/v1/ordersList orders
POST/api/v1/orders/{id}/pollPoll OTP/status
POST/api/v1/orders/{id}/nextReplace a waiting number
POST/api/v1/orders/{id}/cancelCancel an eligible waiting order

1. Get rates

curl -sS 'https://iprn.shop/api/v1/rates?service=tg' \ -H 'X-API-Key: iprn_YOUR_API_KEY'

Select a country and one of its routes. The route_token is short-lived and locks the selected public rate.

2. Buy number

curl -sS 'https://iprn.shop/api/v1/orders' \ -H 'Content-Type: application/json' \ -H 'X-API-Key: iprn_YOUR_API_KEY' \ --data '{"route_token":"ROUTE_TOKEN","idempotency_key":"my-order-10001"}'

Always reuse the same idempotency_key when retrying the same logical purchase. This protects your integration from duplicate purchases.

3. Poll OTP

curl -sS -X POST 'https://iprn.shop/api/v1/orders/123/poll' \ -H 'X-API-Key: iprn_YOUR_API_KEY'

Handler API compatibility

Designed for bots and scripts that prefer a classic SMS-provider action API. Authentication uses headers, not an API key in the URL.

Balance

curl -sS 'https://iprn.shop/api/handler?action=getBalance' \ -H 'X-API-Key: iprn_YOUR_API_KEY' Response: ACCESS_BALANCE:9.3980

Prices / stock

curl -sS 'https://iprn.shop/api/handler?action=getPrices&service=tg' \ -H 'X-API-Key: iprn_YOUR_API_KEY'

Get number

curl -sS 'https://iprn.shop/api/handler?action=getNumber&service=tg&country=GB&maxPrice=0.50&idempotencyKey=bot-10001' \ -H 'X-API-Key: iprn_YOUR_API_KEY' Success: ACCESS_NUMBER:123:+441234567890 No stock: NO_NUMBERS Insufficient wallet balance: NO_BALANCE Temporary/uncertain provider response: ERROR_TEMPORARY

Get status / OTP

curl -sS 'https://iprn.shop/api/handler?action=getStatus&id=123' \ -H 'X-API-Key: iprn_YOUR_API_KEY' Waiting: STATUS_WAIT_CODE OTP received: STATUS_OK:123456

Set status

# Next number /api/handler?action=setStatus&id=123&status=3 # Finish acknowledgement /api/handler?action=setStatus&id=123&status=6 # Cancel /api/handler?action=setStatus&id=123&status=8

getNumberV2 and getPricesV2 are accepted as aliases.

API key controls & limits

Each account can create up to 10 named API keys. Every key can have its own IP/CIDR allowlist and requests-per-minute limit. Keys can be disabled or revoked independently from the dashboard.

Examples of allowed IP values: 203.0.113.10 198.51.100.0/24 203.0.113.10, 198.51.100.0/24

API traffic, response codes, client IPs and latency are visible under Dashboard → API & Security → API usage.

Compatibility aliases

The handler accepts common aliases such as telegram → tg, UK → GB, USA → US, and UAE → AE. For provider-neutral routing, use operator=any (also *, all or 0).

Webhook signing & retries

Configure an HTTPS webhook from Dashboard → API & Security. IPRN SHOP signs the exact raw JSON body with HMAC-SHA256 and retries failed delivery up to 3 attempts.

X-IPRN-Event: otp.received X-IPRN-Event-ID: evt_... X-IPRN-Timestamp: 1791360000 X-IPRN-Signature: sha256=<hex-hmac>

Verify the signature with your webhook signing secret:

expected = hmac.new( WEBHOOK_SECRET.encode(), raw_request_body, hashlib.sha256 ).hexdigest() valid = hmac.compare_digest( "sha256=" + expected, request.headers["X-IPRN-Signature"] )

Example event:

{ "id": "evt_...", "event": "otp.received", "created_at": "1791360000", "data": { "id": 123, "country": "GB", "service": "tg", "phone_number": "+441234567890", "status": "code_received", "otp": "123456" } }

Important integration rules