DEV Community

Cover image for How Canada's new Real-Time Rail moves one payment, and what it teaches about backend design
RONI DAS
RONI DAS

Posted on Originally published at systemdesign.academy

How Canada's new Real-Time Rail moves one payment, and what it teaches about backend design

On 9 November 2026 Payments Canada announced that Canada's Real-Time Rail is live. Banks, credit unions and payment companies connected to it can now exchange, clear and settle payments in real time, 24 hours a day, every day of the year. The launch notice is here: https://www.payments.ca/canada-launches-real-time-rail-bringing-247-payment-infrastructure-national-economy

Most news coverage will talk about faster money. I want to talk about the engineering, because a system that moves money in real time and cannot take it back has to be designed with a lot of care. The same care applies to any backend that does something it cannot undo: charging a card, shipping an order, sending an email, deleting a record.

One payment on Canada's Real-Time Rail: you, a check, your bank, the rail, their bank, and the status coming back

A few words first

  • Exchange: the payment message travels from one bank to another.
  • Clearing: the banks work out what each one now owes the other.
  • Settlement: the money really moves between the banks' accounts. After this, it is done.
  • Irrevocable: once final, the sender cannot pull the payment back on its own.
  • ISO 20022: the shared message format every bank on the rail uses. Each message type has a short name, like pacs.008 for "send this payment".
  • Participant: a bank or payment firm connected to the rail. Only participants can send messages on it.

What actually changed

Payments Canada's own FAQ puts it in two sentences: "For years, Canada has had fast exchange via existing money movement systems. With the launch of the Real-Time Rail, Canada will have both real-time exchange and real-time clearing and settlement in a single system."

So the message was already fast. What is new is that the money between the two banks now settles payment by payment, as it happens, instead of being settled outside that real-time path. Once a payment has settled, the FAQ says the person receiving it will generally have access to the funds within 60 seconds.

And it is final. In the FAQ's words: "RTR payments are final and irrevocable, except in circumstances specified in the RTR Rules." If something went wrong, the sending bank may ask for a return, but the decision rests with the receiving bank.

The life of one payment

Here is the path, from Payments Canada's ISO 20022 message guide:

  1. You press send in your banking app.
  2. Checks run (more on these below).
  3. Your bank sends a pacs.008, the "customer credit transfer" message, to the RTR Exchange.
  4. The rail checks the message. If it passes, the rail gives it a Clearing System Reference and a time stamp. That time stamp starts a timer the rail keeps for this payment.
  5. The rail sends the pacs.008, now carrying that reference, on to the receiving bank.
  6. Status reports (pacs.002) flow back as the payment moves to final.

One detail is worth pausing on. The ISO 20022 format allows many payments in one message. The rail does not: "the RTR will only allow a single payment in each respective ISO 20022 message." The number of transactions is fixed at 1. My reading of why: one payment per message means a bad message, a rejection or a time-out touches exactly one payment, and every status report is about exactly one payment.

What the bank hears back

Every answer is a pacs.002 with one status code. The guide lists five:

The pacs.002 status codes: ACWP, ACSP, ACSC, RJCT, PDNG

Code Who sets it Meaning
ACWP receiving bank it accepts the payment
ACSP the rail only the payment is declared final, and the banks are now bound to settle it
ACSC the rail only final and settled
RJCT the rail or the receiving bank rejected, always with a reason
PDNG the rail only still in flight, and only sent as an answer to a status question

Notice the split. The receiving bank can say "I accept", but only the rail can say "this is final". One party owns the decision that cannot be undone.

Why the fraud checks come first

If a payment cannot be pulled back after it settles, there is only one place left to stop a bad one: before it moves. Canada is, in Payments Canada's words, "the first G7 country to deploy a real-time payment system with mandatory centralized fraud services for use at launch". There are four:

  • Confirmation of payee: you can see the account holder's identity before you press send. On day one this is available for consumer accounts.
  • A safety score: a real-time risk score on every payment, "before a payment is authorized".
  • A risk list: accounts already tied to confirmed fraud can be flagged.
  • A fraud reporting and intelligence platform: one view of fraud trends across the whole rail.

These run alongside each bank's own fraud controls. There is also a hard cap: at launch, one payment can carry at most $100,000.

The reply never came. Send again, or ask?

This is the part I would most like every backend engineer to read.

Your bank sent a payment. The status report never arrived. Maybe the network dropped it. Did the payment go through or not?

The tempting move is to send it again. On an irreversible system that is dangerous. If the first one went through, the person is paid twice, and getting the money back depends on the other bank agreeing to return it. The message format even has a "Possible Duplicate" marker, but the rail's guide says that if it is filled in it "will have no impact on the RTR processing".

So the rail gives banks a message whose only job is to ask: pacs.028, the payment status request. The rail answers with a pacs.002. If the payment is still moving, the answer is PDNG. And the guide plans for exactly the lost-reply case: the bank should use the rail's Clearing System Reference if it has it, and "should this message not be received", it uses the original identifiers from its own pacs.008 instead.

Send again versus ask with pacs.028

Five rules to copy into your own backend

These are my reading of the design, not Payments Canada's words:

  1. One item per message when each item can fail on its own. It keeps failures and status reports small and clear.
  2. A unique id on every request, known to both sides. Without it you cannot ask "what happened to this one?".
  3. A timer on every step in flight. Nothing should wait forever.
  4. Ask before you retry. Give callers a cheap way to check whether an action already happened, and use it after any time-out.
  5. Check before the step you cannot undo, and cap it. Validation, fraud or abuse checks and a hard limit belong in front of the irreversible step, not after it.

None of these are special to payments. They are what makes retries safe in an order service, a booking system or a job queue, too.

Sources

Where to go next

Waiting for a reply is the heart of this whole story: what the caller does while it waits, and what it does when the wait runs out. If you want to go one step further, I wrote a free lesson on exactly that on systemdesign.academy: synchronous processing and what to do when the wait runs out.

Top comments (0)