Skip to main content

Stripe Billing Integration

Rexec uses Stripe for secure payment processing and subscription management. All billing is handled through PipeOps subscriptions.

Subscription Tiers

Rexec offers three subscription tiers with different resource limits and features.

Free Tier

Cost: $0/monthContainer Limits:
  • 5 max containers
  • 2GB memory per container
  • 2 vCPUs (2000 millicores)
  • 8GB disk per container
  • 50-hour session duration
Features:
  • Cloud containers
  • Basic terminal access
  • WebSocket support
  • SSH key management
  • No agents
  • No session recording
Best For:
  • Personal projects
  • Learning and experimentation
  • Quick debugging sessions

Pro Tier

Cost: Varies by PipeOps subscriptionContainer Limits:
  • 10 max containers
  • 4GB memory per container
  • 4 vCPUs (4000 millicores)
  • 16GB disk per container
  • Unlimited session duration
Features:
  • All Free features, plus:
  • Unlimited agents
  • Concurrent agent terminals
  • Session recording
  • Multi-pane terminals
  • Priority support
  • Custom shell themes
Best For:
  • Professional developers
  • Small teams
  • Production debugging
  • Remote development

Enterprise Tier

Cost: Custom pricingContainer Limits:
  • 20 max containers
  • 8GB memory per container
  • 8 vCPUs (8000 millicores)
  • 32GB disk per container
  • Unlimited session duration
Features:
  • All Pro features, plus:
  • macOS containers (VMs)
  • Advanced monitoring
  • SSO integration
  • Dedicated support
  • Custom infrastructure
  • SLA guarantees
Best For:
  • Large organizations
  • Security-sensitive workloads
  • Compliance requirements
  • Mac development teams

Managing Your Subscription

Viewing Current Plan

From the UI:
  1. Navigate to Account → Billing
  2. Your current plan is displayed at the top
  3. View included limits and usage
Via API:
curl https://rexec.sh/api/billing/subscription \
  -H "Authorization: Bearer $TOKEN"
Response:
{
  "customer_id": "cus_...",
  "subscription_id": "sub_...",
  "tier": "pro",
  "status": "active",
  "current_period_end": "2026-04-04T10:00:00Z"
}

Upgrading Your Plan

1

Navigate to Billing

Go to Account → Billing in the Rexec UI
2

Choose Your Tier

Click Upgrade to Pro or Contact Sales for Enterprise
3

Stripe Checkout

You’ll be redirected to Stripe’s secure checkout page
  • Enter payment details
  • Review pricing and billing cycle
  • Confirm subscription
4

Confirmation

After successful payment:
  • You’re redirected back to Rexec
  • Your tier is immediately upgraded
  • New limits are applied
Via API:
curl -X POST https://rexec.sh/api/billing/checkout \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "tier": "pro"
  }'
Response:
{
  "url": "https://checkout.stripe.com/c/pay/cs_..."
}
Redirect the user to this URL for checkout.

Downgrading Your Plan

To downgrade from Pro to Free:
  1. Navigate to Account → Billing
  2. Click Manage Subscription → Opens Stripe Customer Portal
  3. Click Cancel Plan
  4. Confirm cancellation
Your subscription remains active until the end of the billing period, then:
  • Tier reverts to Free
  • Container limits reduced to 5
  • Containers exceeding limit are stopped
  • Session duration limited to 50 hours
Containers exceeding the free tier limit will be stopped but not deleted. You can restart them after removing other containers or upgrading again.

Payment Methods

Stripe Customer Portal

Manage payment methods through Stripe’s secure portal:
  1. Navigate to Account → Billing
  2. Click Manage Payment Methods
  3. You’re redirected to Stripe Customer Portal
  4. Available actions:
    • Add new card
    • Remove old cards
    • Set default payment method
    • View payment history
    • Download invoices
Direct Portal Access:
curl -X POST https://rexec.sh/api/billing/portal \
  -H "Authorization: Bearer $TOKEN"
Response:
{
  "url": "https://billing.stripe.com/p/session/..."
}
Redirect to this URL for full billing management.

Supported Payment Methods

  • Credit/Debit Cards: Visa, Mastercard, Amex, Discover
  • Digital Wallets: Apple Pay, Google Pay
  • Bank Transfers: ACH (US), SEPA (EU)
  • Other: Varies by region

Invoices and Billing History

Viewing Invoices

From UI:
  1. Account → Billing → Invoice History
  2. See all past invoices with:
    • Invoice number
    • Date and billing period
    • Amount paid
    • Payment status
    • Download PDF link
Via API:
curl https://rexec.sh/api/billing/invoices \
  -H "Authorization: Bearer $TOKEN"
Response:
[
  {
    "id": "in_...",
    "number": "A1B2C3-0001",
    "status": "paid",
    "amount_due": 2000,
    "amount_paid": 2000,
    "currency": "usd",
    "created": "2026-03-04T10:00:00Z",
    "period_start": "2026-03-04T10:00:00Z",
    "period_end": "2026-04-04T10:00:00Z",
    "invoice_pdf": "https://pay.stripe.com/invoice/.../pdf",
    "hosted_invoice_url": "https://invoice.stripe.com/i/..."
  }
]

Downloading Invoices

Click Download PDF in the Invoice History table, or use the API:
# Get invoice PDF URL
curl https://rexec.sh/api/billing/invoices/<invoice-id> \
  -H "Authorization: Bearer $TOKEN" \
  | jq -r '.invoice_pdf'

Stripe Webhooks

Rexec processes the following Stripe webhook events:

Subscription Events

Fired when a new subscription is created.Rexec Actions:
  • Update user tier in database
  • Set subscription_active = true
  • Apply new resource limits immediately
  • Send welcome email (if configured)
Fired when subscription details change (tier upgrade/downgrade, payment method update).Rexec Actions:
  • Update tier if changed
  • Adjust container limits
  • Update billing cycle info
Fired when subscription is canceled or expires.Rexec Actions:
  • Revert tier to Free
  • Set subscription_active = false
  • Stop containers exceeding free limits
  • Notify user of downgrade

Payment Events

Fired when invoice payment succeeds.Rexec Actions:
  • Log payment in database
  • Send receipt email
  • Ensure subscription remains active
Fired when payment fails (expired card, insufficient funds, etc.).Rexec Actions:
  • Set subscription status to past_due
  • Send payment failure notification
  • Retry payment per Stripe settings
  • Downgrade to free if payment fails after retries

Checkout Events

Fired when user completes Stripe Checkout.Rexec Actions:
  • Create or update subscription
  • Link customer ID to user account
  • Redirect user back to Rexec with success message

Subscription Status

Status Values

  • active - Subscription is paid and current
  • trialing - In trial period (not used by Rexec currently)
  • past_due - Payment failed, retrying
  • canceled - Subscription canceled, still active until period end
  • inactive - No active subscription

Handling Past Due Subscriptions

If your subscription is past due:
  1. Grace Period: 7 days to update payment method
  2. Restricted Access: Cannot create new containers
  3. Existing Containers: Remain running during grace period
  4. Automatic Downgrade: After 7 days, tier reverts to Free
Update Payment Method:
  1. Navigate to Account → Billing
  2. Click Update Payment Method
  3. In Stripe Portal, add new card or update existing
  4. Stripe will automatically retry the failed payment

Proration and Credits

Upgrading Mid-Cycle

When you upgrade from Free to Pro:
  • Immediate Access: Pro limits apply instantly
  • Prorated Charge: You’re charged for remaining days in the cycle
  • Example: Upgrade on day 15 of 30-day cycle = ~50% of Pro monthly price

Downgrading Mid-Cycle

When you cancel/downgrade:
  • No Immediate Downgrade: Pro features remain until period end
  • No Refund: No prorated refund for unused time
  • Scheduled Change: Downgrade takes effect on next renewal date

Changing Tiers

Upgrading from Pro to Enterprise (or vice versa):
  • Prorated Difference: Charged/credited the difference
  • Immediate Effect: New limits apply right away
Example: Pro costs 20/month,Enterprisecosts20/month, Enterprise costs 100/month. Upgrade on day 10 of 30:
Remaining value of Pro: $20 × (20/30) = $13.33
Prorated Enterprise cost: $100 × (20/30) = $66.67
Charge: $66.67 - $13.33 = $53.34

Trial and Promotional Credits

Free Trial

Rexec may offer free trials of Pro tier:
  • Duration: Typically 14 days
  • No Credit Card: Trial without payment method
  • Full Access: All Pro features enabled
  • Auto-Downgrade: Reverts to Free at end of trial

Promotional Credits

Apply promotional credits:
  1. Navigate to Account → Billing
  2. Click Apply Promo Code
  3. Enter code and click Apply
  4. Credit is applied to your Stripe customer account
  5. Used automatically on next invoice
Via API:
curl -X POST https://rexec.sh/api/billing/promo \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "WELCOME2026"
  }'

Usage-Based Billing (Future)

Rexec currently uses fixed-tier pricing. Usage-based billing is planned for future releases.
Planned Metrics:
  • Container-hours (running time)
  • Data transfer (egress)
  • Session recording storage
  • Agent connection hours

API Reference

Get Subscription Info

GET /api/billing/subscription
Authorization: Bearer {token}
Response:
{
  "customer_id": "cus_...",
  "subscription_id": "sub_...",
  "tier": "pro",
  "status": "active",
  "current_period_end": "2026-04-04T10:00:00Z"
}

Create Checkout Session

POST /api/billing/checkout
Authorization: Bearer {token}
Content-Type: application/json

{
  "tier": "pro"
}
Response:
{
  "url": "https://checkout.stripe.com/c/pay/cs_...",
  "session_id": "cs_..."
}

Get Portal Session

POST /api/billing/portal
Authorization: Bearer {token}
Response:
{
  "url": "https://billing.stripe.com/p/session/..."
}

List Invoices

GET /api/billing/invoices?limit=10
Authorization: Bearer {token}

Troubleshooting

Common Reasons:
  • Expired credit card
  • Insufficient funds
  • Card declined by bank
  • Incorrect billing details
Resolution:
  1. Check email for payment failure notification
  2. Navigate to Account → Billing → Manage Payment Methods
  3. Update or add new payment method
  4. Stripe will automatically retry
  5. Or manually retry from Stripe Portal
If you completed checkout but still see Free tier:
  1. Wait 60 seconds - Webhook processing may be delayed
  2. Refresh page - Clear cache and reload
  3. Check email - Confirm payment receipt from Stripe
  4. Verify in Stripe Portal - Subscription should show as active
  5. Contact Support - If issue persists after 5 minutes
Debug:
curl https://rexec.sh/api/billing/subscription \
  -H "Authorization: Bearer $TOKEN"
Check status and tier fields.
After upgrading to Pro, if you still can’t create more than 5 containers:
  1. Sign out and back in - Refresh session token with new tier
  2. Check subscription status - Ensure active
  3. Verify in database - Admin can check subscription_active flag
Workaround:
# Refresh token manually
curl -X POST https://rexec.sh/api/auth/refresh \
  -H "Content-Type: application/json" \
  -d '{"refresh_token": "your-refresh-token"}'
If you see multiple charges:
  1. Check invoice details - May be separate subscriptions
  2. Verify in Stripe Portal - View all active subscriptions
  3. Cancel duplicates - Keep only one Pro subscription
  4. Request refund - Contact [email protected] with invoice numbers
Stripe automatically prevents duplicate charges for the same subscription.

Security and Compliance

PCI Compliance

Rexec is PCI-DSS compliant through Stripe:
  • No card storage - Rexec never sees or stores card numbers
  • Stripe Elements - Secure payment forms
  • TLS encryption - All payment data encrypted in transit
  • Tokenization - Cards stored as secure tokens

Data Privacy

What Rexec Stores:
  • Stripe Customer ID (linked to your user account)
  • Subscription ID and status
  • Current tier and limits
  • Invoice metadata
What Rexec Never Stores:
  • Credit card numbers
  • CVV codes
  • Full billing addresses (Stripe handles this)

GDPR and Data Deletion

To delete your billing data:
  1. Cancel subscription in Stripe Portal
  2. Navigate to Account → Settings → Delete Account
  3. Confirm deletion
This triggers:
  • Account deletion in Rexec
  • Customer deletion request to Stripe (processed per Stripe retention policy)
  • All container data wiped
  • Invoices remain in Stripe for tax compliance (per legal requirements)

Enterprise Billing

For Enterprise tier:
  • Custom Quotes - Contact [email protected]
  • Annual Billing - Discounted pricing available
  • Purchase Orders - PO processing supported
  • Multi-Seat Licensing - Team/organization plans
  • Invoice Payment - Net-30 terms for qualified customers
  • Custom Contracts - MSA and DPA available
Reach out to our sales team for enterprise pricing and contracting.

Build docs developers (and LLMs) love