The 4 states
Recommended implementation
The golden rules
- Always handle
cleared— non-negotiable for accounting authorized+deleted+cleared= best UX (users see purchases instantly, deletions handled)authorizedalone = you’ll miss transactions that clear without prior auth (rare but possible)- Use
idas primary key — sameidacross all states for one transaction card_issuer_referencediffers per state — don’t use it as your primary key; when merging with another feed, compare cleared-to-cleared only → Current card issuer integration
Current card issuer integration
If your client already receives transactions from the same card program through another integration, you can run both feeds at once. OpenCard is often added while the old feed is still active — you do not need to wait for it to be switched off.- Start the OpenCard feed per card holder on
card_holder.identified(includes a retroactive batch). - Upsert on transaction
idfor OpenCard events. - On
card.transaction.cleared, deduplicate against your other store withcard_issuer_reference— cleared matches cleared only; auth and cleared references may differ per issuer.
Upsert logic detail
receiptable flag
true, a digital receipt may arrive later via receipt.fetched. If false, don’t wait for one.
Subscribe to receipt_fetched, transaction_true_vat, and transaction_line_items separately — they come as independent events after the transaction.
Card types
Card funding
Present on all
card.transaction.* states — same value for a given card across authorized / cleared / deleted / invoiced.
Verify with your client which card types to include. Common setup: corporate only.
VAT caveat
vat_rate and vat_amount on the transaction payload come from the card network — often wrong for restaurants, hotels, etc.
For correct VAT, subscribe to transaction.true.vat — that comes from the actual merchant receipt.
