# Why your AI should never build its own payment form

> **Short answer:** a form on your own website that asks for card numbers makes you responsible for those card numbers, under the card industry's security rules (PCI DSS). Use the payment provider's own checkout page, payment link or fields instead. Then the card details go straight to the provider, never through your website, and most of that responsibility stays with them.

Ask an AI for "a checkout page" and it may happily write one: a nice form with card number, expiry date and the three digits on the back. It looks finished. It is the one part of a website you should never let it make.

## The problem with a homemade card form

Card details are the most protected data on the internet. The card networks' security standard, PCI DSS, applies to anyone who handles them. Stripe puts it plainly: "Anyone involved with the processing, transmission, or storage of card data must comply with PCI DSS." A business that handles card data directly, it says, "might be required to meet more than 300 security controls".

A form your AI wrote puts the card number on your website first. Even if it's sent on right away, it has passed through your site. So:

- **You carry the risk.** A small mistake in the form, or in any other script on the page, can leak card numbers.
- **It doesn't even work without a developer.** A website made of pages has nowhere safe to send a card number. Someone would still need to build and secure a server behind it.
- **It makes customers hesitate.** Visitors are used to typing card details into checkouts they recognise. A plain card form on an unfamiliar site makes careful people stop and leave.

## What to do instead

Let the payment provider collect the card. Stripe describes its low-risk options as ones that send payment details "directly to Stripe without it passing through your servers, reducing your PCI obligations." For a small business website, the simplest are:

- **A payment link:** a button on your page goes to the provider's own checkout.
- **A Buy button or pricing table:** a ready-made piece from the provider that opens its checkout.
- **A Shopify Buy Button:** for products with stock and shipping, with Shopify's checkout.

See [how to take payments on a website your AI built](/articles/take-payments-on-your-ai-website) for how to set each one up.

The responsibility doesn't disappear completely: Stripe calls PCI compliance "a shared responsibility". But your share becomes small, because the card number never touches your site.

## A sentence to give your AI

If you ask your AI for anything involving payments, add:

> "Never create input fields for card numbers, expiry dates or security codes. Use the payment link or embed code I give you, so customers pay on the provider's own page."

The same goes for passwords. Don't let an AI build a login form on a plain website. If you need accounts, use a service built for it.

## Sources

Checked on 8 November 2026: [Stripe's integration security guide](https://docs.stripe.com/security/guide), [Stripe Payment Links](https://docs.stripe.com/payment-links), [Stripe Buy Button](https://docs.stripe.com/payment-links/buy-button), [Shopify Buy Button](https://help.shopify.com/en/manual/online-sales-channels/buy-button).
