TT FF TT โ transaction type, from-account, to-account. Get the pairing wrong and a cash withdrawal reads as a purchase.
The first two digits say what the cardholder is doing. This is the pair that decides how the transaction is priced, which limits apply, and whether it counts as cash for lending purposes.
| Code | Transaction type |
|---|---|
00 | Goods and services (purchase) |
01 | Cash withdrawal |
02 | Adjustment |
09 | Purchase with cashback |
17 | Quasi-cash / fast cash |
18 | Service charge |
20 | Returns / refund |
21 | Deposit |
28 | Payment transaction โ funds pushed to the card account (Mastercard-defined) |
30 | Balance inquiry |
31 | Statement / mini-statement |
40 | Transfer |
50 | Payment |
72 | Pre-authorization |
91 | PIN change |
92 | PIN unblock |
Not every row above is universal. The core codes (00/01/09/20/30) read the same almost everywhere, but beyond that core the values are assigned by each scheme or host. 28 is a documented example: Mastercard's public Transaction Processing Rules define it as a Payment Transaction (a transfer of funds to an account) in both authorization and clearing messages โ other hosts assign the same slot differently. Outside the core, check the spec for the channel you are actually parsing.
Digits 3โ4 are the from account and digits 5โ6 are the to account. Both use the same code set. On a plain purchase both are usually 00, because there is only one account involved and the scheme infers it.
| Code | Account type |
|---|---|
00 | Default / unspecified |
10 | Savings account |
20 | Checking (current) account |
30 | Credit account |
38 | Credit card account |
40 | Universal account |
50 | Investment account |
60 | Electronic purse |
Split it into three pairs and read left to right:
| DE3 | Reads as |
|---|---|
000000 | Purchase, both accounts unspecified โ the ordinary retail sale |
011000 | Cash withdrawal from a savings account |
012000 | Cash withdrawal from a checking account |
200000 | Refund, accounts unspecified |
301000 | Balance inquiry on a savings account |
401020 | Transfer from savings to checking |
01 cash withdrawal and 17 quasi-cash usually attract a cash-advance fee and start accruing interest immediately on a credit product. Mapping a quasi-cash merchant to 00 quietly gives away that fee โ and mapping a genuine purchase to 17 generates cardholder complaints.09 purchase with cashback carries two amounts. The cashback portion lives in its own field, not in DE4. If your posting logic only reads DE4 you will credit the merchant correctly and lose track of the cash handed over the counter.000000 nearly every time; anything else is telling you the transaction is not a plain sale, and that usually means different pricing.