KingOtpGacor
EN
Language
API Documentation

A simple API to automate OTP orders: check your balance, top up, fetch the list of services and countries, buy a number, receive the OTP, cancel, or finish an order.

Base URL

https://kingotpgacor.site/api/v1

Authentication

Every request must include your API key. Send it in one of these ways:

Authorization: Bearer YOUR_API_KEY
X-Api-Key: YOUR_API_KEY
?apikey=YOUR_API_KEY

🔑 Sign In then open API Settings to get your own key.

The key works on this domain only. Keep it secret — the key grants full access to your balance and orders.

Rate limit

Reads (GET)120 requests / minute
Writes (POST)30 requests / minute

The quota is counted per API key. If it is exceeded, the response is 429 Too Many Requests. Header Retry-After shows how many seconds to wait.

Response format

Always JSON. All money amounts are in Rupiah (IDR) as whole numbers.

Success

{ "success": true, "data": ... }

Failed

{ "success": false, "message": "penjelasan error" }

HTTP codes: 200 ok · 401 invalid key · 422 bad input / failed · 429 too many requests · 504 slow connection (see the order note).

Endpoints

GET/balance

Customer balance. `held` = funds locked in active orders, `active_count` = number of running orders.

Example

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://kingotpgacor.site/api/v1/balance

Response

{ "success": true, "data": { "balance": 50000, "held": 3148, "active_count": 1 } }
GET/services

List of services (WhatsApp, Telegram, etc.).

Query (optional)

qsearch by service name
pagepage (default 1)
limitper page (default 10, max 50)

Example

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://kingotpgacor.site/api/v1/services?q=whatsapp&limit=20"

Response

{ "success": true, "data": [
  { "id": 1, "name": "WhatsApp", "service_image": "https://..." }
] }
GET/services/{service_id}/countries

Countries available for a service, with their selling price (IDR). Use `country_id` when ordering.

Example

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://kingotpgacor.site/api/v1/services/1/countries

Response

{ "success": true, "data": [
  { "country_id": 6, "country_name": "Indonesia", "country_code": "id", "price": 1200 }
] }
POST/order

Buy an OTP number. Your balance is charged the selected country's price.

Body

service_id *service id
country_id *country id
operatora specific operator (default "any")
max_price_usdprice cap; picks the cheapest tier ≤ this value
request_ididempotency key (see the 504 note)

Example

curl -X POST https://kingotpgacor.site/api/v1/order \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"service_id":1,"country_id":6,"request_id":"my-uniq-123"}'

Response

{ "success": true, "data": {
  "id": 9001, "phone_number": "628123456789",
  "service_name": "WhatsApp", "country_name": "Indonesia",
  "price": 1200, "status": "active",
  "sms_code": null, "sms_data": [], "expired_at": "2026-07-13T21:20:00+07:00"
} }

⚠️ If you get a 504 (retry_safe), do NOT place a new order — the number may already have been created. Retry with the same `request_id`, or check `/orders/active`.

GET/orders/active

All orders still running (waiting for an OTP or already holding one).

Example

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://kingotpgacor.site/api/v1/orders/active
GET/order/{id}

The status of one order plus its latest OTP. Poll it periodically (e.g. every 3–5 seconds) while waiting for the OTP. `sms_code` is filled in once the OTP arrives.

Response (OTP received)

{ "success": true, "data": {
  "id": 9001, "status": "active", "phone_number": "628123456789",
  "sms_code": "123456",
  "sms_data": [ { "text": "Your code is 123456", "code": "123456" } ]
} }
POST/order/cancel

Cancel an order. Your balance is refunded if no SMS has arrived. Cancelling is not possible once the OTP has arrived (or for rented numbers).

curl -X POST https://kingotpgacor.site/api/v1/order/cancel \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"order_id":9001}'
POST/order/request-sms

Request a new SMS/OTP on the same number (only for orders that support it, after the first SMS).

curl -X POST https://kingotpgacor.site/api/v1/order/request-sms \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"order_id":9001}'
POST/order/finish

Mark an order as finished (an SMS must have arrived). Once finished, the order is archived to your history.

curl -X POST https://kingotpgacor.site/api/v1/order/finish \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"order_id":9001}'
POST/deposit

Top up your balance. QRIS (pay in rupiah) or Crypto (pay in USD via the gateway). The balance is credited automatically once the payment is confirmed.

Body

method *"qris" or "crypto"
amountQRIS: amount in IDR (2,000 – 2,000,000)
amount_usdCrypto: amount in USD (1 – 1000)

Example (QRIS)

curl -X POST https://kingotpgacor.site/api/v1/deposit \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"qris","amount":10000}'

Response (QRIS)

{ "success": true, "data": {
  "id": 5501, "code": "RCD-XXXX", "amount": 10000,
  "qr_string": "00020101...6304ABCD",
  "qr_image_base64": "data:image/png;base64,iVBOR...",
  "expired_at": "2026-07-13T21:40:00+07:00"
} }

Render `qr_image_base64` as an image, or build the QR yourself from `qr_string`. For Crypto the response contains `payment_url` — send the customer there.

Example (Crypto)

curl -X POST https://kingotpgacor.site/api/v1/deposit \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"method":"crypto","amount_usd":5}'
GET/deposit/{id}

The status of one deposit. `status` = "pending" (unpaid) / "paid" (settled → balance credited) / "expired". Poll it after creating a deposit, or simply watch /balance.

Response

{ "success": true, "data": {
  "id": 5501, "code": "RCD-XXXX", "amount": 10000,
  "status": "paid", "method": "iskapay",
  "paid_at": "2026-07-13T21:31:00+07:00", "expired_at": "2026-07-13T21:40:00+07:00"
} }

Typical order flow

  1. GET /services → pick the service `id`.
  2. GET /services/{id}/countries → pick the `country_id`.
  3. POST /order → returns the order `id` and the number.
  4. GET /order/{id} repeatedly until `sms_code` is filled in (the OTP arrived).
  5. POST /order/finish (done) or /order/cancel (if no OTP arrives → refund).
CS