If you build anything that shows a user their card transactions, you meet the descriptor problem fast. The bank does not write "Careem". It writes POS 4521 CAREEM*RIDE DXB AE.
What is in the line
A statement line is a fixed-width field written by the merchant's acquirer, not by your bank. A typical Emirates line carries a channel (POS), a terminal number, a payment processor or aggregator prefix, a truncated merchant name, a city code (DXB) and a country code (AE). Mall names, utilities and toll lines follow their own abbreviations. I wrote a longer guide here: https://descriptorapi.com/learn/reading-uae-card-statements
Why regex stops working
- Aggregator prefixes (SQ *, PAYPAL *, AMZN Mktp) hide the real merchant.
- Not every line is a purchase: transfers, refunds, fees and declines look similar.
- In the Gulf and North Africa you also see Arabic script, mada, SADAD, Fawry, InstaPay, and pay-later instalments from Tabby and Tamara.
One call
curl https://api.descriptorapi.com/v1/enrich \ -H "Authorization: Bearer $DESCRIPTORAPI_KEY" \ -H "Content-Type: application/json" \ -d '{"descriptor": "POS 4521 CAREEM*RIDE DXB AE", "country": "AE"}' The response has merchant (name, category, website, logo), location, processor, kind and a confidence from 0 to 1.
Handling the awkward cases
-
merchant: nullmeans we could not tell. These calls are free. Show the raw line. -
source: "ai"withverified: falsemeans the merchant was read from the text itself. Show these differently, for example with a "suggested" label, until verified. - Check
kindbefore charting spend. A salary or a refund is not a merchant.
Try it
Playground (decode a line in the browser): https://descriptorapi.com/playground
Docs: https://descriptorapi.com/docs
There is a free plan, so you can test with your own statements.
I built DescriptorAPI. Tell me which statement lines it gets wrong and I will fix them.
Drafted with AI help, edited and checked by me.
