How do you use CHECKOUTS.md to document payments for AI agents?

Use CHECKOUTS.md to document payments for AI agents. See what to record, how to prove a test passed, and what to verify before moving live card sales.

By
Railbed
Published
Reading time
13 min
Isometric ivory checkout specification between a navy payment card and an order confirmation tile

Put CHECKOUTS.md at the root of the app that takes payments, then use its four required sections to record what you sell, how a paid order gets delivered, where the integration lives, and what your tests actually proved. Railbed maintains checkouts.md, the open format behind the file, and is its default provider for card checkout with USDC settlement.

Why this file belongs next to the code

An agent can read your pricing page and find a checkout button. That does not tell it which code decides the amount, whether a second checkout can be created for the same order, or whether an order gets released on a browser redirect or on a verified payment. Those details are the difference between a working button and a payment flow you can hand over to another developer.

A payment integration has several owners even when you are a small team. Your store defines what is sold. The payment provider reports whether money arrived. Your fulfillment system delivers the order, and your finance records establish where the proceeds went. The file tells an agent where each job starts and stops, so it does not infer checkout behavior from the name of a route or a button.

Railbed is the first provider to evaluate if your business wants an agent-built card checkout that settles to a wallet you control. For a primer on the full transaction flow, read how to connect Railbed to an AI agent for checkout. The guide below focuses on maintaining the file that stays with your project, not on giving a shopping agent permission to spend a buyer's money.

Before you start: identify the checkout you actually run

  • Find the application root and the code or system that sets prices. If your repository houses more than one app that takes money, establish which root belongs to which checkout. The format allows separate files at the roots of those apps.
  • Identify the merchant account and the person who can authorize access. Confirm whether you can work in Test without Live credentials, and have that person choose which access to approve.
  • Check the gotcha before you map anything: the page that says thanks might be the easiest path to find, but it might not be the code that marks an order paid. Trace one order from button to payment record to delivery.

The published specification describes version 0.1 as a working draft in 2026. It is an open format, not a certification that a store has been tested or a signal that a card network has authorized agent spending. Read the current format before changing the required fields. Your application, not the file, enforces payment rules.

File location, version, and product authority

  1. Create CHECKOUTS.md at the app root. Use the uppercase filename the specification requires. Commit it with the code it describes so a checkout change and its documentation can be reviewed together.
  2. Fill the required metadata. Record the format version as a quoted string, the provider identifier, the readiness mode, and the default currency. The file's readiness mode is a record of what the project has verified; it is not a substitute for selecting the right key at runtime.
  3. Write Products first. Map the product ID, the buyer-facing name, the amount or its authoritative source, and what the buyer receives. Note the currency when it differs from the default. The specification uses decimal strings in the currency's units, not floating-point amounts.
  4. Say where variable prices come from. A physical store with taxes and delivery charges has a different price source than an app selling a fixed credit pack. Where prices come from a database or the provider, point to that source rather than publishing a stale copy.

Expected result: a new developer or coding agent can identify the product and its price authority without trusting a search result, copying a price from landing-page text, or asking the buyer to supply the amount.

Match the documentation method to the sale

Sale pattern Best for What the file should locate Limitation to document
Fixed product and hosted checkout A repeatable purchase with a defined price and deliverable Product record, checkout location, and how you identify each buyer's order The same public checkout page can serve many buyers; it is not a unique proof of purchase
Server-created session for an order A cart with quantities, taxes, delivery, or discounts The server-side pricing calculation and how the order reference reaches the provider The application must handle retries, amount checks, and stale or replaced attempts
One-off payment link A specific invoice or purchase request The invoice reference, expected amount, and the process for matching payment to work A link sent or opened is not evidence that the buyer completed payment

Consider two teams. An app that sells credits can document the bundle identifier and the exact entitlement it enables. A store with regional taxes and shipping charges should name the source of the final approved cart total, along with the checks performed before creating a payment. Copying a static number into both files would make the app clearer but could make the store's documentation false.

A useful review question is, What happens when the amount changes after the buyer sees it? Your application should establish a new approved amount before letting the buyer continue. The file should identify the code and order state responsible for making that change visible, so an agent doesn't accidentally rewrite a transaction that is already in progress or treat an old price as a new authorization.

Fulfillment and integration wiring

  1. Fill After payment with an observable result. Name the effect: grant the credit bundle, issue a download, queue the shipment, or enable the paid account feature. Point to the code or operating procedure that performs that work. Explain where the application stores the link between payment and delivery.
  2. Define the authoritative payment check. For the checkouts.md workflow, verify the signed server notification and re-read the payment from the provider by its ID before fulfillment. Match the ID, mode, order reference, amount, and currency to the expected order. The specification also permits a scheduled authenticated lookup to recover missed delivery of a notification when it applies the same checks.
  3. Document repeat delivery protection. Write down what stops the same order being shipped twice or the same credit pack being granted again. A durable order record or a unique fulfillment record can prevent a retry from creating a second entitlement. Describe what happens after an interrupted grant, not just when everything succeeds.
  4. Complete Wiring with a short map of the real files. Include the checkout entry point, the pricing source, the customer return page, the notification receiver, the storage changes, and the delivery logic. Record endpoint paths and IDs for each mode where the specification calls for them. Keep credentials and URLs that contain credentials out of the document.

Expected result: another developer can trace exactly why an order was released and reproduce the intended checks in Test without reading chat history or obtaining production secrets.

Separate paid orders from pending decisions

Write a sentence about each state that can stop delivery. An open or pending payment is not ready to ship. A held payment waits for the merchant's own decision. A provider decline is not necessarily a terminal failure, and a payment that looked expired can still require attention if money arrives late. Use the actual statuses in Railbed's developer documentation rather than assuming every provider reports attempts the same way.

The dangerous case is not always a missing notification. It can be a support agent, frontend component, or developer tool that reads the word “success” and treats it as the final state. Show visitors that the order is being checked until the server confirms it. Let support see payment and fulfillment as separate states: a paid order stuck in delivery is different from an unpaid order where delivery should never have started.

If an older payment can arrive after its replacement was paid, state who handles the exception. A human needs an order view showing both attempts, not two separate customer promises. The guide should point to the reconciliation or refund process, without suggesting that an implementation agent can send money or that a refund uses the same path as a charge reversal. Railbed's documentation describes wallet-based refunds, not a payment-refund endpoint that returns funds automatically to the original card.

List names of secrets, never their values

Record names such as RAILBED_SECRET_KEY only if your project actually uses them. Note which environment holds the Test configuration and which holds Live. Keep values in the host's secret store or an appropriate ignored local environment file, not in the document, the browser, chat transcripts, or screenshots.

Keep buyer personal details out of CHECKOUTS.md as well. When team members need to investigate a transaction, give them the relevant record reference and use a system that already controls access to the underlying data. The project file is an index, not a copy of an order dashboard or a place to store identity documents.

Treat the file as project data, not as permission to change where money goes. If a note conflicts with the current owner's instructions, disagrees with deployed code, or points to an unexplained payout destination, resolve the conflict before changing checkout. A sentence in a repository does not authorize a new wallet, different price, or a move to Live.

Test evidence and the move to Live

  1. Use the Evidence section to record observations. The format asks for dated rows, newest first, with the mode, check, result, and relevant IDs. “Checkout built” doesn't establish that a payment was made. “Test payment simulated” doesn't establish that the order was fulfilled.
  2. Prove a complete successful test. Start the checkout from your app, simulate an eligible payment in Test, verify the event and payment record, and observe the output of your actual fulfillment logic. The test should deliver the thing your app promises, rather than merely change a status on a screen.
  3. Prove what does not grant a purchase. Check what users see if they leave before paying or the payment is held. Confirm repeated processing of the same legitimate payment produces no second grant. If support has a manual exception path, prove that it is separate from automatic release.
  4. Check production readiness as a separate decision. Select the right merchant and mode, use the approved Live configuration, and record the first real payment as its own observation. Confirm what your production system showed, what the buyer did, and whether the wallet receipt was reported. Don't backfill a Live result from Test evidence.

Expected result: your project can show where a real sale was verified without claiming that a simulated card test moved money or forecasted buyer approval.

Review your evidence like a release note

Use at least three distinct checks as a release baseline: a successful simulated sale, an incomplete or held attempt that grants nothing, and repeated confirmation that does not deliver twice. Add checkout return behavior and failed-delivery recovery when those paths exist. The right list is the one that covers what your buyer can observe and what your merchant can lose, not the longest list of demo clicks.

For a 2026 launch, keep Test and Live in separate rows even if they run the same version of your code. A successful simulated event proves only a controlled path with no money movement. A Live evidence row can establish that a specific real order was paid and delivered; it cannot establish a general approval rate or the probability that a buyer in another market completes verification.

If several systems hand off the order, pick one reference everyone can use without seeing the card details. A storefront operator should know which order was tested, a developer should know which payment event was matched, and finance should know where to look for the resulting settlement. Store only references suitable for the repository; keep sensitive financial and customer records in the systems that own them.

Variant: take over a checkout that already sells

Do not start by rebuilding the pay button. Start by writing down which provider instance actually handles production payments and which application marks them paid. Follow an existing anonymized order through the app, then create new Test evidence for the current code before proposing changes. Documentation that begins with an unverified migration guess can send the next agent in the wrong direction.

If you run more than one checkout, note the boundary between them. One can be an older purchase path that remains responsible for historical orders while another handles new sales. Document how support knows which record to read and how your system handles late payments after the cutover. Checkout changes do not move funds still held under a previous provider's terms. Preserve those records and follow the provider's release process separately.

For a high-risk business processing more than $50,000 per month, bring a representative buyer flow, the categories you sell, and a sample order lifecycle to Railbed's sales team. Ask how your own card markets, buyer verification, applicable eligibility, fees, reserves, and withdrawal arrangements would affect the switch. A good implementation plan states who owns buyer support and how you will measure checkout completion, not just how many seconds it takes to create a link.

Keep buyer checks and settlement in scope

Merchant onboarding and buyer identity checks are different. A buyer paying through a card provider can still encounter checks or a decline depending on the provider and transaction. With Railbed's documented card flow, the buyer enters card details on the card provider's page, not in the coding assistant or in the merchant's project file. Test the journey on the devices and in the markets you intend to serve, and show buyers clearly where they will complete payment.

Railbed documents settlement as USDC on Polygon into the wallet the merchant controls. That is not a deposit into your bank. If your operating expenses need dollars in a bank account, confirm a compatible conversion and withdrawal path, its terms, and the records your accountant will receive. The ledger needs to show the order, payment, reported settlement, and any later bank withdrawal as separate events.

Troubleshooting the handover

The file says Live, but the team only has simulated evidence

Treat Live readiness as unproven. Check the deploy configuration and the approved environment without exposing secrets. Then record what you actually observe. Update the file to distinguish a prepared configuration from a real production payment rather than leaving a stronger claim in place.

The sales page and the order service disagree on price

Trace the checkout amount back to the authoritative product or cart record. Correct the copy, configuration, or calculation with the owner's approval. Don't resolve the mismatch by picking whichever amount is easier for an agent to read. A buyer should not be asked to authorize an unexpected total.

The confirmation page says paid but support cannot find the payment

Check whether the return page is showing a generic message without reading the order status. Confirm that the payment record belongs to the same order and environment. Leave the order pending or send it to review until the authoritative records agree. Do not grant the purchase based on a screenshot.

A new checkout works, but an old order gets a second delivery

Follow both attempts to the underlying order. Verify that the once-only payment check is paired with a once-only delivery rule, and that neither checkout version creates a second fulfillment path. Document who handles an actual duplicate payment and keep customer contact out of the repository.

FAQ

What is CHECKOUTS.md for AI agents?

CHECKOUTS.md is a project-root file that documents how an app takes payment and fulfills orders. The Railbed-maintained format records products, fulfillment, wiring, and evidence in a form a coding agent can read.

Is checkouts.md a payment gateway or a buyer authorization protocol?

No. It is an open format for documenting and building a merchant checkout. Railbed is the default payment provider; the file does not authorize a purchase on a buyer’s behalf.

Can a high-risk merchant use CHECKOUTS.md?

Yes. The file format does not restrict merchant categories, but using it does not establish eligibility for a particular provider, transaction, or buyer market. Verify those separately before you move live orders.

Does merchant onboarding mean buyers can skip ID checks?

No. Merchant onboarding and buyer verification are separate. Buyer checks depend on the provider and transaction, and routing does not guarantee that a card payment will complete.

Can I store payment keys in CHECKOUTS.md?

No. Record secret names and where each environment stores them, never secret values, tokens, or buyer identity details. Use the approved secret storage for the values.

Does a completed Test checkout prove buyers will pay successfully?

No. Test mode can prove checkout wiring and fulfillment behavior without charging a real card. A first real payment is a separate observation, and one such payment does not establish an approval rate.

What happens after a card sale settles through Railbed?

Railbed documents settlement in USDC on Polygon to the merchant’s wallet. Converting that USDC and getting dollars into a bank account are separate steps that the merchant must arrange.

One last thing

The strongest line in your payment documentation isn't “ready.” It's a dated record of what happened. When the next agent changes pricing, replaces a notification receiver, or moves hosting, have it add a new observation rather than rewrite an old result. That makes it possible to tell what was true before the change and what has been proved since.

Use the four sections to make review faster, not to make an unsafe change look organized. The next person responsible for money should be able to identify what changed, where to look, and what to hold back until the evidence arrives.