Receipts

Table name: receipts

🆕 New Table

This is a newly added table exposing wallet receipt data in the Partner Data Warehouse.

Receipt data from the wallet service. Each receipt is linked to a wallet transaction via transaction_id. Contains receipt identifiers, financial totals, line item entries, and price breakdowns. No filters applied — deleted and inactive receipts are included so partners can filter as needed.

SQL: receipts

Schema

Column NameData TypeDescription
Primary ID
idINTEGERPrimary key, unique identifier for each receipt
Other IDs
identifierVARCHARUnique 36-character identifier (UUID) used by the Partner API for receipt lookups and PDF URLs
receipt_numberVARCHARHuman-readable receipt number assigned by the wallet service
transaction_idINTEGERID of the associated wallet transaction (NOT NULL — every receipt has one)
currency_idINTEGERID of the currency used in the receipt
Timestamps
created_atTIMESTAMP_NTZTimestamp when the receipt was created
updated_atTIMESTAMP_NTZTimestamp when the receipt was last updated
deleted_atTIMESTAMP_NTZTimestamp when the receipt was soft deleted, null if not deleted
Attributes
sub_totalNUMBERSubtotal amount before VAT
vatNUMBERVAT amount on the receipt
totalNUMBERTotal amount including VAT
typeVARCHARReceipt type: SIMPLE or FULL
versionINTEGERVersion number of the receipt
languageVARCHARLanguage of the receipt
entriesVARIANTJSON containing receipt line item entries (title, subtitle, amount, subAmount)
price_breakdownVARIANTJSON with price specifications, fees, and adjustments
is_activeINTEGERWhether the receipt is active (1) or inactive (0)

Inclusion Criteria

Receipts are included if their transaction_id matches a transaction belonging to the partner's teams or operators (same wallet-ownership filtering as the transactions table).

No filters are applied on deleted_at or is_active — all receipts linked to the partner's transactions are included. Partners can filter these columns as needed.

Data flow

Upstream tablesDownstream tables
transactions---

Alignment

Partner API

  • Aligns with Partner API get/receipts/by-charge/{chargeId} endpoint
  • The API endpoint returns a single receipt per completed charge, fetched via the charge's transaction
  • API response fields: id, identifier, version, total, entries, currency, pdf_url, vat, created_at
  • The PDWH table includes additional fields not in the API response: receipt_number, sub_total, price_breakdown, language, is_active, deleted_at

Joining receipts to charges

To link a receipt to a charge session, join through the transactions table:

select
    r.id as receipt_id
    , r.identifier as receipt_identifier
    , r.receipt_number
    , r.total
    , t.reference_id as charge_id
from receipts r
inner join transactions t
    on r.transaction_id = t.id
where t.reference_type = 'CHARGE'