# Add payments the safe way

> Checkout looks done when the success page shows, and that page proves nothing.

Web page: https://buildladder.com/resources/prompts/add-checkout

What you get: Prices set on the server, and access granted only when the payment provider confirms it.

Paste it into: Your AI tool, in your project

## Prompt to copy

```text
Add payments to this project using [Stripe or another provider], and build it so it can't be tricked.

Rules: prices and products are defined on the server or in the provider's dashboard, never taken from the browser. Access is granted only when the provider's webhook says the payment succeeded, not when the user reaches the success page. Keys stay in environment variables, with test keys everywhere except production.

Before coding, tell me the flow in five steps and what gets stored in my database. After coding, test it in test mode: a successful card, a declined card, and closing the tab mid-payment. Show me what the database holds after each.
```
