Payment Methods (Solana, Dodo)
Solana
Pay with SOL from a Solana wallet. The app uses Reown AppKit with a Solana adapter; Phantom and other Solana wallets are supported. Details| Aspect | Details |
|---|---|
| You need | A Solana wallet (e.g. Phantom) with enough SOL (for the transfer and fees) |
| Network | devnet for testing; mainnet for production. Wallet and app must use the same network. |
| Recipient | TREASURY_WALLET (from /api/payment/config). |
| Flow | Connect wallet (header) → Payment page → choose Solana → approve transaction → redirect to Execution |
Dodo (Card / UPI)
Pay with Visa, Mastercard, UPI, or other cards via Dodo Payments. You are redirected to Dodo’s hosted checkout and back to Scriptonia. Details| Aspect | Details |
|---|---|
| You need | A card or UPI accepted by Dodo. No wallet required. |
| Amount | Set in Dodo (often aligned with UNIFIED_PRICE_USD, e.g. ~$4 USD). |
| Flow | Choose Card → Pay with Card → Dodo Checkout → complete payment → redirect to /payment/success → verification → Execution |
- Selected platform (Website, Web Application, Android, iOS) maps to a Dodo product
- Product and price are defined in the Dodo dashboard
Setting Up Phantom Wallet
Phantom is one of the supported Solana wallets. You connect via the wallet button in the header (Reown AppKit).1. Install Phantom
- Browser: https://phantom.app → Chrome, Brave, Edge, Firefox
- Mobile: App Store or Google Play
2. Create or import a wallet
- New: Create wallet and back up seed phrase
- Import: Enter existing seed phrase
3. Get SOL
- Devnet: Use a devnet faucet; switch Phantom to Devnet
- Mainnet: Buy SOL and withdraw to Phantom;
- Keep SOL for transaction fees
4. Connect on Scriptonia
- Use the wallet button in the header
- Choose Phantom (or another Solana wallet)
- Approve connection
- Wallet state appears in header
- Payment page does not connect the wallet
- You must connect via the header before paying
Payment Process
Solana
- Idea → Intent → Platform
- Open Payment page (
/payment?sessionId=...&platform=...) - Ensure wallet is connected via header
- Select Solana
- Click Pay
- Sign transaction in wallet
- On confirmation → redirected to Execution
Dodo (Card)
- Idea → Intent → Platform
- Open Payment page
- Select Card
- Click Pay with Card
- Complete checkout on Dodo
- Redirect to
/payment/success?sessionId=...&platform=... - App verifies payment via
/api/dodo/confirm-payment - Redirect to Execution
After payment
- Solana
/api/paymentcalled- Workflow updated with
transactionSig paymentMethod: 'solana'
- Dodo
/api/dodo/confirm-payment(and webhook)- Workflow updated with
dodoPaymentId paymentMethod: 'dodo'
Troubleshooting Payments
Solana
| Issue | What to check |
|---|---|
| Insufficient funds | Enough SOL + fees |
| Use header wallet button | Connect wallet via header first |
| RPC error / timeout | Check RPC or HELIUS_RPC_URL |
| Wrong network | Wallet and app network must match |
| Wallet not signing | Unlock Phantom; reconnect |
| Invalid agent address | TREASURY_WALLET missing or wrong |
| Tx succeeded but workflow failed | Contact support with sessionId and tx signature |
Dodo
| Issue | What to check |
|---|---|
| Failed to create checkout | Check DODO_API_KEY and product |
| Redirect fails | Browser blockers or URL issues |
| Stuck on “Verifying Payment” | Check /api/dodo/confirm-payment and URL params |
| Verification failed | Contact support with sessionId and payment_id |
| Paid but Execution blocked | Workflow not updated; contact support |
General
| Issue | What to check |
|---|---|
| No Active Session | Start from Home → Idea → Intent → Platform |
| Workflow context not found | Session lost; restart or contact support |
| Payment ok, Execution fails | Retry with same sessionId; contact support |