Skip to content

Billing

Manage your subscription, view usage, and access billing resources.

Retrieve current subscription details.

GET /billing/subscription
{
"success": true,
"data": {
"status": "active",
"plan": "pro",
"currentPeriodStart": "2024-01-01T00:00:00.000Z",
"currentPeriodEnd": "2024-02-01T00:00:00.000Z",
"cancelAtPeriodEnd": false
}
}
FieldTypeDescription
statusstringSubscription status (active, canceled, past_due)
planstringCurrent plan (free, pro, enterprise)
currentPeriodStartstringStart of current billing period
currentPeriodEndstringEnd of current billing period
cancelAtPeriodEndbooleanWhether subscription cancels at period end

Retrieve current billing period usage.

GET /billing/usage
{
"success": true,
"data": {
"emailsUsed": 4500,
"emailsLimit": 10000,
"searchesUsed": 890,
"searchesLimit": 5000,
"storageUsed": 256000000,
"storageLimit": 1000000000
}
}
FieldTypeDescription
emailsUsednumberEmails received this period
emailsLimitnumberMaximum emails allowed
searchesUsednumberSearch queries this period
searchesLimitnumberMaximum searches allowed
storageUsednumberStorage used in bytes
storageLimitnumberStorage limit in bytes

Start a subscription upgrade.

POST /billing/checkout
{
"plan": "pro",
"successUrl": "https://app.momail.io/billing/success",
"cancelUrl": "https://app.momail.io/billing/cancel"
}
{
"success": true,
"data": {
"url": "https://checkout.stripe.com/pay/cs_test_..."
}
}

Redirect the user to the returned URL to complete payment.

Access the customer portal to manage payment methods and invoices.

POST /billing/portal
{
"returnUrl": "https://app.momail.io/settings"
}
{
"success": true,
"data": {
"url": "https://billing.stripe.com/session/..."
}
}
FeatureFreeProEnterprise
Monthly Price$0$29Custom
Emails per Month10010,000Unlimited
API Rate Limit20/min100/min500/min
Search Queries100/month5,000/monthUnlimited
Storage1 GB50 GBUnlimited
SupportCommunityEmailPriority
Custom Domain110Unlimited
WebhooksLimitedFullFull

See Pricing for complete plan details.

Terminal window
# Get subscription
curl https://api.momail.io/v1/billing/subscription \
-H "X-API-Key: your_key"
# Get usage
curl https://api.momail.io/v1/billing/usage \
-H "X-API-Key: your_key"
# Create checkout session
curl -X POST https://api.momail.io/v1/billing/checkout \
-H "X-API-Key: your_key" \
-H "Content-Type: application/json" \
-d '{
"plan": "pro",
"successUrl": "https://app.momail.io/billing/success",
"cancelUrl": "https://app.momail.io/billing/cancel"
}'
# Create portal session
curl -X POST https://api.momail.io/v1/billing/portal \
-H "X-API-Key: your_key" \
-H "Content-Type: application/json" \
-d '{"returnUrl": "https://app.momail.io/settings"}'