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

# Going to Mainnet

> The checklist before flipping your endpoint from Stellar Testnet to Mainnet.

Moving to mainnet is a config change. It is also an irreversible commitment to accepting real value. This is a short checklist to make sure the flip is boring.

## Pre-flight

<Checklist>
  <Check>Testnet endpoint has been serving paid requests for at least 48 hours without incident.</Check>
  <Check>The `describe` block matches what the endpoint actually returns — confirm with a real buyer response, not a spec.</Check>
  <Check>You have a mainnet Stellar account to receive to. This is a **different address** from your testnet `payTo`.</Check>
  <Check>Your monitoring covers a paid-request success rate, not just uptime.</Check>
  <Check>Your rejection rate on testnet is under 5% (excluding `insufficient_funds`, which is a buyer problem).</Check>
</Checklist>

## The flip

```diff theme={null}
 requirePayment({
   facilitator: "https://facilitator.stellarx402.com",
-  network: "stellar:testnet",
+  network: "stellar:pubnet",
-  payTo: "GABC...TESTNET",
+  payTo: "GXYZ...MAINNET",
   scheme: "exact",
   amount: "5000",
   asset: "USDC",
   ...
 });
```

Restart. Confirm the first paid request settles into your mainnet address.

## Post-flip

* Watch the first hour of settlement latency. If it climbs above 15 seconds, escalate before it affects users.
* Watch the rejection code distribution. A sudden spike in `network_mismatch` means clients are still signing on testnet.
* Update any hardcoded testnet references (docs, examples, integration tests).

## Rolling back

If the mainnet endpoint misbehaves, flip the config back to testnet and take mainnet traffic offline (405 or maintenance page). Do not leave a broken mainnet listing in the Bazaar; delist it explicitly. See [Verifying Your Listing](/guides/sellers/verifying-your-listing).
