{"openapi":"3.1.0","info":{"title":"Pakeesim eSIM API","version":"1.1.0","description":"Buy prepaid travel data eSIMs from Pakeesim (Indonesia) on a user's behalf. Prices, sales and availability are live. Flow: GET /api/produk (free-text destination in any language) → optional GET /api/harga (quote with promo code) → confirm device compatibility with the user → POST /api/pesanan → the user opens `pembayaran.tautanBayar` (their order page on the website) and pays online through the payment gateway (Bank virtual accounts, GoPay, and credit/debit cards); the order is confirmed automatically → poll GET /api/pesanan/{orderNumber} until status is `delivered` and read `esim` (the QR code is also emailed). The same tools are available over MCP at https://pakeesim.com/mcp.","contact":{"email":"halo@pakeesim.com","url":"https://pakeesim.com/kontak"}},"servers":[{"url":"https://pakeesim.com"}],"security":[],"paths":{"/api/produk":{"get":{"operationId":"cariPaket","summary":"Search eSIM plans and get checkout requirements","parameters":[{"name":"cari","in":"query","description":"Destination and needs in free text, any language (\"Japan 7 days 3GB\", \"eSIM Jepang seminggu\", \"日本 5日間\", \"Europa 15 días\"). Omit for the full catalogue.","schema":{"type":"string"}},{"name":"kuotaMinGb","in":"query","description":"Only plans with at least this much data (GB).","schema":{"type":"number"}},{"name":"masaAktifMinHari","in":"query","description":"Only plans valid for at least this many days.","schema":{"type":"integer"}},{"name":"hargaMaksIdr","in":"query","description":"Only plans at or below this price (IDR).","schema":{"type":"integer"}},{"name":"urut","in":"query","schema":{"type":"string","enum":["rekomendasi","harga","perHari","kuota"],"default":"rekomendasi"}},{"name":"batas","in":"query","description":"Maximum plans returned (default 60, max 120).","schema":{"type":"integer"}},{"name":"bahasa","in":"query","schema":{"type":"string","enum":["id","en"],"default":"id"}}],"responses":{"200":{"description":"Matching plans plus payment methods and the consent statement","content":{"application/json":{"schema":{"type":"object","properties":{"negara":{"type":["string","null"],"description":"Country recognised in `cari`, if any."},"wilayahDiminta":{"type":"string","description":"Multi-country region recognised in `cari`, if any."},"dipahami":{"type":"object","description":"What was understood from `cari`.","properties":{"negara":{"type":["string","null"]},"wilayah":{"type":["string","null"]},"kuotaGb":{"type":["number","null"]},"masaAktifHari":{"type":["integer","null"]}}},"saran":{"type":["object","null"],"description":"Cheapest available plan covering the stated days/data, when known.","properties":{"slug":{"type":"string"},"alasan":{"type":"string"}}},"jumlah":{"type":"integer","description":"Number of matching plans before `batas`."},"paket":{"type":"array","items":{"$ref":"#/components/schemas/Paket"}},"catatan":{"type":"string"},"checkout":{"$ref":"#/components/schemas/InfoCheckout"}}}}}}}}},"/api/harga":{"get":{"operationId":"hitungHarga","summary":"Price quote with an optional promo code (no order is created)","parameters":[{"name":"produk","in":"query","required":true,"description":"Plan slug.","schema":{"type":"string"}},{"name":"jumlah","in":"query","schema":{"type":"integer","minimum":1,"maximum":10,"default":1}},{"name":"kodePromo","in":"query","schema":{"type":"string","maxLength":40}},{"name":"email","in":"query","description":"Optional, for per-email promo code limits.","schema":{"type":"string","format":"email"}},{"name":"bahasa","in":"query","schema":{"type":"string","enum":["id","en"],"default":"id"}}],"responses":{"200":{"description":"Quote","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Harga"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Galat"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Galat"}}}}}}},"/api/promo":{"get":{"operationId":"promoBerjalan","summary":"Flash sales and discounts running now","parameters":[{"name":"bahasa","in":"query","schema":{"type":"string","enum":["id","en"],"default":"id"}}],"responses":{"200":{"description":"Current sales grouped by data/validity","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/pesanan":{"post":{"operationId":"buatPesanan","summary":"Create an order (no payment happens yet)","parameters":[{"name":"Idempotency-Key","in":"header","description":"Optional unique key (8–100 chars). Retrying with the same key, email and plan within 24 hours returns the same order.","schema":{"type":"string"}}],"description":"Call only after the user chose a plan and confirmed: \"I have checked: my phone supports eSIM and is not carrier-locked (SIM Lock). I understand this eSIM is for internet only — no phone number, texts, or calls — and cannot be topped up.\" The buyer receives the order link by email. Limited to a few orders per IP per 10 minutes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PesananBaru"}}}},"responses":{"201":{"description":"Order created. Keep `token` and `tautan.halamanPesanan` for the user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pesanan"}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Galat"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Galat"}}}},"409":{"description":"The plan can't be ordered in the requested quantity right now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Galat"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Galat"}}}},"503":{"description":"Online payment is temporarily unavailable; the user can order on the website instead","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Galat"}}}}}}},"/api/pesanan/{orderNumber}":{"get":{"operationId":"cekPesanan","summary":"Order status, next step, payment details, and eSIM profiles once delivered","parameters":[{"name":"orderNumber","in":"path","required":true,"schema":{"type":"string"}},{"name":"t","in":"query","required":true,"description":"Access token returned when the order was created (also the `t` in the order page URL).","schema":{"type":"string"}},{"name":"bahasa","in":"query","schema":{"type":"string","enum":["id","en"],"default":"id"}}],"responses":{"200":{"description":"Order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pesanan"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Galat"}}}}}}}},"components":{"schemas":{"Galat":{"type":"object","properties":{"galat":{"type":"string"}}},"Paket":{"type":"object","properties":{"slug":{"type":"string","description":"Use as `produk` when ordering."},"nama":{"type":"string"},"wilayah":{"type":"string"},"negaraTercakup":{"type":"array","items":{"type":"string"}},"kuotaGb":{"type":"number"},"masaAktifHari":{"type":"integer"},"hargaIdr":{"type":"integer","description":"Final price the user pays now, any sale included. Present this as the price."},"hargaNormalIdr":{"type":"integer","description":"Normal price before the sale, shown struck through next to the final price. Not what the user pays."},"hematPersen":{"type":"integer","description":"Saving versus the normal price, in percent."},"hematIdr":{"type":"integer","description":"Saving per eSIM in IDR (normal price minus final price). A saving, never the price."},"promo":{"type":"string","enum":["flash","diskon"]},"promoMulai":{"type":["string","null"],"format":"date-time"},"promoBerakhir":{"type":["string","null"],"format":"date-time"},"labelHarga":{"type":"string","description":"Ready-to-show price line: final price, normal price, saving in % and IDR, and when the sale ends (WIB, UTC+7)."},"perHariIdr":{"type":"integer"},"jaringan":{"type":["string","null"]},"tersedia":{"type":"boolean"},"url":{"type":"string","format":"uri"},"checkoutUrl":{"type":"string","format":"uri","description":"Web checkout for a human to finish."}}},"Harga":{"type":"object","properties":{"produk":{"type":"string"},"nama":{"type":"string"},"jumlah":{"type":"integer"},"hargaSatuanIdr":{"type":"integer"},"hargaNormalSatuanIdr":{"type":"integer","description":"Normal price before the sale, shown struck through next to the final price. Not what the user pays."},"hematPersen":{"type":"integer","description":"Saving versus the normal price, in percent."},"hematSatuanIdr":{"type":"integer","description":"Saving per eSIM in IDR (normal price minus final price). A saving, never the price."},"promo":{"type":"string"},"promoBerakhir":{"type":["string","null"],"format":"date-time"},"labelHargaSatuan":{"type":"string","description":"Ready-to-show price line: final price, normal price, saving in % and IDR, and when the sale ends (WIB, UTC+7)."},"subtotalIdr":{"type":"integer"},"kodePromo":{"type":["object","null"],"properties":{"kode":{"type":"string"},"berlaku":{"type":"boolean"},"potonganIdr":{"type":"integer"},"galat":{"type":"string"}}},"potonganIdr":{"type":"integer"},"biayaAdminIdr":{"type":"integer"},"totalIdr":{"type":"integer"},"bisaDipesan":{"type":"boolean"},"catatan":{"type":"string"}}},"InfoCheckout":{"type":"object","properties":{"metodePembayaran":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"jenis":{"type":"string","enum":["gateway"],"description":"`gateway` = pay online, confirmed automatically."},"label":{"type":"string"},"penyedia":{"type":"string"}}}},"persetujuan":{"type":"object","properties":{"pernyataan":{"type":"string"},"syaratPerangkat":{"type":"string"},"tanggungJawab":{"type":"string"}}},"jumlahMaksimal":{"type":"integer"},"kedaluwarsaJam":{"type":"number"}}},"PesananBaru":{"type":"object","required":["produk","nama","email","setujuKompatibel"],"properties":{"produk":{"type":"string","description":"Plan slug."},"jumlah":{"type":"integer","minimum":1,"maximum":10,"default":1},"nama":{"type":"string","minLength":2,"maxLength":120},"email":{"type":"string","format":"email"},"catatan":{"type":"string","maxLength":500},"metodePembayaran":{"type":"string","description":"Optional online payment method id from `checkout.metodePembayaran`. Omit it to use the first listed method."},"kodePromo":{"type":"string","maxLength":40,"description":"Optional promo code."},"kunciIdempotensi":{"type":"string","minLength":8,"maxLength":100,"description":"Same as the Idempotency-Key header."},"setujuKompatibel":{"type":"boolean","const":true,"description":"The user confirmed the consent statement."},"bahasa":{"type":"string","enum":["id","en"],"default":"id"}}},"Pesanan":{"type":"object","properties":{"orderNumber":{"type":"string"},"token":{"type":"string","description":"Only in the 201 response."},"status":{"type":"string","enum":["awaiting_payment","proof_submitted","payment_confirmed","fulfilling","delivered","payment_rejected","expired","cancelled","refund_pending","refunded"]},"labelStatus":{"type":"string"},"langkahBerikutnya":{"type":"string","description":"What to do next, in plain language."},"subtotalIdr":{"type":"integer"},"diskonIdr":{"type":"integer","description":"Promo code discount."},"totalIdr":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"deliveredAt":{"type":["string","null"],"format":"date-time"},"item":{"type":"array","items":{"type":"object","properties":{"nama":{"type":"string"},"slug":{"type":["string","null"]},"jumlah":{"type":"integer"},"hargaSatuanIdr":{"type":"integer"}}}},"pembayaran":{"type":["object","null"],"properties":{"metode":{"type":"string","enum":["gateway"]},"nominalIdr":{"type":"integer","description":"Amount charged on the payment page."},"penyedia":{"type":["string","null"]},"tautanBayar":{"type":"string","format":"uri","description":"Order page on the website where the user pays online (payment gateway). Give it to the user."}}},"esim":{"type":"array","items":{"type":"object","properties":{"smdpAddress":{"type":"string"},"activationCode":{"type":"string"},"qrPayload":{"type":"string"}}}},"tautan":{"type":"object","properties":{"halamanPesanan":{"type":"string","format":"uri"},"status":{"type":"string","format":"uri"}}}}}}}}