Skip to navigation

Migrating off the Receipt API

The Receipt API is deprecated. Here is what replaces each part of it.
View as Markdown

The Receipt API is deprecated. Its own specification says so: “This API is deprecated — please switch to Transaction POS Log API.” It remains documented here for teams still running against it.

What it did

The Receipt API served two directions at once:

  • Writing in. Posting receipts from external systems like webshops, so customers could return goods in a physical store, giving FiftyTwo one point of entry for receipts.
  • Reading out. Retrieving receipts produced by FiftyTwo (or posted through the method above), and end-of-day reports.

That split is exactly why it was replaced: the two directions have different requirements, and they are now two APIs.

The mapping

Post an external receipt — now Register Sale

- POST /receiptmanagement/v1
+ POST /v1/sale

Read receipts for a chain — now Transaction POS Log

- GET /receipts/v1/chain/{chainNo}/receiptid/{lastReceiptId}
+ GET /v1/chain/{chainNumber}/transaction-pos-log/{lastId}

Read receipts for a single store — now Transaction POS Log

- GET /receipts/v1/chain/{chainNo}/store/{storeNo}/receiptid/{lastReceiptId}
+ GET /v1/chain/{chainNumber}/store/{storeNumber}/transaction-pos-log/{lastId}

End-of-day report — now Transaction POS Log

- GET /endofday/v1/chain/{chainNo}/store/{storeNo}/session/{sessionNo}
+ GET /v1/chain/{chainNumber}/store/{storeNumber}/session/{sessionNumber}/end-of-day

Why the read side is worth migrating

The Receipt API is poll-only. TPLA pushes events over Apache Pulsar, so you stop long-polling, react in real time, and get ordered replay after an outage. The REST cursor endpoints remain for backfill.

Migration order

1

Move reads to TPLA REST first

The cursor endpoints map almost one-to-one. This is a low-risk change you can verify by comparing output against the Receipt API for the same cursor.

2

Then subscribe to events

Once your parser handles the TPLA payload, subscribe to Pulsar. The payload is identical, so nothing downstream changes.

3

Move writes to Register Sale

Note the different auth: Register Sale uses an Auth0-issued Bearer JWT rather than a token from auth.fiftytwo.com. Track correlation IDs, because Register Sale is not idempotent for you.

4

Reconcile, then decommission

Run both for a period and compare counts before switching off the old path.