PinnPayHow it worksFeaturesUse casesPricingFAQContactDocsSign inFor AI agents: share /docs.md or paste the copied docs.
The only API version. The old /api/pay endpoint is not supported.
Base URL: https://artomoro.group/api/v1
Format: JSON, UTF-8. Money: integer Rupiah. Time: ISO 8601 +07:00 (WIB).
| Field | Meaning |
|---|---|
| nominal | invoice price; credited to your balance |
| kode_unik | 200-300, gateway fee paid by the buyer |
| total_bayar | nominal + kode_unik |
| status | Meaning |
|---|---|
| PENDING | awaiting payment, valid 5 minutes |
| PAID | paid (final) |
| EXPIRED | expired; a payment up to 30 minutes later can still turn it PAID |
Authorization: Bearer <API_KEY> Content-Type: application/json
Find the key under API & Webhook after approval. Limit: 60 requests per minute per key.
| Body | Type | Required | Notes |
|---|---|---|---|
| nominal | integer | yes | 100 - 10000000 |
| ref | string(64) | yes | unique order ID. Letters, digits, . _ - : /. Repeating it returns the same transaction |
| note | string(140) | no | free text |
| client_id | string | no | if sent it must match the API key |
curl -X POST https://artomoro.group/api/v1/payments \
-H "Authorization: Bearer $PINNPAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"nominal":7000,"ref":"ORDER-1"}'201 (200 if the ref already exists):
{
"tx_id": 1042,
"ref": "ORDER-1",
"note": "",
"nominal": 7000,
"kode_unik": 239,
"total_bayar": 7239,
"status": "PENDING",
"qris_payload": "000201...6304ABCD",
"created_at": "2026-12-03T14:22:00+07:00",
"expired_at": "2026-12-03T14:27:00+07:00",
"paid_at": null,
"rrn": null,
"payer": null
}Same shape as above. paid_at, rrn and payer are filled once PAID. Poll no faster than every 5 seconds.
{"data": [ { "tx_id": 1042, "ref": "ORDER-1", "status": "PAID", "total_bayar": 7239 } ], "page": 1, "has_more": false}50 items per page.
{"available": 486500, "held": 200000}Withdrawals are dashboard-only (OTP required); there is no API endpoint.
Events: payment.paid and payment.expired. Sent by POST to your URL (public HTTPS only, redirects are not followed).
X-PinnPay-Timestamp: 1796283720 X-PinnPay-Signature: <hex HMAC-SHA256(secret, timestamp + "." + raw_body)>
{"event":"payment.paid","tx_id":1042,"ref":"ORDER-1","status":"PAID","nominal":7000,"kode_unik":239,"total_bayar":7239,"rrn":"1u6nxxxx","paid_at":"2026-12-03T14:23:10+07:00"}Reply 2xx within 10 s. On failure we retry after 10 s, 1 min, 5 min, then less often, 12 attempts in total. Reject timestamps older than 5 minutes.
const crypto = require("crypto");
app.post("/webhook", express.raw({ type: "application/json" }), async (req, res) => {
const ts = req.get("X-PinnPay-Timestamp") || "";
const sig = Buffer.from(req.get("X-PinnPay-Signature") || "", "hex");
const good = crypto.createHmac("sha256", process.env.PINNPAY_WEBHOOK_SECRET)
.update(ts + "." + req.body.toString()).digest();
const fresh = Math.abs(Date.now() / 1000 - Number(ts)) <= 300;
if (!fresh || sig.length !== good.length || !crypto.timingSafeEqual(sig, good)) return res.sendStatus(401);
const event = JSON.parse(req.body.toString());
if (event.event === "payment.paid") await fulfilOnce(event.tx_id, event.ref); // idempotent
res.sendStatus(200);
});import hmac, hashlib, os, time
@app.post("/webhook")
def webhook():
ts = request.headers.get("X-PinnPay-Timestamp", "")
sig = request.headers.get("X-PinnPay-Signature", "")
good = hmac.new(os.environ["PINNPAY_WEBHOOK_SECRET"].encode(),
ts.encode() + b"." + request.get_data(), hashlib.sha256).hexdigest()
if not ts.isdigit() or abs(time.time() - int(ts)) > 300 or not hmac.compare_digest(good, sig):
return "", 401
event = request.get_json()
if event["event"] == "payment.paid":
fulfil_once(event["tx_id"], event["ref"]) # idempotent
return "", 200<?php
$raw = file_get_contents("php://input");
$ts = $_SERVER["HTTP_X_PINNPAY_TIMESTAMP"] ?? "";
$sig = $_SERVER["HTTP_X_PINNPAY_SIGNATURE"] ?? "";
$good = hash_hmac("sha256", $ts . "." . $raw, getenv("PINNPAY_WEBHOOK_SECRET"));
if (!ctype_digit($ts) || abs(time() - (int)$ts) > 300 || !hash_equals($good, $sig)) { http_response_code(401); exit; }
$event = json_decode($raw, true);
if ($event["event"] === "payment.paid") fulfilOnce($event["tx_id"], $event["ref"]); // idempotent
http_response_code(200);{"error": {"code": "INVALID_REQUEST", "message": "nominal harus bilangan bulat"}}| HTTP | code | Action |
|---|---|---|
| 400 | INVALID_REQUEST | fix the input |
| 401 | INVALID_KEY | check the API key; suspended accounts get this too |
| 404 | NOT_FOUND | check tx_id |
| 409 | CONFLICT | unique codes exhausted, or same ref with a different nominal |
| 429 | RATE_LIMITED | wait 60 seconds |
| 5xx | SERVER_ERROR | retry with the same ref |