Malawali Payment Malawali Payment
Bantuan
Documentation
Malawali Payment · REST API v1

Integrasi Pembayaran QRIS

Buat order dari server Anda, tampilkan QR ke pelanggan, lalu terima callback order.paid setelah pembayaran terdeteksi otomatis. API Key dibuat per Project dan hanya aktif selama langganan berjalan.

Base URL http://localhost:3001/api
Autentikasi Header x-api-key: pk_live_…
Format JSON (request & response)
Webhook HMAC-SHA256, retry maksimal 3×, timeout 10 detik

Buat Order

Endpoint utama untuk memulai pembayaran. Response berisi pay_amount, string QRIS, dan checkout URL.

POST /api/orders

POST
base_amountWajib. Bilangan bulat rupiah > 0.
ttl_secondsOpsional. 60–86400, default 900.
reference_idOpsional. ID unik dari sistem Anda.
customer_nameOpsional. Nama pelanggan.
notify_urlOpsional. Webhook khusus order ini (prioritas tertinggi).
curl -X POST http://localhost:3001/api/orders \
  -H "x-api-key: pk_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "base_amount": 25000,
    "ttl_seconds": 900,
    "reference_id": "INV-2026-0001",
    "customer_name": "Budi",
    "notify_url": "https://app.example.com/webhook/malawali"
  }'
const res = await fetch("http://localhost:3001/api/orders", {
  method: "POST",
  headers: { "x-api-key": "pk_live_xxxxxxxxxxxxxxxxxxxxxxxx", "Content-Type": "application/json" },
  body: JSON.stringify({
    base_amount: 25000,
    ttl_seconds: 900,
    reference_id: "INV-2026-0001",
    customer_name: "Budi",
    notify_url: "https://app.example.com/webhook/malawali",
  }),
});
const order = await res.json();
console.log(order.id, order.pay_amount); // ord_… 25000
<?php
$ch = curl_init("http://localhost:3001/api/orders");
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ["x-api-key: pk_live_xxxxxxxxxxxxxxxxxxxxxxxx", "Content-Type: application/json"],
  CURLOPT_POSTFIELDS => json_encode([
    "base_amount" => 25000,
    "ttl_seconds" => 900,
    "reference_id" => "INV-2026-0001",
    "customer_name" => "Budi",
    "notify_url" => "https://app.example.com/webhook/malawali",
  ]),
]);
$order = json_decode(curl_exec($ch), true);
import requests

order = requests.post(
    "http://localhost:3001/api/orders",
    headers={"x-api-key": "pk_live_xxxxxxxxxxxxxxxxxxxxxxxx"},
    json={
        "base_amount": 25000,
        "ttl_seconds": 900,
        "reference_id": "INV-2026-0001",
        "customer_name": "Budi",
        "notify_url": "https://app.example.com/webhook/malawali",
    },
    timeout=10,
).json()
print(order["id"], order["pay_amount"])

200 OK

JSON
{
  "id": "ord_7f3k9d2m",
  "status": "pending",
  "base_amount": 25000,
  "pay_amount": 25000,
  "qris_string": "00020101021126610014COM.GO-JEK.WWW...",
  "checkout_url": "https://pay.example.com/pay/ord_7f3k9d2m",
  "expires_at": "2026-09-27T10:15:00.000Z",
  "reference_id": "INV-2026-0001"
}