Wallgent
Guides

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

FreeStarterGrowthEnterprise
Price$0/mo$99/mo$249/moCustom
Wallets31050Unlimited
Read RPM602005002,000
Write RPM1050100500
Production accessNoYesYesYes
Agent definitions31050Unlimited
Agent executions/mo505002,000Unlimited
Builder messages/mo10UnlimitedUnlimitedUnlimited

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/billing

Returns your current plan, subscription status, next billing date, and saved payment method.


Subscribing to a Plan

POST /v1/billing/subscribe

Pay for your subscription using either a Wallgent wallet or a credit/debit card.

Request Body

FieldTypeRequiredDescription
planstringYesSTARTER or GROWTH
paymentMethodstringYesWALLET or CARD
stripePaymentMethodIdstringNoRequired 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_...',
  }),
})

Create a hosted Stripe Checkout session. Redirect the user to the returned URL to complete payment setup.

POST /v1/billing/checkout

Request Body

FieldTypeRequiredDescription
planstringYesSTARTER 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 checkout

Changing Plans

Upgrade or downgrade at any time. Changes take effect immediately and billing is prorated.

POST /v1/billing/change-plan
await 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/cancel
await 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-intent

Returns 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-method
await 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-method

Switch Between Wallet and Card

POST /v1/billing/change-payment-method
await 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=20

Returns paginated billing invoices from Stripe.

GET /v1/billing/invoices/:id

Returns 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-payment

Self-Service Portal

Redirect users to the Stripe Customer Portal for self-service plan management, invoice downloads, and card updates.

POST /v1/billing/portal
const 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

MethodPathDescription
GET/v1/billingGet current billing info
POST/v1/billing/subscribeSubscribe to a plan
POST/v1/billing/checkoutCreate Stripe Checkout session
POST/v1/billing/change-planUpgrade or downgrade
POST/v1/billing/cancelCancel subscription
POST/v1/billing/change-payment-methodSwitch between wallet and card billing
POST/v1/billing/setup-intentGet Stripe SetupIntent for card collection
POST/v1/billing/payment-methodSave a card after SetupIntent
DELETE/v1/billing/payment-methodRemove saved card
POST/v1/billing/retry-paymentRetry a failed billing payment
POST/v1/billing/portalCreate Stripe Customer Portal session
GET/v1/billing/invoicesList billing invoices
GET/v1/billing/invoices/:idGet a single billing invoice

Permissions

PermissionRequired For
billing:readView plan, invoices, and payment methods
billing:writeSubscribe, change plan, manage payment methods

On this page