Documentation Index
Fetch the complete documentation index at: https://docs.solvapay.com/llms.txt
Use this file to discover all available pages before exploring further.
1) Run the CLI setup
From your project root:
This command authenticates you, writes SOLVAPAY_SECRET_KEY, installs core packages, and
prints a starter snippet.
See CLI setup for full details.
2) Protect your first endpoint (Express)
import express from 'express'
import { createSolvaPay } from '@solvapay/server'
const app = express()
app.use(express.json())
const solvaPay = createSolvaPay()
const payable = solvaPay.payable({
product: 'prd_YOUR_PRODUCT',
})
app.post(
'/tasks',
payable.http(async req => {
return {
success: true,
task: {
title: req.body.title,
},
}
}),
)
Test it:
curl -X POST http://localhost:3000/tasks \
-H "Content-Type: application/json" \
-H "x-customer-ref: user_123" \
-d '{"title":"My first task"}'
3) Continue by framework
Next steps