This API endpoint allows you to get paywall prices and their corresponding IDs.
Basic Setup
Endpoint
GET https://onlineapp.pro/api/v1/paywall/{paywallId}/prices
Authentication
Include the
x-api-key
header with your API key.How to get your API key
- Log into your account
- Navigate to "Settings" → "API Keys"
- Create new or copy existing key
Request Details
URL Parameters
paywallId
(string, required) - Your paywall identifier
Sample Implementation
const paywallId = '123'; const response = await fetch(`https://onlineapp.pro/api/v1/paywall/${paywallId}/prices`, { method: 'GET', headers: { 'Content-Type': 'application/json', 'x-api-key': 'your-secret-api-key' }, });
Response Format
{ "error": null, "data": [ { "id": 98, "unit_amount": 9.99, "interval": "month" }, { "id": 99, "unit_amount": 59.99, "interval": "year" } ], "count": null, "status": 200, "statusText": "OK" }
Error Handling
Common Error Responses
- 400 - Bad Request (missing parameters, invalid format)
- 401 - Unauthorized (invalid API key)
- 500 - Internal Server Error
Security Guidelines
- Store API keys securely
- Use HTTPS for all requests