Billing
Manage your Wallgent plan, payment methods, and subscription invoices.
Overview
Wallgent uses a subscription model. All organizations start on the Free plan (sandbox only). Upgrading to a paid plan unlocks production access and higher rate limits.
Plan Tiers
| Free | Starter | Growth | Enterprise | |
|---|---|---|---|---|
| Price | $0/mo | $99/mo | $249/mo | Custom |
| Wallets | 3 | 10 | 50 | Unlimited |
| Read RPM | 60 | 200 | 500 | 2,000 |
| Write RPM | 10 | 50 | 100 | 500 |
| Production access | No | Yes | Yes | Yes |
| Agent definitions | 3 | 10 | 50 | Unlimited |
| Agent executions/mo | 50 | 500 | 2,000 | Unlimited |
| Builder messages/mo | 10 | Unlimited | Unlimited | Unlimited |
Free plans are sandbox-only. To accept real money and create production API keys, upgrade to Starter or Growth.
Viewing Current Billing Info
GET /v1/billingReturns your current plan, subscription status, next billing date, and saved payment method.
Subscribing to a Plan
POST /v1/billing/subscribePay for your subscription using either a Wallgent wallet or a credit/debit card.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
plan | string | Yes | STARTER or GROWTH |
paymentMethod | string | Yes | WALLET or CARD |
stripePaymentMethodId | string | No | Required if paymentMethod is CARD |
// Subscribe using a saved card
const response = await fetch('https://api.wallgent.com/v1/billing/subscribe', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.WALLGENT_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
plan: 'STARTER',
paymentMethod: 'CARD',
stripePaymentMethodId: 'pm_...',
}),
})Stripe Checkout (Recommended for New Subscribers)
Create a hosted Stripe Checkout session. Redirect the user to the returned URL to complete payment setup.
POST /v1/billing/checkoutRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
plan | string | Yes | STARTER or GROWTH |
const response = await fetch('https://api.wallgent.com/v1/billing/checkout', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.WALLGENT_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ plan: 'GROWTH' }),
})
const { url } = await response.json()
// Redirect the user to `url` to complete checkoutChanging Plans
Upgrade or downgrade at any time. Changes take effect immediately and billing is prorated.
POST /v1/billing/change-planawait fetch('https://api.wallgent.com/v1/billing/change-plan', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.WALLGENT_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ plan: 'GROWTH' }),
})Cancelling
Cancellation takes effect at the end of the current billing period. You retain your current plan's access until then.
POST /v1/billing/cancelawait fetch('https://api.wallgent.com/v1/billing/cancel', {
method: 'POST',
headers: { 'Authorization': `Bearer ${process.env.WALLGENT_API_KEY}` },
})Managing Payment Methods
Step 1: Create a SetupIntent
POST /v1/billing/setup-intentReturns a Stripe clientSecret for use with Stripe.js to securely collect card details without the card number touching your servers.
Step 2: Save the Card
After Stripe confirms the card, save the resulting paymentMethodId:
POST /v1/billing/payment-methodawait fetch('https://api.wallgent.com/v1/billing/payment-method', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.WALLGENT_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ paymentMethodId: 'pm_...' }),
})Remove a Card
DELETE /v1/billing/payment-methodSwitch Between Wallet and Card
POST /v1/billing/change-payment-methodawait fetch('https://api.wallgent.com/v1/billing/change-payment-method', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.WALLGENT_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ paymentMethod: 'WALLET' }),
})Viewing Billing Invoices
GET /v1/billing/invoices?page=1&limit=20Returns paginated billing invoices from Stripe.
GET /v1/billing/invoices/:idReturns a single invoice with line items and payment status.
Retrying a Failed Payment
If a billing payment fails (e.g. card declined), retry it manually:
POST /v1/billing/retry-paymentSelf-Service Portal
Redirect users to the Stripe Customer Portal for self-service plan management, invoice downloads, and card updates.
POST /v1/billing/portalconst response = await fetch('https://api.wallgent.com/v1/billing/portal', {
method: 'POST',
headers: { 'Authorization': `Bearer ${process.env.WALLGENT_API_KEY}` },
})
const { url } = await response.json()
// Redirect the user to `url`API Endpoints
| Method | Path | Description |
|---|---|---|
GET | /v1/billing | Get current billing info |
POST | /v1/billing/subscribe | Subscribe to a plan |
POST | /v1/billing/checkout | Create Stripe Checkout session |
POST | /v1/billing/change-plan | Upgrade or downgrade |
POST | /v1/billing/cancel | Cancel subscription |
POST | /v1/billing/change-payment-method | Switch between wallet and card billing |
POST | /v1/billing/setup-intent | Get Stripe SetupIntent for card collection |
POST | /v1/billing/payment-method | Save a card after SetupIntent |
DELETE | /v1/billing/payment-method | Remove saved card |
POST | /v1/billing/retry-payment | Retry a failed billing payment |
POST | /v1/billing/portal | Create Stripe Customer Portal session |
GET | /v1/billing/invoices | List billing invoices |
GET | /v1/billing/invoices/:id | Get a single billing invoice |
Permissions
| Permission | Required For |
|---|---|
billing:read | View plan, invoices, and payment methods |
billing:write | Subscribe, change plan, manage payment methods |