This API endpoint creates checkout URLs without requiring prior user authentication. It automatically handles user creation and returns a payment URL.
Basic Setup
Endpoint
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
Request Body
How to get price ID? Use this API: Get prices
How to get paywall ID? Go to paywall settings page and take it from URL.
For example:
https://monetize.software/en/publisher/paywalls/547
Paywall ID is 547
Required Fields
- `email` - User's email address
- `priceId` - Price identifier
Optional Fields
- `successUrl` - Redirect URL for successful payment
- `errorUrl` - Redirect URL for failed payment
- `shopUrl` - Return URL for payment system
- `trial_days` - Number of days users can access your service for free after providing payment details.
- `ignoreActivePurchase` - Allow checkout with active subscription (default: false)
Sample Implementation
Response Format
Error Handling
Common Error Responses
- 400 - Bad Request (missing parameters, invalid format)
- 401 - Unauthorized (invalid API key)
- 409 - Conflict (active purchase exists)
- 500 - Internal Server Error
Process Flow
- Validate parameters and email format
- Check URL formats
- Verify API key
- Find or create user
- Link to paywall
- Check active purchases
- Create payment session
Security Guidelines
- Store API keys securely
- Use HTTPS for all requests
- Validate email formats
- Verify URL formats
- Check for active purchases
Integration
After receiving the checkout URL, redirect the user:
Payment Status Tracking
💡 Webhooks are recommended for tracking payment status
Alternative Methods
- Monitor redirect URLs
- Use Customer Portal
Important: Webhooks provide the most reliable payment tracking, ensuring notification delivery even if users close their browsers after payment.