> ## Documentation Index
> Fetch the complete documentation index at: https://solana.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# Go live with your checkout

> Switch the checkout to mainnet, decide who pays network fees, and handle the edge cases real customers hit.

<div className="sol-stepper not-prose" data-path="checkout">
<div className="sol-stepper-nav" role="navigation" aria-label="Build a checkout · ~30 min">
<ol>
<li data-state="done"><a href="/developers/docs/payments/checkout/try-it"><span className="sol-stepper-n">Step 1<span className="sol-vh">, </span><span className="sol-stepper-done">Done</span><span className="sol-vh">: </span></span><span className="sol-stepper-t">Pay as a customer</span></a></li>
<li data-state="done"><a href="/developers/docs/payments/checkout/browser"><span className="sol-stepper-n">Step 2<span className="sol-vh">, </span><span className="sol-stepper-done">Done</span><span className="sol-vh">: </span></span><span className="sol-stepper-t">Show a payment QR code</span></a></li>
<li data-state="done"><a href="/developers/docs/payments/checkout/backend"><span className="sol-stepper-n">Step 3<span className="sol-vh">, </span><span className="sol-stepper-done">Done</span><span className="sol-vh">: </span></span><span className="sol-stepper-t">Confirm from your backend</span></a></li>
<li data-state="current"><a href="/developers/docs/payments/checkout/go-live" aria-current="step"><span className="sol-stepper-n">Step 4<span className="sol-vh">: </span></span><span className="sol-stepper-t">Go live</span></a></li>
</ol>
</div>
</div>

## Before you take real money

- **Use a production RPC provider.** Public endpoints are rate-limited and not
  meant for production traffic. See [RPC providers](/developers/docs/rpc/providers).
- **Swap devnet values for mainnet ones.** Set `RPC_URL`,
  `RPC_SUBSCRIPTIONS_URL` and `USDC_MINT` from the table below. If you also
  show the Solana Pay QR code from step 2, point its RPC URLs and `splToken` at
  mainnet too.
- **Create the store's USDC account first.** The payment goes to the store
  wallet's USDC token account. If that account doesn't exist, the transfer
  fails. Opening it costs a small refundable deposit (see rent below).
- **Match payments to orders with a reference.** Give every order a fresh
  reference, attach it to the payment as `payStore` does, and check it, as
  `verifyPayment` does. Never match by amount alone: two customers can pay
  \$20 at the same moment.
- **Record each signature once.** Enforce it in your database with a unique
  constraint, so a reused signature can't confirm a second order.
- **Handle expired and failed transactions.** A transaction expires if it isn't
  confirmed within 150 blocks of its recent blockhash, about 30 seconds at
  200ms slots. Let the customer retry, which builds a new transaction.
- **Fulfill only finalized payments.** Never act on `processed`: its block can
  still be skipped. Fulfill an order once its payment is `finalized`. On
  mainnet that takes roughly 150 milliseconds, and `confirmed`, which
  `verifyPayment` checks, reports the same block, so that check already meets
  this rule. See [settlement and finality](/developers/docs/defi/finality).
- **Use notifications instead of polling.** See
  [Indexing and webhooks](/developers/docs/payments/accept-payments/indexing).
- **Decide who pays network fees.** See fee sponsorship below.

## Devnet vs mainnet values

| Setting | Devnet (testing) | Mainnet (real money) |
| --- | --- | --- |
| `RPC_URL` | `https://api.devnet.solana.com` | Your RPC provider's HTTPS URL |
| `RPC_SUBSCRIPTIONS_URL` | `wss://api.devnet.solana.com` | Your RPC provider's WebSocket URL |
| `USDC_MINT` | `4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU` ([Explorer](https://explorer.solana.com/address/4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU?cluster=devnet)) | `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` ([Explorer](https://explorer.solana.com/address/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v)) |
| USDC decimals | 6 | 6 |
| Money | Free test USDC from the [Circle faucet](https://faucet.circle.com) | Real USDC |

Both mint addresses are Circle's official USDC. Check the mint in
`verifyPayment`, as the example does: anyone can create a token called "USDC",
but only these mints are the real thing.

## Who pays the network fee

In this tutorial the customer's wallet pays the fee, 5,000 lamports (0.000005
SOL), so the customer needs a little SOL as well as USDC. If your customers
only hold dollars, pay the fee for them.

<div className="sol-concept not-prose">
[<span className="sol-concept-name">Fee sponsorship</span> <span className="sol-concept-def">By default, the transaction's fee payer needs a little SOL to pay its fee.</span>](/developers/docs/core/fees/fee-sponsorship)
</div>

To sponsor fees, make your server the transaction's fee payer. The customer
still signs the transfer, and your fee-payer key signs for the fee.
[Kora](/developers/docs/tools/kora) runs that fee payer as a service, with validation
rules, rate limits, and the option to charge the fee back in USDC. The
[fee abstraction guide](/developers/docs/payments/send-payments/payment-processing/fee-abstraction)
shows both approaches.

<div className="sol-concept not-prose">
[<span className="sol-concept-name">Rent (storage deposit)</span> <span className="sol-concept-def">Every account holds a small refundable deposit for the space it takes up.</span>](/developers/docs/core/rent)
</div>

Rent matters more for refunds and payouts: sending USDC to a customer who has
never held it opens a USDC account for them, and the sender pays that deposit.

## You built a working checkout

You paid as a customer, read the payment code your checkout sends, and
verified payments from your own server. From here:

<CardGroup cols={2}>
<Card title="Paywall an endpoint" icon="code" href="/developers/docs/payments/paywall-api">
  Next tutorial: charge for each call to your API.
</Card>
<Card title="Subscriptions" icon="repeat" href="/developers/docs/payments/subscriptions/overview">
  Recurring charges with spending limits the customer controls.
</Card>
<Card title="Payouts and disbursements" icon="banknote" href="/developers/docs/payments/send-payments/payment-processing">
  Send money back out: refunds, payroll, marketplace splits.
</Card>
<Card title="Production readiness" icon="list-checks" href="/developers/docs/tools/production-readiness" arrow>
  RPC infrastructure, monitoring, and key management.
</Card>
</CardGroup>
