Invoices
Create a one-off invoice in the dashboard, send its link, and let the customer pick how to pay.
An invoice (tagihan) is a payment you create in the dashboard, with no code. You enter the amount and send the payment page link to the customer by WhatsApp or email. The customer picks how to pay: QRIS or a virtual account, from the methods switched on for your app.
Behind the scenes an invoice is an ordinary payment with method: "any". Its statuses, webhooks and refunds are the same as for any other payment.
Creating an invoice in the dashboard
Open Tagihan
In the dashboard, open Tagihan, the Sekali bayar tab, and click Buat tagihan. Pick test or live mode first: an invoice in test mode cannot be paid with real money.
Fill in the invoice
| Field | Notes |
|---|---|
| Aplikasi (app) | Shown when you have more than one app. Payment methods and the webhook follow this app. |
| Jumlah (amount) | Whole rupiah, no cents. |
| Deskripsi (description) | Optional. Shown on the payment page. |
| Referensi (reference) | Required, up to 64 characters. The dashboard suggests one like INV-261130-7KQ2. |
| Berlaku (valid for) | 24 hours, 6 hours, 1 hour or 15 minutes. |
| Customer | Name, WhatsApp number and email. All optional. |
Next to the form, the dashboard lists the methods switched on for that app, what the customer pays and what you receive. Methods that don't take the amount are greyed out. Set methods in Metode bayar.
Send it to the customer
Once the invoice is created, the dashboard shows:
- the payment page link (
https://pay.piti.id/pay/pay_...) with a copy button; - an editable message for the customer, with the amount, the link and the deadline;
- Kirim lewat WhatsApp, which opens WhatsApp with that message to the customer's number (leave the number empty to pick a contact);
- Salin pesan, to paste the message into an email or another chat app.
We don't send emails or WhatsApp messages ourselves. You send the link.
The Tagihan list shows only invoices made in the dashboard, with the team member who made each one. Click a row to see its details or share the link again.
What the customer sees
The payment page lists the methods that are switched on for your app and take the invoice's amount, with the total for each. When the VA fee is charged to the customer, the total includes it.
- The customer picks one method. The QRIS or VA number is made then, and the fee and total are fixed from the app's settings at that moment.
- The pick is final. If making the QRIS or VA fails, the customer can pick again.
- The QRIS code is renewed by itself while the invoice is open.
Before the pick, the payment has method: "any", qris and va are null, fee is 0 and total equals amount. After the pick, method is qris or va.
Invoices in the API
Dashboard invoices show up in the API like any payment, with source: "dashboard" and created_by naming the team member who made it. An API key sees only its own app's payments, so an invoice for another app is not visible to it.
curl "https://pay.piti.id/v1/payments?source=dashboard&status=pending" \
-H "Authorization: Bearer lbp_test_xxxxxxxx"The other source values are api (made with an API key), subscription (recurring invoices), xendit (Xendit compatibility mode) and duitku (Duitku compatibility mode).
Making the same invoice through the API
Create a payment with method: "any" and send its checkout_url to the customer.
curl https://pay.piti.id/v1/payments \
-H "Authorization: Bearer lbp_test_xxxxxxxx" \
-H "Idempotency-Key: 6f1c2a9e-tagihan-1042" \
-H "Content-Type: application/json" \
-d '{
"amount": 150000,
"reference": "INV-1042",
"method": "any",
"description": "Coffee beans 1 kg",
"expires_in": 86400,
"customer": { "name": "Budi Santoso", "phone": "0812xxxxxxx" }
}'expires_informethod: "any"can be up to 2,592,000 seconds (30 days). Forqrisandvathe limit is 24 hours.- If no switched-on method takes the amount, you get
409 method_disabled. - This payment has
source: "api", notdashboard, so it is not in the Tagihan list. It is in Pembayaran (Payments).
See Create a payment for every field.
Once it is paid
You get a payment.paid webhook with the full payment, including the method the customer picked. An invoice not paid by its deadline sends payment.expired. If the customer still pays after that (for example, a transfer to a VA they were already given), the payment becomes paid with paid_late: true. See Webhooks.
Billing on a schedule?
For invoices issued every week or month, use Recurring billing.