Credit Card Processing Example
Problem description
A credit card account is opened on a specific date with
a 16-digit account number and a credit limit. The first digit of the
account number must match the type of the card: "4" for Visa, "5" for
MasterCard, and "6" for Discover. Each credit card account belongs to
a party. A party may be a corporation, a person, or a joint account
between two people. A party has a billing address and telephone
number. Several plastic cards may be issued for one account, but some
corporate accounts do not have cards. Each account has a number of
current transactions, with each transaction consisting of a date,
dollar amount, and merchant.
Two steps are needed when a card is used for a
purchase:
- An authorization request is sent to the cardholder's bank to
verify that the account number is valid and in good standing, to check
that the card has not expired, to check that the account has sufficient
available credit, and to check for fraud. Authorization requests may
optionally contain parts of the cardholder's name, address, and
telephone number; if any part of this information does not match the
cardholder's record, the authorization will be declined. Once
payment has been authorized, the merchant is given an authorization
code, and the authorized amount of money becomes reserved and cannot
be used for other purchases. The cardholder is not actually charged
yet.
- Up to three days later, the merchant may settle a batch of
several authorized transactions that are identified by authorization
codes. Settlement causes money to be transfered into the merchant's
bank and each transaction to be added to the appropriate credit card
account's current transactions. If the transaction is not settled in
three days, it will be canceled. Within 60 days of a transaction, the
cardholder may "reverse" the transaction and money will be transfered
from the merchant back to the cardholder's account. After 60 days, a
transaction is finalized and will never be changed.
A larger amount of money may be authorized than is
actually settled.
On the final day of that account's billing cycle,
interest is computed based on the account's previous balance and
interest rate. If the balance ever goes over the credit limit, if
payment is more than 60 days overdue, or if a card for that account
has been reported stolen, then it is no longer in good standing.
"Recent" accounts that have had good standing for 30 days or less have
an additional constraint that only half their credit limit may be
used. Accounts may also be canceled by the cardholder's bank at any
time for any reason.
Use case 1: Out-of-town purchase.
- A customer buying gas at a pay-at-the-pump system dips in his
or her card.
- Since the gas station ZIP code does not match the customer's
billing address ZIP, the terminal asks the customer for a ZIP code
- The customer enters a ZIP code
- The user pumps less than $100 of gas and then replaces the nozzle
- The system prints the receipt showing the exact amount of the transaction.
- Note: At first, the payment server will try to use the ZIP
code of the gas station to authorize payment. Since the customer in
this use case is an out-of-town visitor, that authorization will fail
and the terminal ask the customer to enter their billing address ZIP
code. This rule makes it easy for most users but also helps limit
money the gas station would lose due to stolen cards.
- Note: The terminal just asks the merchants payment processing
server for simple yes-or-no authorization without asking for any
specific amount. The payment server always requests that the
merchant bank authorize a payment of $100.
example use case templatesample test plan templateProject plan template