Skip to main content
All guides
Beginnerpayment-linksno-codefreighter

Accepting Your First Payment

Go from zero to a live payment link and your first on-chain payment on Stellar testnet.

BettaPay TeamUpdated Jul 19, 202612 min read

This guide takes you from an empty dashboard to a real, on-chain payment — without writing a line of backend code. You'll create a merchant account, publish a payment link, and collect test USDC using the Freighter wallet on the Stellar testnet. By the end you'll see the payment settle in your dashboard and understand the webhook BettaPay fires when it does.

Everything here runs on Stellar testnet, so no real money moves. When you're ready for production, the exact same steps apply — you just switch your merchant account to mainnet.

Prerequisites

Before you start, make sure you have:

  • A Google account — BettaPay uses Google OAuth for merchant sign-in.
  • The Freighter wallet browser extension installed. Grab it from freighter.app and switch it to the Test Network (we cover this in the testnet guide).
  • A funded testnet account with some test USDC. If you don't have this yet, follow Testing with Stellar Testnet first — it takes about two minutes.
No code required
This is the no-code path. If you'd rather create payments programmatically from your backend, jump to Server-to-Server Integration.

Step 1 — Create your merchant account

1

Sign in with Google

Head to app.bettapay.com and choose Continue with Google. BettaPay creates your merchant account from your Google profile — there's no separate password to manage.

On success you're redirected back with an authenticated session cookie. That cookie is what authorizes every dashboard action and API call you make from the browser.

Step 2 — Complete onboarding

2

Tell BettaPay about your business

The first time you sign in, you'll land on the onboarding flow. You'll provide:

  • Business name — shown to customers on the checkout page.
  • Settlement wallet — the Stellar address that receives funds. Paste your testnet public key (starts with G…). You can connect Freighter to fill this automatically.
  • Default currency — the currency your prices are quoted in (e.g. USD, NGN). BettaPay converts to USDC at checkout using a live FX quote.
Tip
Use the same Stellar address you funded on testnet as your settlement wallet. That way the payment you collect in this guide lands somewhere you can inspect.

A payment link is a hosted checkout page you can share by URL, QR code, email, or WhatsApp. From the dashboard, open Payment Links → New link.

Fill in the fields below. Only amount and currency are required.

FieldExampleNotes
amount25.00The price the customer pays.
currencyUSDQuote currency. Converted to USDC at checkout.
descriptionPro plan — monthlyShown on the checkout page and the receipt.
expiresAt2026-08-01T00:00:00ZOptional. After this the link stops accepting payments.
redirectUrlhttps://yoursite.com/thanksOptional. Where the customer returns after paying.

Prefer the API? The same link can be created with a single request. The Idempotency-Key header makes the call safe to retry — see Server-to-Server Integration for the full treatment.

create-payment-link.sh
curl -X POST https://api.bettapay.com/v1/payment-links \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: link-$(date +%s)" \
  --cookie "bp_session=<your-session-cookie>" \
  -d '{
    "amount": "25.00",
    "currency": "USD",
    "description": "Pro plan — monthly",
    "expiresAt": "2026-08-01T00:00:00Z",
    "redirectUrl": "https://yoursite.com/thanks"
  }'

A successful response returns the shareable link and its id:

response.json
{
  "id": "plink_9c2f7a41",
  "url": "https://pay.bettapay.com/l/9c2f7a41",
  "amount": "25.00",
  "currency": "USD",
  "status": "active",
  "network": "testnet",
  "createdAt": "2026-07-19T10:04:22Z"
}

Step 4 — Pay with Freighter on testnet

4

Complete the checkout

Open the payment link's url in a new tab. On the checkout page:

  1. Click Pay with wallet and approve the Freighter connection prompt.
  2. BettaPay fetches a live FX quote and shows the exact USDC amount (e.g. 25.00 USD ≈ 25.00 USDC on testnet).
  3. Freighter opens with the pre-filled transaction. Confirm that the network says Test Network, then click Sign.

The transaction is submitted to Stellar and usually confirms in 3–5 seconds. The checkout page updates to Paid and, if you set a redirectUrl, sends the customer there.

Wrong network is the #1 mistake
If Freighter is pointed at the public network, the payment will fail or try to move real funds. Always confirm it reads Test Network before signing.

Step 5 — Verify the payment in your dashboard

Back in the dashboard, open Payments. Your payment appears at the top with status Succeeded. Click it to see:

  • The Stellar transaction hash (a link to the explorer).
  • The USDC amount received and the FX rate applied.
  • The customer's paying wallet address.

You can open the transaction hash in stellar.expert (testnet) to see the on-chain record independently of BettaPay.

Step 6 — Check the webhook payload

When a payment succeeds, BettaPay sends a payment.succeeded webhook to the endpoint configured under Settings → Webhooks. Here's a complete example payload:

payment.succeeded.json
{
  "id": "evt_5f1b9d3e",
  "type": "payment.succeeded",
  "createdAt": "2026-07-19T10:07:41Z",
  "data": {
    "paymentId": "pay_7a3c0e19",
    "paymentLinkId": "plink_9c2f7a41",
    "status": "succeeded",
    "amount": "25.00",
    "currency": "USD",
    "settledAmount": "25.00",
    "settledAsset": "USDC",
    "network": "testnet",
    "customerAddress": "GBXW...JKLM",
    "txHash": "3d9f...a17c",
    "fxRate": "1.000000"
  }
}

Don't have an endpoint yet? Paste a temporary URL from webhook.site into your webhook settings to watch events arrive live. When you're ready to handle them for real — with signature verification and retries — read Webhook Handling & Retry Logic.

Troubleshooting

The checkout says "insufficient balance"

Your testnet wallet has XLM but no USDC, or not enough USDC to cover the amount. Fund it with test USDC (see the testnet guide) and make sure you've added a trustline for the USDC asset — Freighter prompts you to add one automatically at checkout.

Freighter never opens

The extension may be locked or blocked by a pop-up blocker. Unlock Freighter, reload the checkout page, and allow pop-ups for pay.bettapay.com.

Payment succeeded on-chain but the dashboard shows "pending"

BettaPay confirms payments by watching the network; there can be a brief lag. If it hasn't updated after a minute, the transaction may have used the wrong memo or asset. Open the transaction hash in the explorer to confirm the asset was USDC and the destination matched your settlement wallet.

Feature status
Payment links, Google OAuth sign-in, and payment webhooks are available now. Automated fiat settlement to a bank account is covered separately in Fiat Settlement Configuration — some anchors there are still in development.

Next steps