Skip to navigation

Send E-Invoice for Singapore

View as Markdown

Generate and send a Singapore e-invoice from ERP invoice JSON. This is the single entry point for AR/AP flows 1A, 2A, 2B, 3A and 3B — you POST the invoice JSON, and Staple maps it to PINT-SG UBL, runs it through the document-creation pipeline, and (depending on the flow) sends it over the Peppol network and/or submits the tax data to IRAS.

Send is asynchronous: a requestId is returned immediately. Track delivery/tax status by polling GET /v2/supernova/models/document/{requestId} (peppolSendStatus, irasTaxSubmissionStatus).

Flow selection

The exact flow is resolved from the destination query parameter plus Transaction Type and Addon in the payload:

destinationTransaction TypeAddonFlowSends PeppolSubmits IRAS
peppol_irasSalessg-standard1A✅✅
irasSalessg-standard2A—✅
irasSalessg-aggregated2B—✅
irasPurchasessg-standard3A—✅
irasPurchasessg-aggregated3B—✅

Document Type

Document Type is Invoice (default when omitted) or Credit Note. A credit note additionally requires a Note and exactly one Document Reference (Number + Date) pointing at the original invoice. Credit notes are not supported on the sg-aggregated addon (Flows 2B and 3B).

Company & party rules

  • For Sales (AR) the Seller must be a registered Staple e-invoice company owned by your organisation; for Purchases (AP) it is the Buyer.
  • Seller and Buyer cannot be the same Peppol participant.
  • For aggregated flows the counterparty is a reserved literal — POS/STI (Flow 2B) or PCP (Flow 3B).

Use-case catalogue

Every combination the endpoint accepts, with the sample payload that exercises it:

ScenariodestinationTxnAddonDoc TypeFlow
Peppol standard invoicepeppol_irasSalessg-standardInvoice1A
Peppol multi-tax invoicepeppol_irasSalessg-standardInvoice1A
Peppol credit notepeppol_irasSalessg-standardCredit Note1A
IRAS standard invoiceirasSalessg-standardInvoice2A
IRAS foreign-currency invoiceirasSalessg-standardInvoice2A
IRAS zero-rated salesirasSalessg-standardInvoice2A
IRAS sales credit noteirasSalessg-standardCredit Note2A
Aggregated POS (single tax)irasSalessg-aggregatedInvoice2B
Aggregated POS (multi tax)irasSalessg-aggregatedInvoice2B
Aggregated STI (simplified)irasSalessg-aggregatedInvoice2B
Purchase standard invoiceirasPurchasessg-standardInvoice3A
Purchase residual input taxirasPurchasessg-standardInvoice3A
Purchase credit noteirasPurchasessg-standardCredit Note3A
Aggregated PCP (single tax)irasPurchasessg-aggregatedInvoice3B
Aggregated PCP (multi tax)irasPurchasessg-aggregatedInvoice3B
Aggregated PCP (residual)irasPurchasessg-aggregatedInvoice3B

Example naming ↔ flow mapping

The request examples use the sg-test-pack naming (1A-01, 2B-03, …). Each prefix maps to the flow convention as follows:

Example prefixScenario groupFlow
1A-##-peppol-*AR — Peppol + IRAS sendFlow 1A (destination=peppol_iras)
1A-IRAS-##-*AR — IRAS-only, standardFlow 2A (AR · iras · sg-standard)
2A-##-sales-*AR — sales, IRAS-only, standardFlow 2A (AR · iras · sg-standard)
2B-##-*AR — aggregated (POS / STI)Flow 2B (AR · iras · sg-aggregated)
3A-##-purchase-*AP — purchases, standardFlow 3A (AP · iras · sg-standard)
3B-##-pcp-*AP — aggregated (PCP)Flow 3B (AP · iras · sg-aggregated)

Authentication

x-api-keystring
API key issued by Staple.
AuthorizationBearer
JWT obtained from the login endpoint.

Path parameters

qidstringRequired
Target queue ID the generated document lands in.

Query parameters

countryenumRequired
Country selector for the mapping. Currently SG only.
Allowed values:
destinationenumRequired

Send target — combined with Transaction Type + Addon to resolve the flow (see description).

Allowed values:

Request

This endpoint expects any.

Response

Request accepted (asynchronous — poll status via GET /v2/supernova/models/document/{requestId}).