{"info":{"_postman_id":"0ee1fa0b-b1f5-486e-a177-35ed57345fe1","name":"SawargiPay H2H API","description":"<html><head></head><body><h1 id=\"sawargipay-h2h-api-documentation\">SawargiPay H2H API Documentation</h1>\n<h2 id=\"base-url\">Base URL</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>https://h2h.sawargipay.cloud\n</code></pre><h2 id=\"authentication\">Authentication</h2>\n<p>Semua endpoint (kecuali <code>/auth</code>) memerlukan header:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Api-Key: YOUR_API_KEY\n</code></pre><h2 id=\"cara-pakai\">Cara Pakai</h2>\n<h3 id=\"1-get-api-key\">1. Get API Key</h3>\n<p>Panggil endpoint <code>/auth</code> dengan email &amp; password untuk mendapatkan API Key.</p>\n<h3 id=\"2-simpan-api-key\">2. Simpan API Key</h3>\n<p>Simpan API Key yang didapat untuk dipakai di request selanjutnya.</p>\n<h3 id=\"3-gunakan-api-key\">3. Gunakan API Key</h3>\n<p>Tambahkan header <code>Api-Key</code> di setiap request.</p>\n<h2 id=\"environment-variables\">Environment Variables</h2>\n<p>Buat environment di Postman dengan variables:</p>\n<ul>\n<li><code>base_url</code>: <a href=\"https://h2h.sawargipay.cloud\">https://h2h.sawargipay.cloud</a></li>\n<li><code>api_key</code>: (akan di-set otomatis setelah auth)</li>\n<li><code>trx_kode</code>: (akan di-set otomatis setelah transaksi)</li>\n</ul>\n<h2 id=\"support\">Support</h2>\n<p>Jika ada kendala, hubungi:</p>\n<ul>\n<li>Email: <a href=\"mailto:support@sawargipay.com\">support@sawargipay.com</a></li>\n<li>WhatsApp: 082126818120</li>\n</ul>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"SawargiPay H2H API Documentation","slug":"sawargipay-h2h-api-documentation"}],"owner":"48671858","collectionId":"0ee1fa0b-b1f5-486e-a177-35ed57345fe1","publishedId":"2sBXc8qPfn","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2026-02-08T04:16:22.000Z"},"item":[{"name":"1. Authentication","item":[{"name":"Get API Key","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","pm.test(\"Response has status true\", function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData.status).to.eql(true);","});","","pm.test(\"Response has API Key\", function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData.data.api_key).to.exist;","});","","if (pm.response.code === 200) {","    var jsonData = pm.response.json();","    if (jsonData.status && jsonData.data.api_key) {","        pm.environment.set(\"api_key\", jsonData.data.api_key);","        console.log(\"✅ API Key saved:\", jsonData.data.api_key);","    }","}"],"type":"text/javascript","id":"3ba116f0-ce76-472f-abef-a8b081589535"}}],"id":"4c97ca5b-2379-4561-84b2-a46c8f1e810a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"email\": \"your-email@example.com\",\n  \"password\": \"your-password\"\n}"},"url":"https://h2h.sawargipay.cloud/auth","description":"<p>Endpoint untuk mendapatkan API Key menggunakan email &amp; password.</p>\n<p><strong>Request:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"email\": \"partner@example.com\",\n  \"password\": \"your-password\"\n}\n\n</code></pre>\n<p><strong>Success Response (200):</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": true,\n  \"message\": \"Authentication successful\",\n  \"data\": {\n    \"api_key\": \"TOKEN-ABC123\",\n    \"name\": \"Partner Name\",\n    \"email\": \"partner@example.com\",\n    \"phone\": \"081234567890\"\n  }\n}\n\n</code></pre>\n","urlObject":{"path":["auth"],"host":["https://h2h.sawargipay.cloud"],"query":[],"variable":[]}},"response":[],"_postman_id":"4c97ca5b-2379-4561-84b2-a46c8f1e810a"}],"id":"e20941d8-42de-4a10-b938-55186edc9d40","_postman_id":"e20941d8-42de-4a10-b938-55186edc9d40","description":""},{"name":"2. Saldo","item":[{"name":"Cek Saldo","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","pm.test(\"Response has saldo\", function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData.data).to.have.property('saldo');","});"],"type":"text/javascript","id":"477d867b-d491-4eb9-b3f6-e15533083a08"}}],"id":"beb77f9e-7de2-4276-b58a-3eab17cf5270","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Api-Key","value":"","type":"text"}],"body":{"mode":"raw","raw":""},"url":"https://h2h.sawargipay.cloud/saldo","description":"<p>Endpoint untuk mengecek saldo akun.</p>\n<p><strong>Headers:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Api-Key: YOUR_API_KEY\n</code></pre><p><strong>Success Response (200):</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": true,\n  \"message\": \"Saldo berhasil diambil\",\n  \"data\": {\n    \"saldo\": 500000,\n    \"saldo_formatted\": \"Rp 500.000\"\n  }\n}\n</code></pre>\n","urlObject":{"path":["saldo"],"host":["https://h2h.sawargipay.cloud"],"query":[],"variable":[]}},"response":[],"_postman_id":"beb77f9e-7de2-4276-b58a-3eab17cf5270"}],"id":"cd3580b4-ae46-43d4-a3d3-a111b74dd460","_postman_id":"cd3580b4-ae46-43d4-a3d3-a111b74dd460","description":""},{"name":"3. Produk","item":[{"name":"Get All Products","id":"e394e304-11bb-41a9-9287-2a62ca627c2f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Api-Key","value":"","type":"text"}],"body":{"mode":"raw","raw":""},"url":"https://h2h.sawargipay.cloud/produk","description":"<p>Mengambil semua produk (PULSA + PAKET_DATA).</p>\n","urlObject":{"path":["produk"],"host":["https://h2h.sawargipay.cloud"],"query":[],"variable":[]}},"response":[],"_postman_id":"e394e304-11bb-41a9-9287-2a62ca627c2f"},{"name":"Get Products by Category (PULSA)","id":"e02c7cf3-2f79-491f-98ce-597986c52e30","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Api-Key","value":"","type":"text"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"kategori\": \"PULSA\"\n}"},"url":"https://h2h.sawargipay.cloud/produk","description":"<p>Filter produk berdasarkan kategori PULSA.</p>\n","urlObject":{"path":["produk"],"host":["https://h2h.sawargipay.cloud"],"query":[],"variable":[]}},"response":[],"_postman_id":"e02c7cf3-2f79-491f-98ce-597986c52e30"},{"name":"Get Products by Category (MASA_AKTIF)","id":"50be7e16-b2da-4de4-ac34-993fe3aa3204","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Api-Key","value":"","type":"text"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"kategori\": \"MASA_AKTIF\"\n}"},"url":"https://h2h.sawargipay.cloud/produk","description":"<p>Filter produk berdasarkan kategori PULSA.</p>\n","urlObject":{"path":["produk"],"host":["https://h2h.sawargipay.cloud"],"query":[],"variable":[]}},"response":[],"_postman_id":"50be7e16-b2da-4de4-ac34-993fe3aa3204"},{"name":"Get Products by Category (PAKET_DATA)","id":"96d706b4-d8c9-4c35-9688-4274da22e327","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Api-Key","value":"","type":"text"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"kategori\": \"PAKET_DATA\"\n}"},"url":"https://h2h.sawargipay.cloud/produk","description":"<p>Filter produk berdasarkan kategori PAKET_DATA.</p>\n","urlObject":{"path":["produk"],"host":["https://h2h.sawargipay.cloud"],"query":[],"variable":[]}},"response":[],"_postman_id":"96d706b4-d8c9-4c35-9688-4274da22e327"},{"name":"Get Products by Operator","id":"a988a5a7-823a-4ed2-ac43-2415eaca798d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Api-Key","value":"","type":"text"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"operator\": \"Telkomsel\"\n}"},"url":"https://h2h.sawargipay.cloud/produk","description":"<p>Filter produk berdasarkan operator (Telkomsel, Indosat, XL, Axis, Tri, Smartfren).</p>\n","urlObject":{"path":["produk"],"host":["https://h2h.sawargipay.cloud"],"query":[],"variable":[]}},"response":[],"_postman_id":"a988a5a7-823a-4ed2-ac43-2415eaca798d"},{"name":"Get Products by Category & Operator","id":"bb1d74c6-5d41-404e-b0c1-04393f0ff24f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Api-Key","value":"","type":"text"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"kategori\": \"PAKET_DATA\",\n  \"operator\": \"Telkomsel\"\n}"},"url":"https://h2h.sawargipay.cloud/produk","description":"<p>Filter produk berdasarkan kategori DAN operator.</p>\n","urlObject":{"path":["produk"],"host":["https://h2h.sawargipay.cloud"],"query":[],"variable":[]}},"response":[],"_postman_id":"bb1d74c6-5d41-404e-b0c1-04393f0ff24f"}],"id":"90da5d92-5512-44cc-9751-9a104a3dec49","_postman_id":"90da5d92-5512-44cc-9751-9a104a3dec49","description":""},{"name":"4. Transaksi","item":[{"name":"Create Transaction (PULSA)","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","pm.test(\"Response has trx_kode\", function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData.data).to.have.property('trx_kode');","});","","if (pm.response.code === 200) {","    var jsonData = pm.response.json();","    if (jsonData.data && jsonData.data.trx_kode) {","        pm.environment.set(\"trx_kode\", jsonData.data.trx_kode);","        console.log(\"✅ trx_kode saved:\", jsonData.data.trx_kode);","    }","}"],"type":"text/javascript","id":"ee81799c-eda6-4dca-8976-09ecdacac8d0"}}],"id":"0925605f-848e-49b0-aa85-2a1825dd0149","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Api-Key","value":"","type":"text"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"produk_kode\": \"TSEL5\",\n  \"tujuan\": \"081234567890\",\n  \"kategori\": \"PULSA\"\n}"},"url":"https://h2h.sawargipay.cloud/transaksi","description":"<p>Membuat transaksi PULSA.</p>\n<p><strong>Request:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"produk_kode\": \"TSEL5\",\n  \"tujuan\": \"081234567890\",\n  \"kategori\": \"PULSA\"\n}\n</code></pre>\n<p><strong>Success Response:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": true,\n  \"message\": \"Transaksi berhasil dibuat\",\n  \"data\": {\n    \"trx_kode\": \"PULSA-ABC123-456-103045\",\n    \"kategori\": \"PULSA\",\n    \"produk\": \"Telkomsel 5.000\",\n    \"tujuan\": \"081234567890\",\n    \"harga\": 5500,\n    \"sn\": \"\",\n    \"rc\": \"39\",\n    \"status\": \"Pending\"\n  }\n}\n</code></pre>\n<p><strong>Notes:</strong></p>\n<ul>\n<li>Simpan <code>trx_kode</code> untuk cek status</li>\n<li>rc: 00 = sukses, 39 = pending</li>\n</ul>\n","urlObject":{"path":["transaksi"],"host":["https://h2h.sawargipay.cloud"],"query":[],"variable":[]}},"response":[],"_postman_id":"0925605f-848e-49b0-aa85-2a1825dd0149"},{"name":"Create Transaction (PAKET_DATA)","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","if (pm.response.code === 200) {","    var jsonData = pm.response.json();","    if (jsonData.data && jsonData.data.trx_kode) {","        pm.environment.set(\"trx_kode\", jsonData.data.trx_kode);","    }","}"],"type":"text/javascript","id":"30050c51-4775-410d-ba26-6b85629d27d6"}}],"id":"e7ab14e6-8b4f-4714-a692-ea22d756333d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Api-Key","value":"","type":"text"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"produk_kode\": \"TSELDATA1GB\",\n  \"tujuan\": \"081234567890\",\n  \"kategori\": \"PAKET_DATA\"\n}"},"url":"https://h2h.sawargipay.cloud/transaksi","description":"<p>Membuat transaksi PAKET_DATA.</p>\n","urlObject":{"path":["transaksi"],"host":["https://h2h.sawargipay.cloud"],"query":[],"variable":[]}},"response":[],"_postman_id":"e7ab14e6-8b4f-4714-a692-ea22d756333d"}],"id":"0e679d52-bc00-48ac-a9fe-fff7ea7fde23","_postman_id":"0e679d52-bc00-48ac-a9fe-fff7ea7fde23","description":""},{"name":"5. Status","item":[{"name":"Check Transaction Status","event":[{"listen":"test","script":{"exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});","","pm.test(\"Response has transaction data\", function () {","    var jsonData = pm.response.json();","    pm.expect(jsonData.data).to.have.property('trx_kode');","    pm.expect(jsonData.data).to.have.property('status');","});"],"type":"text/javascript","id":"4d3dd0c2-d3a0-42a1-ad25-98f91116eece"}}],"id":"5336ce2d-d9cd-4919-b613-194b11cdab24","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Api-Key","value":"","type":"text"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n  \"trx_id\": \"\"\n}"},"url":"https://h2h.sawargipay.cloud/status","description":"<p>Mengecek status transaksi menggunakan <code>trx_id</code> (trx_kode dari response transaksi).</p>\n<p><strong>Request:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"trx_id\": \"PULSA-ABC123-456-103045\"\n}\n</code></pre>\n<p><strong>Success Response:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": true,\n  \"message\": \"Status transaksi berhasil diambil\",\n  \"data\": {\n    \"trx_kode\": \"PULSA-ABC123-456-103045\",\n    \"kategori\": \"PULSA\",\n    \"nomor\": \"081234567890\",\n    \"nama\": \"Telkomsel 5.000\",\n    \"harga\": 5500,\n    \"sn\": \"1234567890123456\",\n    \"rc\": \"00\",\n    \"status\": \"Sukses\",\n    \"tanggal\": \"2026-02-08 10:30:00\"\n  }\n}\n</code></pre>\n<p><strong>Status Values:</strong></p>\n<ul>\n<li>Pending: Sedang diproses</li>\n<li>Sukses: Berhasil</li>\n<li>Gagal: Transaksi gagal</li>\n</ul>\n","urlObject":{"path":["status"],"host":["https://h2h.sawargipay.cloud"],"query":[],"variable":[]}},"response":[],"_postman_id":"5336ce2d-d9cd-4919-b613-194b11cdab24"}],"id":"f9770771-92b6-4d68-98e4-6b40407c0cb9","_postman_id":"f9770771-92b6-4d68-98e4-6b40407c0cb9","description":""}],"variable":[{"key":"base_url","value":"https://h2h.sawargipay.cloud","type":"string"},{"key":"api_key","value":"","type":"string"},{"key":"trx_kode","value":"","type":"string"}]}