Goal
Inspect recipient allowance and reserve capped Mail-only prepaid credit without automatic additional spending.Prerequisites
- Keep Mail credentials on your backend. API examples use https://api.stackshift.cloud/api/v1.
Workflow
1
Open Mail → Spending in Live mode to view effective published plans and your current allowance.
2
Choose hard stop or explicitly enable prepaid with a positive period cap as billing owner.
3
Fund through verified checkout and review the full campaign estimate.
4
Approve the maximum, send or schedule, and monitor reservations and alerts.
Monthly allowance versus sending limits
Plan allowances count recipient deliveries within the billing month, not saved contacts. One message addressed to 100 unique recipients uses 100 recipients of allowance when accepted by the outbound server. Reservations reduce the balance while messages are pending. Home shows separate daily, hourly and per-minute message limits in UTC. These sending tiers protect delivery reputation; Starter sending tier is not the Starter paid plan. Both monthly allowance and sending restrictions apply. Buying a larger plan does not automatically raise sending limits. Sending usage counts each message once, in the window it was submitted. The delivery overview reports queued and accepted events separately. Plan cards identify recipient deliveries per month and appear in Free, Starter, Growth, Agency order.Activation is explicit
Published plans become visible at their effective time. Viewing prices does not enroll you or charge you. Choose Enable Free plan to start the published Free allowance, or review a paid plan and confirm checkout. Until enrollment, existing sending restrictions remain in effect.- All API money amounts are integer kobo: 100 kobo = NGN 1. The dashboard displays the recipient price per 1,000. Read the active rate rather than hard-coding a price from an example.
- A billing period snapshots its rate and included recipients. Existing subscriptions use their subscription period; accounts without one use UTC calendar months. Publishing a later rate does not retroactively change an existing period.
- Existing customer prices change only on an eligible renewal, after 30 days’ notice.
- Mail credit cannot fund infrastructure, and shared cloud credit cannot fund Mail. There is no postpaid debt or automatic top-up. Funding alone never opts a workspace into spending.
Choose or renew a Mail plan
In Live mode, Mail → Spending shows the effective catalog prices. Review a paid plan to see its exact amount, included recipients and monthly period before confirming payment. A Free account upgrades immediately after verified payment; a paid account buys its next period starting when the current paid period ends. There are no automatic renewals. You can cancel a quote before checkout. Reloading the page restores a pending order so you can resume its payment without creating another order. Payment returns can be verified from Spending. A redirect alone never activates a plan. Refunded or mismatched payments may require support review before live spending resumes.- GET /api/v1/mail/billing/prices returns the currently effective published catalog. No effective catalog returns HTTP 409 mail_pricing_unavailable; network errors are shown as loading failures, not missing pricing.
- POST /api/v1/mail/billing/enroll requires confirmEnrollment: true. Paid plan review uses POST /api/v1/mail/billing/orders with plan and idempotencyKey. Quotes preserve the agreed prices and expire after 15 minutes.
- GET /api/v1/mail/billing/orders/current restores an open order or a confirmed future period. GET /orders/{orderId} reads an owned order, DELETE /orders/{orderId} cancels an unsubmitted quote, and POST /orders/{orderId}/checkout starts or resumes its payment. These order paths are relative to /api/v1/mail/billing.
- POST /api/v1/mail/billing/orders/verify accepts reference. All plan actions require a signed-in billing owner in Live mode; API tokens and Test mode cannot purchase or enroll.
Summary and estimate response
- GET /mail/billing returns active, mode, currency, periodStart, periodEnd, rateVersion, recipientPriceKobo, included, used, reserved, remaining, prepaidBalanceKobo, spentKobo, reservedKobo, reconciliationRequired and settings. settings contains prepaidEnabled, capKobo and revision.
- GET /mail/billing?period=YYYY-MM returns what a past month looked like: period, planSlug, currency, periodStart, periodEnd, monthlyPriceKobo, included, used and spentKobo for the billing period that covers that month. Show it as ‘used of included on the plan’. It answers 404 billing_period_not_found when no period covers the month and 400 invalid_period when period is not a month. The SDK method is mail.billing.periodUsage(‘2026-09’).
- used and reserved count recipients, while spentKobo and reservedKobo count money. remaining is the included allowance still available for new reservations. Inspect reserved funds as well as settled spending before deciding whether a cap has room.
- GET /mail/campaigns/{id}/estimate adds recipientCount, requiredCreditKobo and blockingReasons. The amount is max(0, recipientCount - remaining) × recipientPriceKobo. An estimate is not a reservation and can change before dispatch.
- blockingReasons can contain pricing_unavailable, payment_reconciliation_required, prepaid_not_enabled, insufficient_mail_credit and period_cap_exceeded. Multiple reasons can apply. pricing_unavailable means the workspace has not enrolled or no effective pricing is available; existing pre-activation sending restrictions still govern live sends. Test estimates need no paid credit.
Owner settings and top-ups
- PUT /api/v1/mail/billing/settings accepts prepaidEnabled, capKobo and the current revision. Enabling prepaid requires a positive cap; cap covers the billing period. Reload settings after mail_billing_conflict (HTTP 409).
- POST /api/v1/mail/billing/topups accepts amountKobo (1–2,000,000,000), idempotencyKey (nonzero UUID) and optional provider. The response contains reference, authorization_url and status. Open the returned checkout URL rather than constructing a provider URL.
- POST /api/v1/mail/billing/topups/verify accepts {reference}. The server verifies provider, successful payment status, reference, amount and currency before issuing Mail credit. The return redirect alone is not proof of payment. Reusing an idempotency key for a different amount is rejected.
- Settings, checkout and verification require the signed-in billing owner in Live mode. API-token authentication is rejected with HTTP 403 billing_owner_required, even if the token has broad scopes. These writes intentionally have no server-key SDK wrapper; use Mail → Spending.
- GET /mail/billing and campaign estimates are exposed by the Go, JavaScript and Python SDKs. Test mode can read its free summary despite exhausted live allowance.
Reservation and delivery accounting
- Each message counts unique envelope recipients across To/Cc/Bcc. Immediate sends and batches reserve included allowance and any permitted prepaid amount atomically before acceptance. Idempotent retries do not reserve or charge twice.
- Campaign dispatch freezes eligible recipients and reserves the entire campaign budget before queuing recipients. Insufficient funding sends nobody. Consent is checked again before handoff; skipped recipients release unused reservations.
- Send and schedule requests accept approvedMaxKobo with revision; schedules additionally take sendAt. Scheduling estimates cost but reserves at dispatch. If the then-current cost exceeds the approved maximum or funding is insufficient, status becomes blocked with billingBlockReason. Review and use a fresh send action; the campaign does not automatically send late.
- MTA acceptance settles the reservation once. Cancellation and confirmed failure before handoff release unused resources. A later recipient bounce remains billable.
- An uncertain SMTP DATA/handoff outcome remains reserved until acceptance evidence is reconciled. It is not automatically released after a timeout. This prevents retries or ambiguous failures from causing duplicate sends/charges. Billing failures remain distinct from domain-health holds and recipient reputation failures.
Alerts and refund reconciliation
- Durable, deduplicated alerts cover 80% and 100% of allowance/cap and the first prepaid usage. Existing in-app and owner-email notification settings apply.
- Payment settlements and individual partial refund events are deduplicated. A refund affecting committed funds sets reconciliationRequired and blocks live spending without creating negative prepaid debt. It does not disable Test.
- Support reviews the payment and delivery records before live spending resumes. There is no endpoint to clear the hold yourself.
Expected result
The summary distinguishes included allowance, reserved recipients, settled spend and Mail-only credit; no additional spending begins without owner opt-in.
Related guides
StackShift Mail overview
Mail APIs and workflows: isolated simulation, explicit brands, consent-aware campaigns, engagement, domain health, migration, spending, inbound delivery and diagnostics.
Events, webhooks, and timelines
List mail events, inspect per-message timelines, subscribe webhooks, rotate secrets, retry deliveries, and verify webhook signatures.
Streams, audiences, and campaigns
Separate transactional and broadcast traffic, retain consent evidence, and build private campaign drafts with unsubscribe protection.
Test environment
Exercise delivery, bounce, complaint and delay paths with isolated Mail data and no real email delivery.