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-Keyheader (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_LIMITEDfor 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.
| Tier | Requests per minute |
|---|---|
| bronze | 30 |
| silver | 60 |
| gold | 120 |
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 ofA-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 in62…or+62…form are stored as08….inquiry_id: required for a postpaid product, from/inquirythe same day (WIB).- Sending a
ref_idagain returns that same order with"duplicate": trueand charges nothing. After a timeout or a500, resend with the sameref_id. - The answer usually says
pendingorprocessing; the final status arrives by callback, or read it withGET /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.
| Code | HTTP | Message |
|---|---|---|
UNAUTHORIZED | 401 | Missing or invalid API key. |
IP_NOT_ALLOWED | 403 | This address is not in the account whitelist. |
RESELLER_INACTIVE | 403 | This account cannot use the API. |
RATE_LIMITED | 429 | Rate limit reached; see Retry-After. |
INVALID_REQUEST | 400 | The request is not valid. |
PRODUCT_NOT_FOUND | 404 | No product has this code. |
PRODUCT_UNAVAILABLE | 422 | This product is not available now. |
CUT_OFF | 422 | This product is in its daily cut-off window. |
INVALID_CUSTOMER_NO | 422 | The customer number is not valid for this product. |
INSUFFICIENT_BALANCE | 422 | Balance is lower than the price. |
INQUIRY_INVALID | 422 | The inquiry is missing, expired, already used, or for another product or customer. |
NOT_FOUND | 404 | Not found. |
INTERNAL | 500 | Server 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
- 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. - Add your server's public IP to the IP whitelist. Requests from any other address are refused, and an empty whitelist refuses all.
- Set your report URL in the portal, so final statuses reach your server (see Report).
- In Otomax, add the supplier with this transaction URL:
and this balance URL:https://pulsatek.co/h2h/trx?memberID=[memberid]&pin=[pin]&password=[password]&product=[product]&dest=[tujuan]&refID=[trxid]https://pulsatek.co/h2h/balance?memberID=[memberid]&pin=[pin]&password=[password] - 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 ofA-Z a-z 0-9 . _ -, unique per account.qtymay only be1.counteris ignored.testingis refused.- Sending a
refIDagain 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 withGangguan sistem, kirim ulang dengan CLIENTID yang sama., which matches no pattern. Send the samerefIDagain.
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.
| Reply | Example and pattern |
|---|---|
| success The order succeeded. | Groups: KP, TUJUAN, HRG, SN, SALDO, CLIENTID |
| pending The order is being processed; the final status arrives as a report. | Groups: KP, TUJUAN, SALDO, CLIENTID |
| failed The order failed and was refunded, or was refused before it was placed. | Groups: KP, TUJUAN, ALASAN, SALDO, CLIENTID |
| refused Access denied or a malformed request. No order exists; nothing was charged. | Groups: ALASAN, CLIENTID |
| balance Answer to /h2h/balance. | 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 cukupKode produk salahProduk tidak tersediaNomor tujuan salahProduk sedang cut offTagihan belum dicek atau sudah kedaluwarsaFormat salahAkses ditolakTerlalu banyak permintaan, coba lagiGangguan sistem, coba lagiTransaksi 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.