v2.3 — Subscription Pausing, Invoice Drafts, and Test Clock GA
· 2 min read
v2.3 ships subscription pausing, invoice draft mode, and graduates Test Clocks to general availability.
Subscription pausing
You can now pause and resume subscriptions without canceling them. Pausing stops billing cycles — no invoice is generated during the pause period.
# Pause a subscription
curl https://api.meridian.dev/v1/subscriptions/sub_123 \
-u sk_test_4eC39HqL...: \
-d "pause_collection[behavior]"=void
# Resume
curl https://api.meridian.dev/v1/subscriptions/sub_123 \
-u sk_test_4eC39HqL...: \
-d pause_collection=
Two pause behaviors are supported:
void— Invoice is voided; customer is not charged for the pause periodkeep_as_draft— Invoice stays as a draft; customer is charged when resumed
Invoice draft mode (GA)
Invoice drafts launched in beta in v2.2. In v2.3, draft mode is now generally available and recommended for all invoice workflows.
Create invoices in draft mode, add line items, then finalize when ready:
// Create draft
const invoice = await meridian.invoices.create({
customer: 'cus_123',
auto_advance: false, // stays as draft
});
// Add line items
await meridian.invoiceItems.create({
customer: 'cus_123',
invoice: invoice.id,
amount: 4999,
currency: 'usd',
description: 'Enterprise seat – April',
});
// Finalize and send
await meridian.invoices.finalizeInvoice(invoice.id);
await meridian.invoices.sendInvoice(invoice.id);
Test Clocks (GA)
Test Clocks — introduced in beta in v2.1 — are now generally available. Use them to simulate the passage of time in test mode without waiting for real time to pass.
See the Test Mode docs for usage examples.
Other improvements
Customerobjects now includebalance(in cents) representing prepaid credit or outstanding debtInvoice.paid_out_of_bandflag for marking invoices paid outside Meridian (e.g., wire transfer)- Rate limit headers (
X-RateLimit-Limit,X-RateLimit-Remaining,X-RateLimit-Reset) added to all responses