DevelopersAccept payments

Invoices and receipts

Read the invoice or payment receipt Fianto made for each payment through your application, download its PDF, and follow documents through webhooks.

4 min read

Fianto makes one document in the merchant's name for every payment that succeeds: an invoice when the merchant has turned invoices on, otherwise a payment receipt. Later corrections are credit notes and, when company details are added, a replacement invoice. Your server can read these documents with three read-only v1 routes, and follows them through the invoice.* and credit_note.issued webhook events. What the merchant sees is in Invoices.

What your application can read

Every read is scoped to the calling application, as /v1/payments is. An application sees the documents of payments made through it: the invoice or receipt of each one-time payment, subscription payment and renewal, and the credit notes and replacement invoices made for them. A draft is never shown.

Invoices and payment requests the merchant writes in the dashboard belong to the merchant's Shop application, which holds no secret, so no API key can read them. They reach you only through the Shop application's webhooks; see Payment link sales for how that application works.

The SDK has no methods for these routes yet: call them over HTTP with your app id and secret, as in Authentication.

List documents

GET /v1/invoices returns your documents, newest issued first, as { "items": [...], "next_cursor" }.

QueryValues
document_typeinvoice, receipt or payment_request. A credit note has the type of the document it credits
statusopen, overdue, part_paid, paid, credited, part_credited, void or issued (credit notes)
created_gte, created_lteISO 8601 times, both included, on issued_at
cursorThe previous page's next_cursor
limit1 to 100; 20 when left out

open includes overdue and part-paid documents, and paid includes credited ones. overdue is an open document whose due date is before today in the merchant's issue time zone. next_cursor is null on the last page. An unknown query parameter is a 400.

curl "https://api.fianto.xyz/v1/invoices?document_type=invoice&limit=10" \
  --user "$FIANTO_APP_ID:$FIANTO_APP_SECRET"

Read one

GET /v1/invoices/{id} returns one document by its id, fian_inv_ followed by letters and digits.

{
  "id": "fian_inv_3hQm7Rk2XbV9cTnL4pWs8d",
  "object": "invoice",
  "number": "INV-0042",
  "kind": "invoice",
  "document_type": "invoice",
  "status": "paid",
  "source": "checkout",
  "issue_date": "2026-09-28",
  "due_date": null,
  "currency": "USD",
  "subtotal": "20830000",
  "tax_amount": "4170000",
  "total": "25000000",
  "credited_amount": "0",
  "customer": {
    "id": "fian_cus_0cJCFTfDw8ZkPLbdr7m2d62PU0SL",
    "wallet": "FxLsWPrqTpmc1yHrKoYj8SE75mAzavKwPDen7Y2xF7pw",
    "email": "ada@example.com",
    "reference": "user_42"
  },
  "payment": {
    "id": "fian_pay_5caFRGUqMblmAgHXQ22uKn0hcZSj",
    "signature": "dbmKAFCAkMz8B2QTsHWkF1GtGVWQkjqXszoGh3XqDsyqsE26ftxJBSAeCpymBVfFGAjA8k6wG52JoKUcwo4nyMN"
  },
  "order_id": "order_1001",
  "subscription_id": null,
  "replaces": null,
  "credits": null,
  "created_at": "2026-09-28T10:02:20.000Z",
  "network": "mainnet",
  "issued_at": "2026-09-28T10:02:20.000Z"
}

Download the PDF

GET /v1/invoices/{id}/pdf returns the document as application/pdf, as a download named like Invoice_INV-0042_Acme-Ltd_2026-09-28.pdf. The PDF includes the buyer's company details, which the JSON leaves out. The response is never cached.

curl -OJ "https://api.fianto.xyz/v1/invoices/fian_inv_3hQm7Rk2XbV9cTnL4pWs8d/pdf" \
  --user "$FIANTO_APP_ID:$FIANTO_APP_SECRET"

The document object

The same object is the data of every invoice webhook event except invoice.payment_recorded. The v1 routes add issued_at.

FieldMeaning
idfian_inv_…
objectinvoice, or credit_note for a credit note
numberSuch as INV-0042, REQ-0003 or CN-0004. null for a payment receipt, which goes by its payment's number
kindinvoice or credit_note
document_typeinvoice, receipt or payment_request. A credit note has its original's type
statusopen, paid, void or issued (a credit note)
sourcecheckout (a one-time payment), subscription, manual (written in the dashboard) or external (issued for a transfer the merchant recorded)
issue_date, due_dateYYYY-MM-DD, or null
currencyAlways USD. The payer pays in USDC, valued at 1.00 USD, or in US dollars by card
subtotal, tax_amount, total, credited_amountStrings in base units, 6 decimals: "25000000" is 25.00 USD. subtotal is total less tax_amount. total is the merchant's price: the service fee and the network fee are not part of it
customerThe payer's customer id, wallet, email (as typed, unverified) and the merchant's own reference
paymentThe payment and its transaction signature. Both null on a credit note and on a document nobody has paid
order_idYour own order_id. null for a document the merchant wrote
subscription_idThe subscription a subscription payment belongs to, or null
replacesThe id of the invoice this one replaces, or null
creditsOn a credit note, the id of the document it credits
created_atWhen the document was created
networkmainnet
issued_atv1 only: when it was issued

The buyer's company name, address, tax ID and company number are never in the JSON. They are on the PDF.

Webhook events

Invoice events go to the endpoint of the application the document belongs to: yours for documents of payments made through it, the Shop application's for documents the merchant writes.

EventWhen
invoice.issuedA document was issued: the invoice or receipt of a payment, an invoice or payment request the merchant finalized, a replacement invoice, a paid payment request's receipt, or a document for a transfer the merchant recorded
invoice.paidAn invoice or payment request the merchant wrote was paid, through its link or by transfers the merchant recorded
invoice.payment_recordedA transfer the merchant recorded was applied to an invoice or payment request
invoice.voidedThe merchant voided an open invoice or payment request
credit_note.issuedA credit note was issued: after a void, a refund checked on Solana, a card refund that succeeded, or company details added later

Payloads and the exact moment each is sent are on Event types. The SDK's webhook handlers have a typed callback for each: onInvoiceIssued, onInvoicePaid, onInvoicePaymentRecorded, onInvoiceVoided and onCreditNoteIssued.

Not on devnet

Devnet does not serve invoices: its API has no /v1/invoices routes, and it sends no invoice events. If invoices are not available on Fianto yet, the routes answer 404 with no code.

Troubleshooting

You seeWhyFix
404 invoice_not_foundNo document with that id belongs to your application: another application's, a document the merchant wrote, a draft, or an unknown id.Use an id from GET /v1/invoices or from a webhook to your own endpoint.
400 cursor_invalidcursor is not the id of one of your documents.Start again from the first page.
400 validation_failedAn unknown query parameter, or a value outside the lists above.Check the name and value of each filter.
404 with no codeInvoices are not available on Fianto yet, or you called devnet.Call mainnet once invoices are available.

See also

Was this page helpful? Tell us

fianto.xyz

On this page