Referensi API developer
Dokumentasi API TagihanAI
Dokumentasi API TagihanAI untuk integrasi invoice, billing, payment, webhook, autentikasi API key, rate limit, dan approval aplikasi developer.
- Base URL
https://www.tagihanai.com/api/v1- Versi API
v1- Content Type
application/json- Terakhir diperbarui
2026-06-30
Autentikasi
Autentikasikan request dengan header Authorization: Bearer sk_live_your_api_key. API key terikat ke workspace dan scope yang disetujui.
Akses Developer
Aplikasi pihak ketiga harus mendaftar dari portal developer, menyelesaikan review administrator, memakai credential sandbox untuk pengujian, lalu menerima credential live setelah approval.
Transactions
Unified document model supporting Invoice, Bill, Credit Note, and Debit Note types. External invoice apps can use external_source + external_invoice_id for idempotent invoice sync.
-
GET /transactions
Retrieve a paginated list of transactions with optional filters.
transactions:read -
POST /transactions
Create or idempotently upsert a transaction. External invoice apps should send external_source and external_invoice_id to avoid duplicates.
transactions:write -
GET /transactions/:id
Retrieve a single transaction by ID.
transactions:read -
PATCH /transactions/:id
Update a transaction. Draft transactions update in place; sent unpaid transactions are treated as revisions. Financial fields are locked after partial or full payment.
transactions:write -
DELETE /transactions/:id
Cancel a transaction. Paid and partially paid transactions cannot be deleted; use a reversal, credit note, or refund flow instead.
transactions:write -
POST /transactions/:id/actions/:action
Execute a state transition on a transaction. Available actions for external invoice apps: send, cancel, mark_paid.
transactions:write -
GET /transactions/:id/payments
Retrieve a paginated list of payments linked to a specific transaction.
transactions:read -
POST /transactions/:id/payments
Record an idempotent manual payment from the source app. Use external_source and external_payment_id when the payment was created outside TagihanAi.
payments:write
Parties
Unified API for customers and vendors. Use the role parameter to filter.
-
GET /parties
List customers and/or vendors.
parties:read -
POST /parties
Create a new customer or vendor.
parties:write -
GET /parties/:id
Retrieve a single customer or vendor by ID.
parties:read -
PATCH /parties/:id
Update a customer or vendor.
parties:write -
DELETE /parties/:id
Remove a customer or vendor.
parties:write
Payments
Payment transactions linked to invoices and bills.
-
GET /payments
List payment transactions.
payments:read -
GET /payments/:id
Retrieve a single payment transaction.
payments:read
Subscriptions
Recurring billing subscriptions with state management.
-
GET /subscriptions
List subscriptions with optional filters.
subscriptions:read -
POST /subscriptions
Create a new subscription.
subscriptions:write -
GET /subscriptions/:id
Retrieve a single subscription.
subscriptions:read -
PATCH /subscriptions/:id
Update subscription details.
subscriptions:write -
POST /subscriptions/:id/actions/:action
Execute a state transition. Actions: activate, pause, resume, cancel.
subscriptions:write
Webhooks
Manage outbound webhook subscriptions to receive real-time event notifications.
-
GET /webhooks
List all webhook subscriptions for your workspace.
webhooks:read -
POST /webhooks
Create a new webhook subscription. A signing secret will be auto-generated.
webhooks:write -
GET /webhooks/:id
Retrieve a single webhook subscription.
webhooks:read -
PATCH /webhooks/:id
Update webhook URL, event types, or status.
webhooks:write -
DELETE /webhooks/:id
Permanently delete a webhook subscription.
webhooks:write -
GET /webhooks/:id/deliveries
View delivery attempts and their results for a webhook subscription.
webhooks:read -
POST /webhooks/:id/test
Send a synthetic test event to verify your webhook endpoint.
webhooks:write
Settings
Workspace document, email template, invoice delivery, and invoice style settings for external invoice apps. Document number formats are intentionally excluded.
-
GET /settings/document-email
Read the workspace settings used by Settings > Dokumen & Email, including invoice delivery defaults, email templates, invoice style, and company display data.
settings:read -
PUT /settings/document-email
Update invoice delivery defaults, email templates, company display data, promo banner settings, and invoice style. Format Nomor Dokumen is ignored and must remain managed by TagihanAI.
settings:write
Public
Public endpoints that do not require authentication. Includes free invoice creation and developer app registration for administrator review.
-
POST /public/create-invoice
Create an invoice without authentication. Automatically creates a user account and workspace for the given email. If the email already exists, returns a login redirect instead.
public -
POST /api/developer/app-requests
Submit a third-party application for TagihanAI administrator review. Humans should use /developer#register for the guided signup form; this endpoint is available for automated partner workflows. Approved apps can receive sandbox and live partner credentials.
public
Panduan Webhook
Webhook TagihanAI mengirim event real-time ke endpoint HTTPS Anda. Verifikasi header X-TagihanAI-Signature dengan HMAC-SHA256.
Pertanyaan Umum
Apa itu API TagihanAI?
API TagihanAI adalah REST API berbasis JSON untuk mengakses data invoice, bill, pembayaran, langganan, webhook, pihak, dan pengaturan workspace secara terprogram.
Apa base URL API TagihanAI?
Base URL production adalah https://www.tagihanai.com/api/v1. Endpoint resource terautentikasi dipanggil relatif terhadap base URL ini, misalnya https://www.tagihanai.com/api/v1/transactions.
Bagaimana autentikasi request API TagihanAI?
Kirim API key di header Authorization sebagai Bearer token. API key terikat ke workspace dan dibatasi oleh scope yang sudah disetujui.
Bagaimana cara membuat invoice lewat API TagihanAI?
Gunakan POST /transactions dengan type INVOICE, total, data counterparty, line item opsional, serta external_source dan external_invoice_id untuk sinkronisasi idempotent.
Event webhook apa saja yang tersedia?
TagihanAI mendukung event transaksi, pembayaran, langganan, dan pihak, termasuk transaction.created, transaction.paid, payment.completed, subscription.activated, dan party.updated.
Bagaimana verifikasi signature webhook TagihanAI?
Baca header X-TagihanAI-Signature, susun payload bertanda tangan sebagai timestamp.raw_body, lalu verifikasi signature HMAC-SHA256 memakai webhook signing secret.
Apakah aplikasi pihak ketiga perlu approval sebelum memakai credential production?
Ya. Developer pihak ketiga mendaftarkan aplikasi, menyelesaikan review administrator, menguji dengan credential sandbox, lalu menerima credential live setelah disetujui.