API and H2H

Order pulsa, data, PLN and PPOB from your own system: over the REST API, or as an H2H supplier in Otomax and other server-pulsa software. Both spend from your balance.

REST API

Base URL https://pulsatek.co/api/v1. JSON in and out.

Authentication

  • Send your API key in the X-Api-Key header (64 letters and digits, shown once when issued in the portal).
  • The calling address must be in your IP whitelist: single addresses or CIDR ranges, IPv4 or IPv6. An empty whitelist refuses every call.
  • The account must be active and have the API turned on.
  • An address that fails authentication 20 times in a minute gets RATE_LIMITED for the rest of that minute.

Rate limits

Per reseller, counted on each server instance. Every answer carries X-RateLimit-Limit and X-RateLimit-Remaining; a 429 carries Retry-After in seconds.

TierRequests per minute
bronze30
silver60
gold120

Requests and answers

A POST needs Content-Type: application/json and a body of at most 8 KB. Unknown fields are refused. Every answer is one envelope:

{
  "ok": true,
  "data": {
    "ref_id": "abc123",
    "order_id": "T0123456789AB",
    "product_code": "S5",
    "customer_no": "081234567890",
    "price": 5150,
    "status": "pending",
    "serial": null,
    "message": null,
    "created_at": "2026-11-30T03:15:00.000Z",
    "finished_at": null
  }
}
{
  "ok": false,
  "error": {
    "code": "INSUFFICIENT_BALANCE",
    "message": "Balance is lower than the price."
  }
}

Endpoints

GET/balance → { "balance": 94850 }, whole rupiah.

GET/products?category=pulsa&brand=telkomsel

Your tier's prices. category is one of pulsa, data, pln, ppob; brand is the brand slug; both optional. A postpaid product has price: null: its price comes from /inquiry. cut_off is the daily window (WIB) when the product cannot be ordered.

{
  "ok": true,
  "data": [
    {
      "code": "S5",
      "name": "Telkomsel 5.000",
      "brand": "telkomsel",
      "category": "pulsa",
      "kind": "prepaid",
      "nominal": 5000,
      "price": 5150,
      "available": true,
      "cut_off": {
        "start": "23:45",
        "end": "00:15"
      }
    }
  ]
}

POST/order { "ref_id", "product_code", "customer_no", "inquiry_id"? } → the order.

  • ref_id: your own reference, 1 to 64 of A-Z a-z 0-9 . _ -, unique per account.
  • product_code: 1 to 32 letters and digits. customer_no: 4 to 32 digits, a leading + allowed, checked against the product's rule; mobile numbers in 62… or +62… form are stored as 08….
  • inquiry_id: required for a postpaid product, from /inquiry the same day (WIB).
  • Sending a ref_id again returns that same order with "duplicate": true and charges nothing. After a timeout or a 500, resend with the same ref_id.
  • The answer usually says pending or processing; the final status arrives by callback, or read it with GET /order/:ref_id.

POST/inquiry { "ref_id", "product_code", "customer_no" } → the bill to pay.

{
  "ok": true,
  "data": {
    "inquiry_id": "7d0c2c8e-5b1e-4d3a-9d7b-2f7f0c2a1e11",
    "customer_name": "BUDI SANTOSO",
    "bill": 250000,
    "admin_fee": 2500,
    "price": 252500,
    "expires_at": "2026-11-30T16:59:59.000Z",
    "details": {}
  }
}

GET/order/:ref_id → the order. Only your own orders are found.

GET/orders?cursor=&limit= → { "items": [order…], "next_cursor": "…" | null }, newest first, limit 1 to 100 (default 50).

GET/ledger?cursor=&limit= → { "items": [{ "id", "amount", "balance_after", "kind", "order_id", "note", "created_at" }], "next_cursor" }. kind is topup, order, refund or adjust; amount is signed.

Order status

pending (accepted, not yet sent) → processing (with the supplier) → success (with serial) or failed (price refunded to your balance in full). success and failed are final.

Errors

A body refused for size answers 413 and for its type 415, both with INVALID_REQUEST.

INTERNAL can also arrive as 503 with Retry-After: while a server restarts, or while new orders are paused. Nothing was charged; send the same ref_id again after the wait. A ref_id already placed still returns its order during a pause.

CodeHTTPMessage
UNAUTHORIZED401Missing or invalid API key.
IP_NOT_ALLOWED403This address is not in the account whitelist.
RESELLER_INACTIVE403This account cannot use the API.
RATE_LIMITED429Rate limit reached; see Retry-After.
INVALID_REQUEST400The request is not valid.
PRODUCT_NOT_FOUND404No product has this code.
PRODUCT_UNAVAILABLE422This product is not available now.
CUT_OFF422This product is in its daily cut-off window.
INVALID_CUSTOMER_NO422The customer number is not valid for this product.
INSUFFICIENT_BALANCE422Balance is lower than the price.
INQUIRY_INVALID422The inquiry is missing, expired, already used, or for another product or customer.
NOT_FOUND404Not found.
INTERNAL500Server error; retrying with the same ref_id is safe.

Callbacks

When an order placed through the API or the portal reaches success or failed, we POST the order to your callback URL with "event": "order.updated", retried until you answer 2xx.

{
  "event": "order.updated",
  "ref_id": "abc123",
  "order_id": "T0123456789AB",
  "product_code": "S5",
  "customer_no": "081234567890",
  "price": 5150,
  "status": "success",
  "serial": "0412345678901234",
  "message": null,
  "created_at": "2026-11-30T03:15:00.000Z",
  "finished_at": "2026-11-30T03:15:04.000Z"
}

Verify each one: X-Pulsatek-Signature is sha256= followed by the hex HMAC-SHA256 of X-Pulsatek-Timestamp + "." + raw body, keyed with your callback secret. Compare in constant time and refuse an old timestamp.

H2H for Otomax and other server-pulsa software

Add Pulsatek as a supplier "by IP". Your software fills a URL per transaction and reads our one-line text reply. The replies and the report use the formats Digiflazz gives its own Otomax buyers, so patterns you already use for Digiflazz keep working.

Setup

  1. In the portal, issue your H2H credentials. Your memberID is your reseller code (for example R00042); the PIN is 6 digits and the password 32 letters and digits. Both are shown once.
  2. Add your server's public IP to the IP whitelist. Requests from any other address are refused, and an empty whitelist refuses all.
  3. Set your report URL in the portal, so final statuses reach your server (see Report).
  4. In Otomax, add the supplier with this transaction URL:
    https://pulsatek.co/h2h/trx?memberID=[memberid]&pin=[pin]&password=[password]&product=[product]&dest=[tujuan]&refID=[trxid]
    and this balance URL:
    https://pulsatek.co/h2h/balance?memberID=[memberid]&pin=[pin]&password=[password]
  5. Paste the parse patterns below into the supplier's reply settings, then send one small transaction to test.

Request rules

  • HTTPS only. A plain-HTTP request is refused with HTTP 403 and the access-denied reply.
  • product: 1 to 32 letters and digits, any case. dest: 6 to 20 digits. refID: 1 to 64 of A-Z a-z 0-9 . _ -, unique per account.
  • qty may only be 1. counter is ignored. testing is refused.
  • Sending a refID again returns the current state of that order: no second order, no second charge. Use it to recheck a transaction.
  • Rate limits are the REST limits per tier. An address that fails authentication 20 times in a minute is refused for the rest of that minute.
  • Answers are HTTP 200 text/plain. The exception: if we cannot tell whether your order was taken, we answer HTTP 503 with Gangguan sistem, kirim ulang dengan CLIENTID yang sama., which matches no pattern. Send the same refID again.

Replies and parse patterns

Numbers have no separators. KP is the product code in capitals. Patterns are regular expressions; the groups are listed in order.

ReplyExample and pattern
success

The order succeeded.

TRX S5.081234567890 BERHASIL, HRG:5150 SN:0412345678901234. SISA SALDO:94850 CLIENTID=abc123.
^TRX ([A-Z0-9]+)\.(\d+) BERHASIL, HRG:(\d+) SN:(.*)\. SISA SALDO:(\d+) CLIENTID=([A-Za-z0-9._-]*)\.$

Groups: KP, TUJUAN, HRG, SN, SALDO, CLIENTID

pending

The order is being processed; the final status arrives as a report.

Request S5 ke 081234567890 segera diproses Saldo=94850 CLIENTID=abc123.
^Request ([A-Z0-9]+) ke (\d+) segera diproses Saldo=(\d+) CLIENTID=([A-Za-z0-9._-]*)\.$

Groups: KP, TUJUAN, SALDO, CLIENTID

failed

The order failed and was refunded, or was refused before it was placed.

TRX S5.081234567890 GAGAL, Saldo tidak cukup. SISA SALDO:3000 CLIENTID=abc123.
^TRX ([A-Z0-9]+)\.(\d+) GAGAL, (.+)\. SISA SALDO:(\d+) CLIENTID=([A-Za-z0-9._-]*)\.$

Groups: KP, TUJUAN, ALASAN, SALDO, CLIENTID

refused

Access denied or a malformed request. No order exists; nothing was charged.

GAGAL, Akses ditolak. CLIENTID=abc123.
^GAGAL, (.+)\. CLIENTID=([A-Za-z0-9._-]*)\.$

Groups: ALASAN, CLIENTID

balance

Answer to /h2h/balance.

SISA SALDO:94850.
^SISA SALDO:(\d+)\.$

Groups: SALDO

Treat success as sukses, failed and refused as gagal (nothing stays charged), pending as proses.

Reasons

The reason in a GAGAL reply is always one of these; never a supplier's own text.

  • Saldo tidak cukup
  • Kode produk salah
  • Produk tidak tersedia
  • Nomor tujuan salah
  • Produk sedang cut off
  • Tagihan belum dicek atau sudah kedaluwarsa
  • Format salah
  • Akses ditolak
  • Terlalu banyak permintaan, coba lagi
  • Gangguan sistem, coba lagi
  • Transaksi gagal

Report

On every final status we call your report URL with GET, adding:

serverid={order id}&clientid={refID}&statuscode={1 success | 2 failed}&kp={product}&msisdn={dest}&sn={serial}&msg={reply text}

For example:

https://your-server.example/report?serverid=T0123456789AB&clientid=abc123&statuscode=1&kp=S5&msisdn=081234567890&sn=0412345678901234&msg=TRX+S5.081234567890+BERHASIL%2C+HRG%3A5150+SN%3A0412345678901234.+SISA+SALDO%3A94850+CLIENTID%3Dabc123.

We retry until your server answers 2xx. msg is the same text as the reply, so the same patterns read it.

Message grammar

For the coming Telegram and Jabber channels: KODE.TUJUAN.PIN places an order, optionally followed by #REFID or R#REFID; S.PIN asks the balance. Replies use the formats above.