Signing an Invoice
The core endpoint. Signs a sale on the Secure Element and returns the fiscal result (verification URL, QR, journal, signature). Requires a PIN previously verified via POST /api/v3/pin.
POST /api/v3/invoices
Content-Type: application/json
RequestId: 4b1e...unique-per-sale
Request fields
| Field | Type | Required | Notes |
|---|---|---|---|
invoiceType | enum | Yes | Normal, ProForma, Copy, Training, Advance. |
transactionType | enum | Yes | Sale or Refund. |
payment | array | Yes | One or more { amount, paymentType }. See payment types below. |
items | array | Yes | One or more line items. See item fields below. |
dateAndTimeOfIssue | string | No | ISO date/time; defaults to the SDC clock if omitted. |
cashier | string | No | ≤ 50 chars. |
buyerId | string | No | ≤ 20 chars (buyer TIN / ID). |
buyerCostCenterId | string | No | ≤ 50 chars. |
invoiceNumber | string | No | ≤ 60 chars (your POS's own number/ordinal). |
referentDocumentNumber | string | Conditional | ≤ 50 chars. The signed number of the original invoice — required for Copy and Refund, and whenever referentDocumentDT is present. |
referentDocumentDT | string | No | Date/time of the referent document; if present, referentDocumentNumber becomes required. |
options | object | No | Key/value flags, e.g. { "omitTextualRepresentation": 1 } to skip building the journal text. |
Item fields
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | Yes | 1–2048 chars. |
quantity | number | Yes | ≥ 0.001. |
unitPrice | number | Yes | Price per unit. |
labels | array | Yes | Tax label(s) for the item, e.g. ["A"]. Must be labels present in the active tax group (unknown labels are rejected). |
totalAmount | number | Yes | Line total (quantity × unitPrice). |
gtin | string | No | 8–14 chars if supplied. |
Payment types
Other, Cash, Card, Check, WireTransfer, Voucher, MobileMoney.
Example request
{
"invoiceType": "Normal",
"transactionType": "Sale",
"cashier": "Jack",
"payment": [
{ "amount": 23.00, "paymentType": "Cash" }
],
"items": [
{
"name": "Coffee",
"quantity": 2,
"unitPrice": 5.00,
"labels": ["A"],
"totalAmount": 10.00
},
{
"name": "Sandwich",
"quantity": 1,
"unitPrice": 13.00,
"labels": ["A"],
"totalAmount": 13.00
}
]
}
Response
On success the SDC returns the fiscal result. Field names are camelCase (see Swagger for the exact schema of your build):
| Field | Meaning |
|---|---|
invoiceNumber | The signed fiscal invoice number. |
invoiceCounter / invoiceCounterExtension | Per-type and combined counters. |
totalCounter / transactionTypeCounter | Running counters from the SE. |
verificationUrl | The URL a customer uses to verify the invoice with FRCS. |
verificationQRCode | The QR code (base64) encoding the verification URL — print this on the receipt. |
journal | The formatted textual receipt (40-column). Omitted if options.omitTextualRepresentation is set. |
signature / encryptedInternalData | The SE signature and encrypted internal data. |
signedBy / requestedBy | SE / requesting-signer identifiers. |
taxItems | Per-category tax lines: label, categoryName, rate, amount. |
totalAmount | Invoice total. |
taxGroupRevision | Revision of the tax group applied. |
businessName, tin, locationName, address, district, mrc | Seller details for the receipt header. |
sdcDateTime | The signing date/time. |
200 OK
{
"invoiceNumber": "EKLBHT3Y-EKLBHT3Y-31",
"verificationUrl": "https://sandbox.vms.frcs.org.fj/v/?vl=...",
"verificationQRCode": "iVBORw0KGgoAAAANSUhEUgAA...",
"journal": "============ FISCAL INVOICE ============ ...",
"totalAmount": 23.00,
"taxItems": [
{ "label": "A", "categoryName": "VAT", "rate": 15.0, "amount": 3.00 }
],
"sdcDateTime": "2026-08-13T09:42:00"
}
Refunds & copies
For a Refund (or a Copy), set transactionType/invoiceType accordingly and reference the original signed invoice with referentDocumentNumber (and optionally referentDocumentDT). Taxes for a copy/refund are calculated using the tax group in force at the referent document's date.
Validate without signing
POST /api/v3/invoices/validate runs the same request validation and tax rules without touching the card — useful to check a basket before committing. It returns { "valid": true } or a 400 with field errors (see "Errors & Validation").