Building payments products with AI
Where AI helps, where a person must stay in charge, seven costly traps and a safe pattern.
Free guides / AI
Anima guide 09 · freeAI coding tools can write much of a payment product. Set the rules once and your team ships faster without leaking card data or moving money by mistake.

The first two pages are open. Add your first name and email to keep reading or to download the PDF.
AI coding tools can write much of a payment product. Set the rules once and your team ships faster without leaking card data or moving money by mistake.
Let AI write the low-risk code, so your engineers spend their time on the money.
The split by risk is on page 3.Every change leaves a review record an assessor can read, whoever wrote it.
The pipeline is on page 4.Partners and AI agents can use your payments through a door you control.
The safe door is on page 9.Leaked keys, card numbers in logs and a fee rule changed by accident.
Eight traps and fixes: page 5.Pages 3 to 9: who owns what, the pipeline, the traps, the rules and agents.
Page 10: build, buy or partner, piece by piece.
Page 11: ten yes or no questions, about two minutes. Page 12 shows where we help at your score.
The fastest teams split the work by risk. Low-risk code goes to AI with automatic checks. Anything that moves money, touches card data or decides who gets in stays with a person.
That's where most of the code is, and where a mistake is cheap and easy to catch.
A small error there can leak card data or send money to the wrong place.
General guidance from our team's experience building payment systems. Adjust the split to your own risk assessment.
Card security rules ask that custom code is built securely and reviewed before release. They don't care who typed it. A fixed pipeline makes that true for AI code too, and leaves a record an assessor can read.
Track every library the AI pulls in. Card rules ask for an inventory of custom code and its third-party parts.
Fix: block unknown packages by default.Say what the code must never do, such as log card numbers.
Fix: keep a shared list of payment rules for every prompt.Use the networks' test card numbers, never real ones copied from logs.
Fix: scan test data the same way as code.UK regulators asked firms in May 2026 to patch more quickly as AI finds flaws faster.
Fix: set a deadline for each severity.Sources: PCI DSS v4.0.1 requirements 6.2 and 6.3; PCI SSC, 20 August 2024; Bank of England, FCA and HM Treasury joint statement, 15 May 2026.
These come up again and again in AI-written payment code. Each one is a finding an assessor will write up.
Projects using one popular AI assistant leaked secrets 40% more often than average.
Fix: scan every commit and block on a hit.In one large test, 45% of AI code samples had a well-known security flaw.
Fix: run security scans on every change.AI adds helpful logging that prints the whole request, card number included.
Fix: mask card fields in one shared logger.AI suggests libraries no one checked, or that don't exist.
Fix: allow only approved packages.A new script on the checkout page must be listed and watched for changes.
Fix: no AI changes to payment pages without review.Code merged by the person who prompted it, with no second look.
Fix: require a different reviewer for payment code.An AI agent with production keys can do what any engineer can.
Fix: give agents test systems and short-lived keys only.AI rewrites a fee or limit rule while fixing something else.
Fix: test money rules with fixed expected results.Sources: Veracode GenAI Code Security Report, 30 July 2025; GitGuardian State of Secrets Sprawl 2025. Both are vendor research.
The card security standard has no special rules for AI code. The same requirements apply, and its owners published advice in October 2026 on using AI safely around card data.
The October 2026 advice asks for explicit human approval before an AI agent acts on unencrypted card data.
The same advice says AI tools shouldn't handle unprotected keys or passwords.
Since January 2025, financial firms under DORA must review source code with static and dynamic testing.
Sources: PCI DSS v4.0.1; PCI SSC, Security Considerations for AI Systems, 7 October 2026, an advisory paper; EU Regulation 2024/1774, Article 16.
Visa and Mastercard now let AI agents shop for people with special card tokens. If your product lets an agent pay, build in the limits from the first version.
Sources: Mastercard Agent Pay, 29 April 2025; Visa Intelligent Commerce, 30 April 2025; Visa Trusted Agent Protocol, 14 October 2025.
No regulator has a rule just for AI-written code. The existing rules on secure code apply in full, and AI-specific rules are arriving around them.
DORA applies. Financial firms must review and test their source code.
Advice on AI in card security assessments: AI is a tool, not an assessor.
The newer card security requirements become mandatory.
Duties for general-purpose AI model providers apply.
A protocol for merchants to recognise trusted AI agents.
New model risk guidance replaces the 2011 version for banks.
A joint statement on AI and cyber risk: patch faster.
Advice on securing AI systems around card data.
November 2026
High-risk AI rules begin, including credit scoring of people.
General information as of November 2026, not legal advice. Sources: PCI SSC; EU AI Act Service Desk; Regulation (EU) 2026/1744; Federal Reserve SR 26-2; Bank of England.
Partners and AI agents will want to check payments and issue refunds through your API or an MCP server. Build it so a mistake can't move money.
One key per partner or agent, limited to what it needs, easy to revoke.
Fix: no key both reads and pays.Open status and reports first. Add actions one at a time.
Fix: start with a read-only door.Refunds, payouts and bank detail changes wait for a named person.
Fix: an amount above which agents stop.Record which agent asked, for whom, what it saw and what ran.
Fix: logs that agents can't edit.Sources: Model Context Protocol specification, version 2026-07-28, Tools and Authorization security sections; PCI SSC, Security Considerations for AI Systems, 7 October 2026, an advisory paper.
Build what makes you different and buy the rest. Here is our usual call for each piece of a payment product.
A processor's hosted page or payment fields keep card numbers off your servers and your PCI scope small.
Start with: hosted payment fields.Your ledger is the record of who owns what. Own it, and have AI write the tests, not the rules.
Start with: double entry from day one.Fraud models learn from many merchants. Buy the engine and write your own rules on top.
Start with: your own rules on top.Identity checks need licensed data sources and liveness tools that are costly to rebuild.
Start with: a provider with audits.Take reports from your processor and bank, and build the matching that fits your books.
Start with: one ID on every payment.AI can answer payment status from read-only data. Refunds and disputes go to a person.
Start with: answers on payment status.General guidance from our team's experience building payment systems. The right split depends on your volume, licences and team.
Count your yes answers, then find your score on the next page.
Every engagement starts with a free 30-minute call. Here is what usually comes next.
Also on the call, if it applies to you.
Tokenization and hosted pages that keep card numbers off your systems and your PCI scope small.
Tie every deposit to the sales, fees and refunds inside it, every day.
Which AI decisions need a person, how to test them and the record to keep.
Launching your own cards: programme managers, processors and the network rules.
Bring your repository setup and your last security assessment. Our team has built payment systems for twenty years, and now builds them with AI coding tools.
Add your first name and work email to open the rest here. You can download the PDF too.
We use your details to open the guide. See our Privacy policy.
Thanks, . The rest of the guide is open below. The PDF is yours to keep too.
Where AI helps, where a person must stay in charge, seven costly traps and a safe pattern.
Where AI cuts the time spent on onboarding checks and alerts, where a person must still decide, and how to show a regulator it works.
We work alongside your lawyers and compliance officer. Our guides are general information, not legal advice.