Skip to main content
CodePlanet Docs

Subscription Lifecycle

Managing your subscription

Understand how subscriptions work in CodePlanet — from purchase to renewal, cancellation, and reactivation.

Subscription States

┌──────────┐     ┌──────────┐     ┌──────────┐
│  FREE    │────▶│  ACTIVE  │────▶│ CANCELLED│
└──────────┘     └────┬─────┘     └──────────┘
      ▲               │                 │
      │               ▼                 ▼
      │          ┌──────────┐     ┌──────────┐
      └──────────│ EXPIRED  │◀────│ EXPIRING │
                 └──────────┘     └──────────┘

State Definitions

StateDescription
FREENo active subscription, using free tier
ACTIVEPaid subscription is active and current
EXPIRINGCancelled but time remaining
EXPIREDSubscription period ended
CANCELLEDUser cancelled, no access

Purchase Flow

1. User Selects Plan

┌─────────────────────────────────────────────────────────┐
│              Choose Your Plan                            │
├─────────────────────────────────────────────────────────┤
│                                                         │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐     │
│  │    FREE     │  │  DEVELOPER  │  │     PRO     │     │
│  │   ₹0/mo     │  │  ₹299/mo    │  │  ₹799/mo    │     │
│  │             │  │             │  │             │     │
│  │ • 10 probs  │  │ • Unlimited │  │ • Unlimited │     │
│  │ • Basic     │  │ • API access│  │ • Everything│     │
│  │             │  │             │  │ • Priority  │     │
│  └─────────────┘  └─────────────┘  └─────────────┘     │
│                                                         │
└─────────────────────────────────────────────────────────┘

2. Payment Processing

User clicks "Subscribe"


   Create Razorpay Order
   (POST /api/v1/payments/create)


   Razorpay Checkout Opens


   User Completes Payment


   Verify Signature
   (POST /api/v1/payments/verify)


   Activate Subscription

3. Subscription Activated

  • User's plan is updated in database
  • Features unlocked immediately
  • Welcome email sent
  • Dashboard reflects new plan

Billing Cycle

Monthly Subscriptions

  • Billed on the same date each month
  • If the date doesn't exist (e.g., 31st), billed on last day of month
  • Payment attempted 3 days before renewal

Annual Subscriptions (Planned)

  • 2 months free (pay for 10, get 12)
  • Billed once per year
  • Renewal reminder 7 days before

Cancellation

How to Cancel

  1. Go to Settings → Subscription
  2. Click "Cancel Subscription"
  3. Confirm cancellation
  4. Access continues until period ends

What Happens

  • State changes to EXPIRING
  • Features remain until period ends
  • No future charges
  • Can reactivate anytime

Grace Period

After expiration, you have 7 days to reactivate at the same rate before being moved to FREE tier.

Reactivation

From EXPIRING

If you cancelled but still have time remaining:

  1. Go to Settings → Subscription
  2. Click "Reactivate"
  3. Cancellation is reversed
  4. Billing continues as normal

From EXPIRED

If your subscription expired:

  1. Go to Pricing
  2. Select your plan
  3. Complete payment
  4. Access restored immediately

Plan Changes

Upgrading

Upgrading takes effect immediately:

Developer → Pro

1. Prorated credit calculated
2. New plan price charged
3. Difference applied to next billing
4. Pro features unlocked instantly

Example:

  • 15 days left on Developer (₹299)
  • Upgrading to Pro (₹799)
  • Credit: ₹299 × (15/30) = ₹150
  • Charge: ₹799 - ₹150 = ₹649

Downgrading

Downgrading takes effect at next billing:

Pro → Developer

1. Current period continues as Pro
2. Next billing charges Developer rate
3. Features change at next period

Failed Payments

If a payment fails:

AttemptTimingAction
1stDue dateEmail notification
2nd+3 daysEmail + dashboard warning
3rd+7 daysFinal warning
4th+10 daysSubscription cancelled

Updating Payment Method

  1. Go to Settings → Billing
  2. Click "Update Payment Method"
  3. Enter new card/UPI
  4. Retry failed payment

Refunds

Refund Policy

  • Within 7 days: Full refund, no questions asked
  • After 7 days: Prorated refund minus transaction fees
  • Abuse: No refund for ToS violations

How to Request

  1. Email support@acodeplanet.tech
  2. Include order ID and reason
  3. Refund processed within 5-7 business days

Subscription Data

API

// GET /api/v1/user/subscription
{
  plan: "pro",
  status: "active",
  currentPeriodStart: "2024-01-01T00:00:00Z",
  currentPeriodEnd: "2024-02-01T00:00:00Z",
  cancelAtPeriodEnd: false,
  paymentMethod: {
    type: "card",
    last4: "4242",
    expiryMonth: 12,
    expiryYear: 2025
  }
}

Webhooks

Subscribe to these events:

  • subscription.created
  • subscription.updated
  • subscription.cancelled
  • subscription.expired

FAQ

Can I pause my subscription?

Not currently. You can cancel and reactivate later.

What happens to my data if I cancel?

Your data is retained for 1 year. You can export anytime.

Can I switch between monthly and annual?

Annual plans are planned for a future release. Currently, only monthly billing is available.

Do you offer student discounts?

Yes! Email support with your .edu email for 50% off.

Is there a team plan?

Planned for a future release. Join the waitlist at acodeplanet.tech/teams.

Next Steps