Saweria Payment

API Reference

Base URL: https://payment.menglabs.id

POST/api/donateBuat donasi QRIS

Request Body

{
  "nominal": 1000,       // required — jumlah donasi (IDR)
  "platform": "huastream", // required
  "name": "Nasri",       // required
  "email": "..."         // optional, default: menglabsofficial@gmail.com
}

Response 201

{
  "qr_string": "00020101..."
}
POST/api/webhook/saweriaSaweria webhook receiver

Daftarkan URL ini ke Saweria. Webhook akan diforward ke target berdasarkan platform yang diparsing dari donator_name (format: platform-name).

Saweria Webhook Body

{
  "version": "2022.01",
  "created_at": "2026-06-07T21:36:01.013665+07:00",
  "id": "a4092755-...",
  "type": "donation",
  "amount_raw": 1008,
  "cut": -58,
  "donator_name": "huastream-Nasri",  // platform = "huastream"
  "donator_email": "...",
  "donator_is_user": false,
  "message": "test message",
  "etc": {
    "qr_string": "...",
    "amount_to_display": 1000,
    "transaction_fee_policy": "TIPPER"
  }
}

Response 200

{
  "received": true,
  "platform": "huastream",
  "forwarded_to": "https://..."
}
GET/api/webhook-targetsList semua targets

Response 200

{
  "data": [
    {
      "id": "uuid",
      "platform": "huastream",
      "webhook_url": "https://...",
      "created_at": "...",
      "updated_at": "..."
    }
  ]
}
POST/api/webhook-targetsTambah / update target

Request Body

{
  "platform": "huastream",
  "webhook_url": "https://example.com/webhook"
}
DEL/api/webhook-targets/:idHapus target
{ "success": true }