Public API
BagiNota API
Integrasikan split bill ke POS, kasir, atau aplikasi kamu. Buat session via API, customer scan QR, selesai.
API Key
Login untuk generate API key kamu.
Autentikasi
Semua request ke /api/v1/* butuh header:
Authorization: Bearer bnota_xxxxxRate limit: 60 request per jam.
Endpoints
POST
/api/v1/sessionsBuat session split bill baru
Request body
{
"items": [
{ "name": "Nasi Goreng", "price": 35000, "qty": 2 },
{ "name": "Es Teh", "price": 8000, "qty": 3 }
],
"taxPercent": 10,
"servicePercent": 0,
"people": [{ "name": "Andi" }, { "name": "Budi" }],
"reference": "ORDER-123"
}Response (201)
{
"id": "aBcDeFgHiJ",
"url": "https://baginota.com/s/aBcDeFgHiJ",
"status": "open",
"created_at": "2026-04-09T..."
}GET
/api/v1/sessions/{id}Cek status session
Response (200)
{
"id": "aBcDeFgHiJ",
"status": "open",
"view_count": 5,
"data": { ... },
"created_at": "...",
"updated_at": "..."
}Fields
| Field | Type | Wajib |
|---|---|---|
| items[] | array | Ya |
| items[].name | string | Ya |
| items[].price | number | Ya |
| items[].qty | number | Default: 1 |
| people[] | array | Opsional |
| taxPercent | number | Default: 0 |
| servicePercent | number | Default: 0 |
| rounding | "none" | 500 | 1000 | Default: "none" |
| reference | string | Opsional (ID order kamu) |
Error Codes
| Status | Error | Keterangan |
|---|---|---|
| 401 | unauthorized | API key tidak valid atau tidak ada |
| 400 | validation_error | Request body tidak valid |
| 404 | not_found | Session tidak ditemukan |
| 429 | rate_limited | Rate limit tercapai (60 req/jam) |
| 500 | internal_error | Server error |
Contoh: cURL
curl -X POST https://baginota.com/api/v1/sessions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"items": [
{"name": "Nasi Goreng", "price": 35000, "qty": 2},
{"name": "Es Teh", "price": 8000, "qty": 3}
],
"taxPercent": 10
}'Cara Kerja
1
POS hit API
Kirim data bill dari kasir ke API
2
Dapat link
API return URL session yang bisa di-share
3
Customer scan
Print QR atau kirim link ke customer
4
Assign & split
Customer assign siapa makan apa di HP masing-masing