Payments
StyleGrab uses Stripe for subscription billing.
Plans
| Plan | Price | Extractions | Teams | Features |
|---|---|---|---|---|
| Free | $0/mo | 50/month | 1 | Basic extraction |
| Pro | $29/mo | 1,000/month | 5 | Webhooks, diffing, priority |
| Enterprise | Custom | Unlimited | Unlimited | SLA, dedicated support |
Endpoints
Create Checkout Session
Start a Stripe checkout flow.
POST /api/payments/checkout
Request Body:
{
"plan": "pro",
"success_url": "https://yoursite.com/success",
"cancel_url": "https://yoursite.com/cancel"
}
Response:
{
"checkout_url": "https://checkout.stripe.com/c/pay/cs_test_..."
}
Redirect the user to checkout_url to complete payment.
Customer Portal
Get a link to the Stripe customer portal for managing subscriptions.
POST /api/payments/portal
Request Body:
{
"return_url": "https://yoursite.com/dashboard"
}
Response:
{
"portal_url": "https://billing.stripe.com/p/session/..."
}
The customer portal allows users to:
- Update payment method
- View invoices
- Cancel subscription
- Change plan
Subscription Status
Get the current subscription status.
GET /api/payments/status
Response:
{
"plan": "pro",
"status": "active",
"current_period_end": "2024-02-15T00:00:00Z",
"cancel_at_period_end": false,
"usage": {
"extractions_used": 342,
"extractions_limit": 1000,
"reset_date": "2024-02-01T00:00:00Z"
}
}
Status Values
| Status | Description |
|---|---|
active | Subscription is active |
past_due | Payment failed, retrying |
canceled | Subscription ended |
trialing | In trial period |
Stripe Webhooks
StyleGrab processes Stripe webhooks automatically. No action needed, but for reference:
| Event | Action |
|---|---|
checkout.session.completed | Activate subscription |
invoice.paid | Renew subscription |
invoice.payment_failed | Mark as past due |
customer.subscription.deleted | Deactivate subscription |
Usage Limits
When you exceed your plan’s extraction limit:
{
"error": {
"code": "usage_limit_exceeded",
"message": "Monthly extraction limit reached (50/50). Upgrade to Pro for more.",
"upgrade_url": "https://stylegrab.dev/pricing"
}
}
Enterprise
For custom plans, volume discounts, or SLAs, contact sales@stylegrab.dev.
Enterprise features:
- Unlimited extractions
- Dedicated infrastructure
- Custom SLA (99.9% uptime)
- Priority support
- SSO/SAML authentication
- Audit logs