Documentation
How to Make Requests to the Subscriptions API
All API requests must include your API key in the X-API-KEY header.
// Example: Get subscription status by email
GET /api/subscriptions/status?email=customer@email.com
Headers:
X-API-KEY: `your-api-key`
GET /api/subscriptions/status?email=customer@email.com
Headers:
X-API-KEY: `your-api-key`
// Example: JavaScript (fetch) fetch('/api/subscriptions/status?email=customer@email.com', { method: 'GET', headers: { 'X-API-KEY': 'your-api-key' } }) .then(res => res.json()) .then(data => console.log(data));
Replace the email and API key with your customer's email address and your API key.
API Key vs. Stripe API Key
- Site API Key: This is your personal key for authenticating requests to this site's API. It must be sent in the X-API-KEY header for all API calls.
- Stripe API Key: This is used by the site to connect to your Stripe account and manage payments/subscriptions on your behalf. You set your Stripe API key in your account settings. Never share your Stripe API key in API requests.
How to Get Your Stripe API Key
- Log in to your Stripe Dashboard.
- Navigate to Developers > API keys in the left sidebar.
- Copy your Secret key (starts with sk_).
- Paste your Stripe API key into your account settings on this site to enable payment features.
Keep your Stripe secret key safe. Do not share it or use it in client-side code.
Pricing Information
- API Usage: Access to the API is included with your account. Some advanced features may require a paid plan.
- Stripe Fees: Stripe charges standard processing fees for payments. See Stripe Pricing for details.
- Site Fees: Additional fees may apply for premium features. See your account billing page for details.
Quick Reference
- All API endpoints are under /api/ (e.g., /api/subscriptions/status).
- Include your API key in the X-API-KEY header.
- Set your Stripe API key in your account settings to enable payment features.