How to accept USDC on Stellar with SEP-7 links

With Cosmos Pay, a payment link on Stellar is a SEP-7 request: your customer scans its QR code or opens it in a wallet such as Freighter, LOBSTR or xBull and approves the USDC payment there. The USDC goes straight to your Stellar account, and Cosmos Pay marks the link as paid once it finds the payment by the link’s memo. Your account must already trust USDC to receive it.

What a SEP-7 link holds

SEP-7 is Stellar’s standard for payment requests: a web+stellar:pay link, or its QR code, with your address, the amount, the asset and its issuer, and a numeric memo.

Cosmos Pay creates a memo for each link and watches your account’s payments for it. It accepts a payment with that memo, to your address, in the link’s asset and, when the link fixes an amount, for exactly that amount, made after the link was created.

Prepare your account

  • Your Stellar account must exist on the network and trust USDC before it can receive it. Cosmos Pay does not check this when you add the account, and a payment to an account without the trustline fails after your customer signs.
  • Add the account to your organization in the dashboard and sign what it asks for, which proves the account is yours.
  • For tests, do the same on Testnet. Friendbot, the Testnet faucet, sends test XLM to an account, and links can charge in XLM there.

What your customer needs

  • A Stellar wallet that opens SEP-7 links, such as Cosmos Pay Wallet, Freighter, LOBSTR, xBull, Albedo or Rabet, holding the USDC and some XLM for the network fee. No account with Cosmos Pay.
  • A direct USDC payment. A wallet that converts another asset into USDC on the way (a path payment) does not settle the link.
  • On Testnet, the wallet set to Testnet before paying: the link does not name the network, and a wallet that follows SEP-7 then assumes the main one.

Accept your first USDC payment on Stellar

  1. Switch to Sandbox

    Sign in to the dashboard and choose Sandbox at the top. Links you create there run on Stellar Testnet and move no real money.

  2. Add your Stellar account

    Make sure the account exists and trusts USDC, then add it in your organization’s settings and sign what the dashboard asks for.

  3. Create the link

    In Payments, choose Create payment link, pick Stellar, the amount (or none) and USDC, then your account and, if you like, a message.

  4. Pay it from a wallet

    Open the checkout page and scan its QR code with a Stellar wallet set to the same network, or open the link on the same device. Approve the payment, and the checkout turns to Paid once Cosmos Pay finds it.

  5. Confirm it on your server

    Add a webhook endpoint in the dashboard. When the payment is confirmed, Cosmos Pay sends PAYMENT_INTENT_SUCCEEDED, signed with HMAC-SHA256. Deliver the order when it arrives.

  6. Switch to Production

    Choose Production and create a live API key (it starts with prod_). Links now run on Stellar’s main network, where Circle’s USDC is the preset.

Create the link from your server

Call POST /v1/payment-intents/pay with your account as the destination, the amount and, for USDC, the asset code with its issuer, or use client.paymentIntents.createPay in the TypeScript SDK: Stellar is the default chain. The response carries the link (its uri starts with web+stellar:pay) and its QR code.

When you know your customer’s account, a transaction intent (POST /v1/payment-intents/tx, or createTx in the SDK) returns an unsigned transaction for them to sign instead. It must be signed within five minutes.

If you set your own memo, use it for one payment only: the same memo with different terms is refused.

Good to know

  • You can leave the amount empty and let your customer choose it. A message of up to 300 characters shows in your customer’s wallet.
  • With your own fee on the payment, the checkout asks for your customer’s account and builds one transaction that pays you and your fee wallet.
  • In the dashboard, a pending Stellar link has a check that settles it from a transaction hash.
  • A payment that arrives after the link expired is settled by sending its transaction hash to POST /v1/payment-intents/:id/validate.
  • Your customer’s wallet pays the Stellar network fee, in XLM. Private payments, which hide the amount on-chain, run on Stellar in XLM, on Testnet for now.

Questions and answers.

Payments by network:Stellar paymentsSolana paymentsMonad payments

Why did a payment to my account fail?

The most common reason is a missing USDC trustline on the receiving account. Add the trustline, then create a new link and send it again.

Which wallets can pay a SEP-7 link?

Any Stellar wallet that opens SEP-7 links, such as Cosmos Pay Wallet, Freighter, LOBSTR, xBull, Albedo or Rabet.

Can my customer pay a USDC link with XLM?

No. Only a direct USDC payment settles it: a payment that converts XLM into USDC on the way does not.

Can I test without real money?

Yes. In Sandbox and with test keys (dv_), links run on Stellar Testnet, where USDC has a preset and Friendbot sends test XLM.

Start accepting stablecoins.

Create a free account, mint a test key and send your first payment link today.

Write to us

Questions about plans, integration or protected payments? Tell us and we will reply by email.

We use these details only to reply to you.