Marlin gives you a Stripe-like billing layer on Solana. This guide walks you through everything you need to go from a fresh account to a live invoice with a hosted checkout URL your customer can pay in USDC, PYUSD, or USDG.Documentation Index
Fetch the complete documentation index at: https://yanhgming.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Connect your wallet and create an account
Go to the Marlin dashboard and click Connect wallet. Marlin uses Sign-In With Solana (SIWS), so you sign a message — no seed phrase, no gas. Any Solana wallet (Phantom, Backpack, Solflare) works.After signing in for the first time, Marlin creates a merchant account tied to your wallet address. You land on the dashboard home where you can see your revenue, customers, and invoices.
Generate an API key
In the sidebar, go to Settings → API Keys and click Create key.Give the key a descriptive label (for example,
backend-server) and copy the value shown — it starts with sk_live_ for production or sk_test_ for test mode. Store it in a secret manager or environment variable; you won’t be able to view it again.Install the SDK
Add The SDK requires Node.js 20 or later and ships full TypeScript types — no separate
@marlin/sdk to your project:@types package needed.Create your first invoice
Initialize the client with your API key, then call A successful call returns an
marlin.invoices.create. Pass a customerId and at least one line item. unitAmount is in the smallest denomination of the currency (cents for USD-pegged stablecoins).invoice.ts
Invoice object:The
paymentUrl is a fully hosted checkout page that is ready the moment the invoice is created. You can share it immediately — no additional setup required.Share the payment URL
Send
invoice.paymentUrl to your customer however you like — email, Slack, in-app notification. The hosted checkout page:- Works with any Solana wallet via the wallet adapter
- Accepts USDC, PYUSD, and USDG
- Settles directly to your wallet on-chain
- Updates the invoice status to
paidautomatically once the transaction confirms
What’s next
Invoices
Learn about invoice statuses, line items, metadata, and voiding.
Accept payments
Handle payment confirmations, reconciliation, and multi-currency invoices.
Webhooks
Get notified in real time when invoices are paid, subscriptions change, and more.