Getting Started
Prerequisites and the complete setup flow for merchants and subscribers.
Getting Started
This guide explains every step to go from zero to accepting recurring USDC payments on Solana. Each step is marked required or optional so you know exactly what's needed.
Prerequisites
Before integrating Recur, you need:
| Requirement | Why | How to get it |
|---|---|---|
| Solana wallet (Phantom, Solflare, etc.) | Signs transactions and authenticates your merchant account | Install from phantom.app or solflare.com |
| SOL balance | Pays transaction fees (~0.005 SOL per tx) | Use a faucet on devnet, or purchase for mainnet |
| USDC (SPL Token) | The payment currency for all subscriptions | Devnet: spl-token airdrop; Mainnet: purchase/bridge |
| Node.js ≥ 18 | Runs the SDK and your backend | nodejs.org |
Setup Flow
For Merchants (accepting payments)
For Subscribers (making payments)
Step-by-step: Merchant Setup
Step 1: Sign In (Required)
Connect your Solana wallet to the Recur dashboard at app.recur.com (or your self-hosted instance). The auth flow:
- Request a nonce from the API
- Sign the nonce with your wallet
- Submit the signature → receive a JWT
This happens automatically in the dashboard UI. For programmatic access, see Authentication.
Step 2: Create an App (Required)
An App groups your plans and subscriptions. You need at least one.
Via Dashboard: Go to Dashboard → Apps → Create App
Via API:
Step 3: Create a Plan (Required)
A Plan defines the price and billing interval.
Via Dashboard: Apps → [Your App] → Plans → Create Plan
Via API:
Step 4: Generate an API Key (Required for server-side)
API keys let your backend call the Recur API without wallet signatures.
Via Dashboard: Dashboard → API Keys → Create New Key
Via API: See API Keys guide
Important: Copy the key immediately — it's shown only once.
Step 5: Set Up Webhooks (Recommended)
Webhooks notify your server of payment events so you can grant/revoke access.
Via Dashboard: Apps → [Your App] → Webhook → Add Endpoint
Via API:
See the full Webhooks guide for event handling.
Step 6: Integrate the Subscribe Flow (Required)
On your frontend, build a subscribe transaction when a user wants to pay:
Browser Polyfills (Frontend Projects)
If you're using @recur/sdk in a browser environment (Next.js, Vite, etc.), you need Node.js polyfills for @solana/web3.js dependencies:
Next.js (webpack)
Install the polyfill packages:
Vite
Note: The
@recur/sdkitself usesDataView(notBuffer.writeBigUInt64LE) for BigInt serialization, so no custom BigInt polyfills are needed. The standard polyfills above are only needed for@solana/web3.jsinternals.
What's Optional?
| Feature | Required? | Why you might skip it |
|---|---|---|
| Webhook setup | Recommended | You can poll the API instead, but webhooks are more reliable and real-time |
| Email on profile | Optional | Only used for notifications from Recur to you |
| Business name/URL | Optional | Shown to subscribers for trust — recommended but not enforced |
| Phone number | Optional | Not currently used |
| Recur Pro tier | Optional | Unlocks CSV exports, priority support, higher rate limits |
Next Steps
- Backend Integration — full server-side implementation
- Webhooks — handle payment events
- API Keys — secure server-to-server access