Invoices
How invoices work in spuke, how customers pay them, and the roadmap for the invoice API.
Invoices
Invoices in spuke are created in the merchant dashboard (/dashboard/invoices/new). Each invoice generates a public payment link that anyone with the link can pay — no API key needed on the customer side.
A public REST API for
create / list / send invoiceis on the roadmap. Today you can automate invoice payments through Checkout Sessions and use the dashboard for invoicing.
Anatomy
| Field | Description |
|---|---|
number |
Auto-generated SPK-INV-YYYY-NNNN. |
currency |
ISO code — locked to the currency of any product line-item you add. |
line_items |
Free-form or imported from your Products catalog. Product-sourced items are locked to spuke values (price, quantity, VAT, currency). |
total_amount |
Sum incl. VAT. Minimum 2.50 in invoice currency (below that, PSP + spuke fees can't be covered). |
status |
draft → open → paid / void / uncollectible. |
public_token |
Random token used in the customer-facing URL. |
Customer payment flow
- Merchant creates the invoice and clicks Send — status becomes
open,public_tokenis minted. - Customer opens
https://payments.spuke.com/i/{public_token}(link is emailed automatically). - The page calls the internal function
invoice-checkoutwith{ action: "create_pi", token }, which:- creates a PaymentIntent as a destination charge on the merchant's connected account,
- resolves enabled payment methods for the invoice currency (Klarna, iDEAL, Bancontact, etc. are filtered per currency),
- applies the correct application-fee amount via the shared fee engine.
- On success the invoice is marked
paid, a receipt is emailed and ainvoice.paidwebhook is delivered to your endpoints.
Adding products to an invoice
In the New invoice page, click Add from products → pick a product. spuke will:
- copy
name,description,image,price,currency,VATfrom your catalog; - lock those fields (marked "From product · locked to spuke values");
- lock the invoice currency to the product currency;
- disable recurring products (subscriptions are API-only, coming soon).
Webhooks
Configure your endpoints in Dashboard → Developers → Webhooks.
| Event | When |
|---|---|
invoice.finalized |
Invoice moves from draft to open (send). |
invoice.paid |
Customer paid successfully. |
invoice.payment_failed |
Payment attempt failed. |
invoice.voided |
Merchant voided an open invoice. |
Payload includes id, number, amount_due, amount_paid, currency, customer_email, customer_name, line_items[], metadata.
Fees & minimums
All fees are calculated in EUR (see Fees, currency & minimum amounts). Minimum invoice total is 2.50 in the invoice currency.