{"openapi":"3.0.0","info":{"title":"QRIS Simulator API","version":"0.0.2","description":"Unofficial QRIS Payment Gateway Simulator API - untuk testing integrasi tanpa mengurangi saldo","contact":{"name":"QRIS Simulator","url":"https://github.com/wowotek/qris_simulator"},"license":{"name":"GPL-3.0","url":"https://www.gnu.org/licenses/gpl-3.0.html"}},"servers":[{"url":"https://srdstudio.cloud/qris-simulator","description":"Production server (HTTPS)"},{"url":"http://202.10.47.188/qris-simulator","description":"Production server (HTTP)"},{"url":"http://localhost:8092","description":"Local VPS server (direct port access)"},{"url":"http://localhost:3333","description":"Development server"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"query","name":"apikey","description":"API Key from user_config.json"},"MIDAuth":{"type":"apiKey","in":"query","name":"mID","description":"Merchant ID from user_config.json"}},"schemas":{"CreateInvoiceResponse":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"type":"object","properties":{"qris_request_date":{"type":"string","example":"2025-10-19 10:30:00"},"qris_invoiceid":{"type":"string","example":"123456789"},"qris_nmid":{"type":"string","example":"ID1234567890123"},"qris_content":{"type":"string","example":"http://localhost:3333/not_official/mockupPayment?t=token"}}}}},"CheckInvoiceResponse":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"type":"object","properties":{"qris_status":{"type":"string","example":"paid"},"qris_payment_customername":{"type":"string","example":"John Doe"},"qris_payment_methodby":{"type":"string","example":"GoPay"}}}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","example":"failed"},"data":{"type":"object","properties":{"qris_status":{"type":"string","example":"error message"}}}}}}},"paths":{"/restapi/qris/show_qris.php":{"get":{"summary":"Create QRIS Invoice","description":"Generate a new QRIS payment invoice with QR code","tags":["QRIS Official API"],"security":[{"ApiKeyAuth":[]},{"MIDAuth":[]}],"parameters":[{"in":"query","name":"do","required":true,"schema":{"type":"string","enum":["create-invoice"]},"description":"Action type (must be \"create-invoice\")"},{"in":"query","name":"apikey","required":true,"schema":{"type":"string"},"description":"API Key from configuration"},{"in":"query","name":"mID","required":true,"schema":{"type":"integer"},"description":"Merchant ID from configuration"},{"in":"query","name":"cliTrxNumber","required":true,"schema":{"type":"string"},"description":"Unique transaction number (must be unique for each invoice)"},{"in":"query","name":"cliTrxAmount","required":true,"schema":{"type":"integer","minimum":10000,"maximum":2000000},"description":"Payment amount in IDR (min 10,000, max 2,000,000)"}],"responses":{"200":{"description":"Invoice created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceResponse"}}}},"400":{"description":"Bad request (invalid parameters or amount)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized (invalid API key or mID)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/restapi/qris/checkpaid_qris.php":{"get":{"summary":"Check Invoice Payment Status","description":"Check whether an invoice has been paid","tags":["QRIS Official API"],"security":[{"ApiKeyAuth":[]},{"MIDAuth":[]}],"parameters":[{"in":"query","name":"do","required":true,"schema":{"type":"string","enum":["checkStatus"]},"description":"Action type (must be \"checkStatus\")"},{"in":"query","name":"apikey","required":true,"schema":{"type":"string"},"description":"API Key from configuration"},{"in":"query","name":"mID","required":true,"schema":{"type":"integer"},"description":"Merchant ID from configuration"},{"in":"query","name":"invid","required":true,"schema":{"type":"string"},"description":"Invoice ID from create invoice response"},{"in":"query","name":"trxvalue","required":true,"schema":{"type":"integer"},"description":"Transaction amount"},{"in":"query","name":"trxdate","required":true,"schema":{"type":"string","format":"date"},"description":"Transaction date in YYYY-MM-DD format"}],"responses":{"200":{"description":"Payment status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckInvoiceResponse"}}}},"400":{"description":"Bad request or API key banned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/not_official/mockupPayment":{"get":{"summary":"Mockup Payment Page","description":"Display payment mockup page (accessed via QR code scan)","tags":["Simulator Tools"],"parameters":[{"in":"query","name":"t","required":true,"schema":{"type":"string"},"description":"Payment token from QR code"}],"responses":{"200":{"description":"Payment page rendered"}}}},"/not_official/pay":{"post":{"summary":"Process Mockup Payment","description":"Submit mockup payment (simulates actual payment)","tags":["Simulator Tools"],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["token","paymentMethod"],"properties":{"token":{"type":"string","description":"Payment token"},"customerName":{"type":"string","description":"Customer name (optional)"},"paymentMethod":{"type":"string","description":"Payment method (GoPay, ShopeePay, etc.)"}}}}}},"responses":{"200":{"description":"Payment processed"}}}}},"tags":[]}