The Stellar testnet is a full copy of the network that uses valueless tokens, so you can build and test payment flows without risking real money. This guide sets up a repeatable development loop: install Freighter, switch to testnet, fund an account with friendbot, get test USDC, run a full BettaPay payment, and inspect it in the Stellar Laboratory.
Step 1 — Install Freighter and switch to testnet
Install and select the Test Network
- Install the Freighter extension from freighter.app and create (or import) a wallet. Save your recovery phrase.
- Open Freighter, click the network selector at the top, and choose Test Net. Everything you do now is on testnet.
- Copy your public key (starts with
G…) — you'll fund it next.
Step 2 — Fund your account with friendbot
A brand-new Stellar account holds nothing and isn't yet on the ledger. Friendbot creates and funds testnet accounts with 10,000 test XLM. Replace the address with your Freighter public key:
# Fund a testnet account with 10,000 test XLM.
curl "https://friendbot.stellar.org/?addr=GYOUR_PUBLIC_KEY_HERE"
# A successful response is the funding transaction as JSON.
# Re-run it any time your test XLM runs low.Prefer a UI? The Stellar Laboratory has a "Fund account with friendbot" button that does the same thing.
Step 3 — Get test USDC
XLM covers network fees, but BettaPay settles in USDC, so you need a test USDC balance. Two things are required: a trustline to the testnet USDC asset, and some tokens.
Add a trustline and receive test USDC
- In Freighter, choose Manage Assets → Add asset and add USDC using the testnet issuer published in the API reference (asset code
USDC). This creates the trustline. - Use the BettaPay testnet USDC faucet (in the dashboard under Developers → Testnet tools) to send test USDC to your address.
Confirm the balance appears in Freighter before continuing. Without a trustline, any USDC sent to you will bounce.
Step 4 — Create a test payment link
With a funded wallet you can run a real payment. In a BettaPay merchant account set to testnet, create a payment link exactly as in Accepting Your First Payment — for example a 1.00 USD link. Keep the amount small so your faucet balance lasts across many tests.
Step 5 — Pay with Freighter
Complete the test checkout
- Open the payment link and click Pay with wallet.
- Approve the Freighter connection and review the USDC amount.
- Confirm the network says Test Network, then sign. The payment confirms in a few seconds and the dashboard shows Succeeded.
Step 6 — Inspect the transaction in Stellar Laboratory
The Stellar Laboratory lets you look at the raw ledger. Take the transaction hash from the payment detail in your dashboard and:
- Paste it into Explore Endpoints → Transactions → Single Transaction (make sure the Lab is set to Testnet).
- Review the operations — you should see a payment operation moving USDC from the customer to your settlement wallet.
- Check the memo and asset match what BettaPay recorded.
You can also inspect any address's balances and history in stellar.expert (testnet).
Reset your test data
- Fresh wallet — create a new account in Freighter and re-fund it with friendbot to start from a clean slate.
- Clear BettaPay test data — under Developers → Testnet tools you can wipe test payments and links without touching production data.
- Network resets — the Stellar testnet is periodically reset. When that happens, existing testnet accounts and balances disappear; just re-fund with friendbot and re-add your trustline.
Common issues
Friendbot says "account already funded"
The account already exists on testnet. That's fine — you can receive payments. Friendbot only creates an account once; use the faucet for more test USDC.
USDC doesn't show up after sending
You're almost certainly missing the trustline. Add the USDC asset in Freighter (Step 3) and resend from the faucet.
"op_underfunded" when paying
Not enough USDC (or XLM for fees). Re-fund XLM with friendbot and top up USDC from the faucet, then retry the checkout.
Laboratory shows "not found" for my transaction
The Lab is probably set to the wrong network. Switch it to Testnet and paste the hash again.
Next steps
- Run the full flow → Accepting Your First Payment.
- Automate it from your backend → Server-to-Server Integration.
- Endpoints and testnet asset details → API reference.