Introduction
Welcome to the FlexPrice API
The FlexPrice API enables you to programmatically manage pricing, subscriptions, and billing for your SaaS application. This documentation will help you integrate FlexPrice into your application.
Base URL
All API requests should be made to:
Authentication
All API endpoints require authentication using an API Key. These are the keys you get when you create a new API key in the FlexPrice Dashboard.
Drop us an email at support@flexprice.io if you need help getting an API key.
Response Format
All API responses follow a consistent JSON format:
Core Resources
Plans
Plans represent your product’s pricing tiers. Each plan can contain multiple prices with different billing models.
Key Endpoints:
GET /plans
- List all plansGET /plans/{id}
- Retrieve a specific planPUT /plans/{id}
- Update a planDELETE /plans/{id}
- Delete a plan
Plan Properties:
name
- Name of the plandescription
- Detailed descriptionlookup_key
- Unique identifier for the planinvoice_cadence
- Billing frequencytrial_period
- Trial period in daysprices
- Array of associated prices
Prices
Prices define how you charge for your products/services, supporting various billing models and cadences.
Key Endpoints:
GET /prices
- List all pricesPOST /prices
- Create a new priceGET /prices/{id}
- Retrieve a specific pricePUT /prices/{id}
- Update a priceDELETE /prices/{id}
- Delete a price
Price Properties:
amount
- Price amount in main currency units (e.g., dollars)currency
- 3-letter ISO currency code (e.g., “usd”)billing_model
- Pricing model (FLAT_FEE, PACKAGE, TIERED)billing_cadence
- Frequency (RECURRING, ONETIME)billing_period
- Period (month, year)billing_period_count
- Number of periodsdisplay_amount
- Formatted amount with currency symbol (e.g., “$12.50”)
Wallets
Wallets manage customer balances and payment methods.
Key Endpoints:
POST /wallets
- Create a new walletGET /wallets/{id}
- Retrieve wallet details
Users
Manage user accounts and authentication.
Key Endpoints:
GET /users/me
- Get current user infoPOST /auth/login
- Authenticate userPOST /auth/signup
- Create new user account
Error Handling
The API uses standard HTTP response codes:
200
- Success201
- Created400
- Bad Request401
- Unauthorized404
- Not Found500
- Internal Server Error
Error responses include detailed information:
Need Help?
- Email: support@flexprice.io
- Documentation Updates: docs.flexprice.io