Skip to main content
POST
https://api.gtmapis.com
/
v1
/
subscriptions
/
reactivate
curl -X POST https://api.gtmapis.com/v1/subscriptions/reactivate \
  -H "X-API-Key: gtm_test_your_key_here"
{
  "subscription_id": "sub_1ABC123def456GHI",
  "status": "active",
  "cancel_at_period_end": false,
  "current_period_end": "2026-02-07T00:00:00Z",
  "message": "Subscription reactivated successfully"
}

Authentication

X-API-Key
string
required
Your API key (format: gtm_test_... or gtm_live_...)

Behavior

  • Instant Reactivation: Sets cancel_at_period_end=false immediately
  • Credit Restoration: All credits remain available (nothing lost)
  • Billing Continues: Future periods will be billed normally
  • Must Be Within Period: Can only reactivate before period ends

Response

subscription_id
string
Stripe subscription ID
status
string
Subscription status (active)
cancel_at_period_end
boolean
Set to false after successful reactivation
current_period_end
string
Next billing date (ISO 8601 timestamp)
{
  "subscription_id": "sub_1ABC123def456GHI",
  "status": "active",
  "cancel_at_period_end": false,
  "current_period_end": "2026-02-07T00:00:00Z",
  "message": "Subscription reactivated successfully"
}
curl -X POST https://api.gtmapis.com/v1/subscriptions/reactivate \
  -H "X-API-Key: gtm_test_your_key_here"

When To Use This

Changed Your Mind

You canceled but realized you still need the service:
// Cancelled yesterday, but need to reactivate today
const sub = await fetch('/v1/subscriptions/current', {
  headers: { 'X-API-Key': apiKey }
}).then(r => r.json());

if (sub.cancel_at_period_end) {
  // Reactivate before losing access
  await fetch('/v1/subscriptions/reactivate', {
    method: 'POST',
    headers: { 'X-API-Key': apiKey }
  });
}

Accidental Cancellation

You didn’t mean to cancel:
// Immediate undo
await fetch('/v1/subscriptions/reactivate', {
  method: 'POST',
  headers: { 'X-API-Key': apiKey }
});

Temporary Pause Strategy

Cancel at end of month, reactivate when needed:
// End of campaign - pause billing
await fetch('/v1/subscriptions/cancel', {
  method: 'POST',
  headers: { 'X-API-Key': apiKey }
});

// New campaign starting - reactivate
await fetch('/v1/subscriptions/reactivate', {
  method: 'POST',
  headers: { 'X-API-Key': apiKey }
});

What Happens After Reactivation

Immediate (after API call)

  • cancel_at_period_end flag set to false
  • ✅ Stripe webhook customer.subscription.updated triggered
  • ✅ You receive confirmation message
  • ✅ Billing will continue at period end

At Next Period (e.g., Feb 7)

  • ✅ Credits reset to full amount (20,000 or 50,000)
  • ✅ New billing period starts
  • ✅ Payment method charged automatically
  • ✅ Service continues uninterrupted

Error Responses

404 Not Found

No subscription to reactivate:
{
  "error": "Not Found",
  "message": "No subscription found"
}

409 Conflict

Subscription is not set to cancel (already active):
{
  "error": "Conflict",
  "message": "Subscription is not set to cancel"
}

410 Gone

Too late - subscription already canceled at period end:
{
  "error": "Gone",
  "message": "Subscription has already been canceled. Please create a new subscription."
}

Important Notes

Timing Matters

Can Reactivate ✅:
  • Before period end date (e.g., Jan 7 - Feb 6 23:59 UTC)
  • While status is still active with cancel_at_period_end=true
Cannot Reactivate ❌:
  • After period end date (e.g., Feb 7 00:00 UTC onwards)
  • When status is canceled
  • Must create new subscription instead

No Credit Loss

Reactivating restores everything:
  • Same subscription ID
  • Same plan (Starter or Agency)
  • All remaining credits preserved
  • No interruption in service

Billing Implications

Reactivating means:
  • You’ll be charged at next period end
  • Billing cycle continues from current period
  • No prorated charges for reactivation