Payments Academy
Use-case document PAYMENT OPERATIONS STARTED LIVE 01 Use-case document - starts with the basic identification fields ACTIVE 02 Flow preconditions - Without clear preconditions QUEUED 03 Main flow - sometimes called the happy path QUEUED 04 Alternate flows - describe the valid variations of the main flow QUEUED 05 Here - using the Subscribe n Save renewal. QUEUED 06 Example fits on two pages - gives developers and testers everything they QUEUED A use-case document starts with the basic identification fields, and these matter more than people think. Step 1 of 6 Use-case document STARTED Use-case document starts with the basic identification fields ACTIVE Flow preconditions Without clear preconditions QUEUED Main flow sometimes called the happy path QUEUED Alternate flows describe the valid variations of the main flow QUEUED Here using the Subscribe n Save renewal. QUEUED Example fits on two pages gives developers and testers everything they QUEUED A use-case document starts with the basic identification fields, and these matter more than people think.
Flow preconditions PAYMENT OPERATIONS IN PROGRESS LIVE 01 Use-case document - starts with the basic identification fields DONE 02 Flow preconditions - Without clear preconditions ACTIVE 03 Main flow - sometimes called the happy path QUEUED 04 Alternate flows - describe the valid variations of the main flow QUEUED 05 Here - using the Subscribe n Save renewal. QUEUED 06 Example fits on two pages - gives developers and testers everything they QUEUED Without clear preconditions, developers cannot tell when the flow should run at all. Step 2 of 6 Flow preconditions IN PROGRESS Use-case document starts with the basic identification fields DONE Flow preconditions Without clear preconditions ACTIVE Main flow sometimes called the happy path QUEUED Alternate flows describe the valid variations of the main flow QUEUED Here using the Subscribe n Save renewal. QUEUED Example fits on two pages gives developers and testers everything they QUEUED Without clear preconditions, developers cannot tell when the flow should run at all.
Main flow PAYMENT OPERATIONS IN PROGRESS LIVE 01 Use-case document - starts with the basic identification fields DONE 02 Flow preconditions - Without clear preconditions DONE 03 Main flow - sometimes called the happy path ACTIVE 04 Alternate flows - describe the valid variations of the main flow QUEUED 05 Here - using the Subscribe n Save renewal. QUEUED 06 Example fits on two pages - gives developers and testers everything they QUEUED The main flow, sometimes called the happy path, describes the steps when everything works. Step 3 of 6 Main flow IN PROGRESS Use-case document starts with the basic identification fields DONE Flow preconditions Without clear preconditions DONE Main flow sometimes called the happy path ACTIVE Alternate flows describe the valid variations of the main flow QUEUED Here using the Subscribe n Save renewal. QUEUED Example fits on two pages gives developers and testers everything they QUEUED The main flow, sometimes called the happy path, describes the steps when everything works.
Alternate flows PAYMENT OPERATIONS IN PROGRESS LIVE 01 Use-case document - starts with the basic identification fields DONE 02 Flow preconditions - Without clear preconditions DONE 03 Main flow - sometimes called the happy path DONE 04 Alternate flows - describe the valid variations of the main flow ACTIVE 05 Here - using the Subscribe n Save renewal. QUEUED 06 Example fits on two pages - gives developers and testers everything they QUEUED Alternate flows describe the valid variations of the main flow, and exceptions describe what happens when things go wrong. Step 4 of 6 Alternate flows IN PROGRESS Use-case document starts with the basic identification fields DONE Flow preconditions Without clear preconditions DONE Main flow sometimes called the happy path DONE Alternate flows describe the valid variations of the main flow ACTIVE Here using the Subscribe n Save renewal. QUEUED Example fits on two pages gives developers and testers everything they QUEUED Alternate flows describe the valid variations of the main flow, and exceptions describe what happens when things go wrong.
Here: worked example in brief PAYMENT OPERATIONS IN PROGRESS LIVE 01 Use-case document - starts with the basic identification fields DONE 02 Flow preconditions - Without clear preconditions DONE 03 Main flow - sometimes called the happy path DONE 04 Alternate flows - describe the valid variations of the main flow DONE 05 Here - using the Subscribe n Save renewal. ACTIVE 06 Example fits on two pages - gives developers and testers everything they QUEUED Here is a worked example in brief, using the Subscribe n Save renewal. Step 5 of 6 Here: worked example in brief IN PROGRESS Use-case document starts with the basic identification fields DONE Flow preconditions Without clear preconditions DONE Main flow sometimes called the happy path DONE Alternate flows describe the valid variations of the main flow DONE Here using the Subscribe n Save renewal. ACTIVE Example fits on two pages gives developers and testers everything they QUEUED Here is a worked example in brief, using the Subscribe n Save renewal.
Example fits on two pages PAYMENT OPERATIONS COMPLETE LIVE 01 Use-case document - starts with the basic identification fields DONE 02 Flow preconditions - Without clear preconditions DONE 03 Main flow - sometimes called the happy path DONE 04 Alternate flows - describe the valid variations of the main flow DONE 05 Here - using the Subscribe n Save renewal. DONE 06 Example fits on two pages - gives developers and testers everything they ACTIVE This example fits on two pages, and it gives developers and testers everything they need. Step 6 of 6 Example fits on two pages COMPLETE Use-case document starts with the basic identification fields DONE Flow preconditions Without clear preconditions DONE Main flow sometimes called the happy path DONE Alternate flows describe the valid variations of the main flow DONE Here using the Subscribe n Save renewal. DONE Example fits on two pages gives developers and testers everything they ACTIVE This example fits on two pages, and it gives developers and testers everything they need.

Key points of this lesson, in order.

0:00 / 3:23 Step 1 of 6

Writing a Use-Case Document for System-Triggered Payments

Recurring Payments and 3RI, Lesson 4 of 7, Narration 3:23, D08 Cards and alternative payments

AuthorisationExceptionGateway

What you will learn

Your objective. By the end of this lesson, you will be able to explain writing a use-case document for system-triggered payments. A use-case document starts with the basic identification fields, and these matter more than people think.

Why it matters. A business analyst writes these as a numbered list so that testers can verify each one, and so that developers can code the checks in the right order.

Chapter objective: Learner designs recurring payments, including mandates, merchant-initiated transactions, and 3RI flows, and explains authentication, consent, and failure handling for repeat charges. Learner applies this skill in realistic banking scenarios, with clear examples and correct terminology throughout.

Key learning points

  • Use-case document
  • Flow preconditions
  • Main flow
  • Alternate flows
  • Here: worked example in brief
  • Example fits on two pages

Key terms

Authorisation: Approval by the issuer for a card transaction to proceed, confirming the card is valid and funds or credit are available.

Exception: A payment that cannot be processed normally and needs manual handling, investigation or repair. Exceptions arise from missing data, failed screening, account errors or system faults.

Gateway: A service that connects a merchant website or app to payment networks and acquirers. It encrypts card data, routes authorisation requests, and returns the result to the merchant.

Payment flow diagram showing Writing a Use-Case Document for System-Triggered Payments.

Practise this lesson

Exercise

Trace the card payment in this lesson through authorisation, clearing and settlement.

Use the four-party model and the stage timings in this lesson.

  1. What to do. State what happens at each stage, who pays whom, and when the merchant is actually credited.

Correct result. Authorisation holds the funds and returns a response code. Clearing sends the transaction in a batch file. Settlement moves the net amount between banks, and the acquirer credits the merchant after deducting interchange, scheme fees and its margin.

Why. A card payment is not one event. The customer sees it on Monday, the merchant gets it on Wednesday, and the difference is the clearing and settlement cycle.

Check your understanding

Practice question

Which of the following best describes writing a use-case document for system-triggered payments?

Takeaway and next step

What to remember

This example fits on two pages, and it gives developers and testers everything they need.

Follow a payment through every stage, from instruction to beneficiary credit, and note where it can stop.

Open the Payment Lifecycle Simulator →

Builds on "Subscribe n Save: The myCommerce Project Scenario".

Transcript and full text

Show transcript

A use-case document starts with the basic identification fields, and these matter more than people think. The document needs a unique identifier such as UC-014, a clear name such as Process Subscription Renewal Payment, the actor or actors involved, and the trigger that starts the flow. For a system-triggered payment, the primary actor is often the billing system itself, with the customer and the payment gateway as secondary actors. The document also states the preconditions, which describe what must be true before the flow starts, and the postconditions, which describe what must be true when it ends. Without clear preconditions, developers cannot tell when the flow should run at all. The preconditions for a subscription renewal payment are specific and testable. The subscription must be in active status, the next billing date must be today, the customer must have a valid stored payment credential, and the mandate must not be cancelled or suspended. The system must also have a calculated order amount, including the subscription discount and any delivery charges. If any precondition fails, the flow should not start, and the system should log the reason. A business analyst writes these as a numbered list so that testers can verify each one, and so that developers can code the checks in the right order. The main flow, sometimes called the happy path, describes the steps when everything works. First, the billing engine selects all subscriptions due for renewal. Second, it calculates the amount for each subscription. Third, it sends a 3RI authentication request to the gateway using the stored credential. Fourth, it submits the authorisation request with the authentication value. Fifth, it receives an approval, captures the payment, and generates the order. Sixth, it sends a confirmation message to the customer and updates the next billing date. Each step names the system that performs it, the data it needs, and the result it produces, so that there is no ambiguity about responsibility. Alternate flows describe the valid variations of the main flow, and exceptions describe what happens when things go wrong. An alternate flow covers a partial fulfilment, where one product is out of stock and the order proceeds with the rest. Another alternate flow covers a price change, where the system charges the new price and tells the customer. Exceptions include a declined authorisation, a gateway timeout, and an expired card. For each exception, the document states the system response, the customer notification, and the retry rule. A use case without alternate flows and exceptions is only a description of the easy day, and the easy day is not what breaks in production. Here is a worked example in brief, using the Subscribe n Save renewal. The use case is UC-014, Process Subscription Renewal Payment. The actor is the billing engine, and the trigger is the scheduled job running at 2 in the morning. The preconditions are an active subscription, a billing date of today, and a valid token. The main flow runs through authentication, authorisation, capture, order creation, and confirmation. The first exception is a declined authorisation, which triggers a retry after 24 hours and a message to the customer. The second exception is an expired card, which suspends the subscription and asks the customer to update the card. This example fits on two pages, and it gives developers and testers everything they need.

A use-case document starts with the basic identification fields, and these matter more than people think. The document needs a unique identifier such as UC-014, a clear name such as Process Subscription Renewal Payment, the actor or actors involved, and the trigger that starts the flow. For a system-triggered payment, the primary actor is often the billing system itself, with the customer and the payment gateway as secondary actors. The document also states the preconditions, which describe what must be true before the flow starts, and the postconditions, which describe what must be true when it ends. Without clear preconditions, developers cannot tell when the flow should run at all.

The preconditions for a subscription renewal payment are specific and testable. The subscription must be in active status, the next billing date must be today, the customer must have a valid stored payment credential, and the mandate must not be cancelled or suspended. The system must also have a calculated order amount, including the subscription discount and any delivery charges. If any precondition fails, the flow should not start, and the system should log the reason. A business analyst writes these as a numbered list so that testers can verify each one, and so that developers can code the checks in the right order.

The main flow, sometimes called the happy path, describes the steps when everything works. First, the billing engine selects all subscriptions due for renewal. Second, it calculates the amount for each subscription. Third, it sends a 3RI authentication request to the gateway using the stored credential. Fourth, it submits the authorisation request with the authentication value. Fifth, it receives an approval, captures the payment, and generates the order. Sixth, it sends a confirmation message to the customer and updates the next billing date. Each step names the system that performs it, the data it needs, and the result it produces, so that there is no ambiguity about responsibility.

Alternate flows describe the valid variations of the main flow, and exceptions describe what happens when things go wrong. An alternate flow covers a partial fulfilment, where one product is out of stock and the order proceeds with the rest. Another alternate flow covers a price change, where the system charges the new price and tells the customer. Exceptions include a declined authorisation, a gateway timeout, and an expired card. For each exception, the document states the system response, the customer notification, and the retry rule. A use case without alternate flows and exceptions is only a description of the easy day, and the easy day is not what breaks in production.

Here is a worked example in brief, using the Subscribe n Save renewal. The use case is UC-014, Process Subscription Renewal Payment. The actor is the billing engine, and the trigger is the scheduled job running at 2 in the morning. The preconditions are an active subscription, a billing date of today, and a valid token. The main flow runs through authentication, authorisation, capture, order creation, and confirmation. The first exception is a declined authorisation, which triggers a retry after 24 hours and a message to the customer. The second exception is an expired card, which suspends the subscription and asks the customer to update the card. This example fits on two pages, and it gives developers and testers everything they need.

Full lesson text (all scenes)

Completing a lesson updates your progress dashboard on the homepage.

Scene timestamps are estimated by allocating the narration text proportionally across the real audio length. The audio playback position is the source of truth: pause freezes the visual, seeking restores the correct scene, replay restarts the scene animation.