Frequently Asked Questions (FAQ)
Quick answers to common questions about Paysera Recurring Billing API.
Use the tabs below to find answers by category. Click any question to expand the answer.
- 🔰 General
- 🔧 Integration
- 💻 Technical
- 🔐 Security
- ⚠️ Troubleshooting
- 📋 Compliance
- ✨ Best Practices
General Questions
What is recurring billing?
Recurring billing allows you to charge customers automatically on a regular schedule (monthly, yearly, etc.) without requiring them to manually authorize each payment.
Key Features:
- Automatic subscription payments
- Token-based authorization
- Variable billing amounts
- Flexible billing schedules
- Secure card tokenization
How it works:
- Customer makes initial payment with user interaction
- System obtains a recurring billing token
- Future charges use the token (no customer interaction needed)
How does recurring billing work?
The recurring billing flow:
-
Initial Payment (with user interaction)
- Create payment request with
token_strategy: "required" - Customer completes payment on Paysera page
- Receive notification with
issued_token
- Create payment request with
-
Store Token
- Save the token securely in your database
- Link token to customer/subscription
-
Future Charges (automatic)
- Create payment request with stored token
- Authorize payment via API
- No customer interaction needed
Is recurring billing available for all payment methods?
No. Recurring billing supports cards only:
- ✅ Credit/debit cards (Visa, Mastercard), entered in the card form
Not supported:
- ❌ Bank payments and bank accounts
- ❌ Apple Pay and Google Pay
- ❌ Other payment methods
Note: The first payment must be made by card for a token to be issued.
Do I need a special account to use recurring billing?
Your project must be approved by Paysera before recurring billing is enabled.
Recurring billing is not available by default on a new account. To use it you need:
- ✅ A registered Paysera account
- ✅ A Checkout project
- ✅ Approval from Paysera support to enable recurring billing
- ✅ MAC credentials issued to you after approval
The approval step exists because Paysera needs to review how you intend to use recurring billing before enabling it for your project.
What are the typical use cases?
Common scenarios:
- 🔄 Subscriptions - Monthly/yearly software subscriptions
- 📦 Membership Fees - Gym memberships, clubs
- 📰 Content Access - News sites, streaming services
- 🏢 SaaS Products - Cloud services, web applications
- 💼 Professional Services - Retainer agreements
- 🎓 Education - Course subscriptions, online learning
Integration Questions
How do I enable recurring billing?
To enable recurring billing:
- Include
token_strategy: "required"in initial payment request - Process the notification callback
- Extract and store the
issued_tokenfrom notification data
Example payment request:
{
"business_id": "your_business_id",
"order_id": "SUB_12345",
"price": { "amount": "9.99", "currency": "EUR" },
"description": "Monthly subscription",
"payer": { "email": "customer@example.com" },
"token_strategy": "required",
"accept_url": "https://yoursite.com/success",
"cancel_url": "https://yoursite.com/cancel",
"callback_url": "https://yoursite.com/callback"
}
After successful payment, the notification will include issued_token field.
How long does integration take?
Typical timeline:
| Experience Level | Estimated Time |
|---|---|
| Experienced developer | 4-8 hours |
| Intermediate developer | 1-2 days |
| Learning as you go | 2-4 days |
Time includes:
- API authentication setup
- Initial payment implementation
- Callback handling
- Token storage
- Recurring charge implementation
- Testing
Do I need HTTPS/SSL certificate?
Yes, HTTPS is required!
Reasons:
- 🔒 Security for payment data
- ✅ Required for callback URL
- 🛡️ PCI DSS compliance
- 🌐 Browser requirements
Note: Most hosting providers offer free SSL certificates via Let's Encrypt.
What programming languages are supported?
Any language that can make HTTP requests!
Official libraries:
- PHP (Recurring Billing API client)
- PHP (Notification Event API client)
Custom integration (any other language):
- Call the REST API directly
- Implement MAC authentication yourself
- See the Examples page for sample implementations in JavaScript, Python, and PHP
Can I use Recurring Billing API with mobile apps?
Yes! Two approaches:
-
WebView (Recommended)
- Open payment page in app's browser
- Handles 3D Secure automatically
- Simplest integration
-
Backend API
- Process through your server
- App communicates with your backend
- Your backend handles Paysera API
Best practice: Never store MAC credentials in mobile apps - always use backend API.
Technical Questions
What is a callback URL and why is it needed?
Callback URL is where Paysera sends payment status notifications.
Why it's critical:
- 🔔 Real-time payment status updates
- 🔐 Secure confirmation (cannot be faked by user)
- 🎯 Delivers the recurring billing token
- ⚡ Triggers order fulfillment
Requirements:
- Must be publicly accessible (not localhost)
- Must use HTTPS
- Should respond quickly (< 10 seconds)
- Must return "OK" for successful processing
How do I authenticate API requests?
MAC Authentication is used for all API requests.
Authentication header format:
Authorization: MAC id="your_mac_id",
ts="1234567890",
nonce="random_string",
mac="calculated_hash"
Parameters:
id- Your MAC IDts- Unix timestampnonce- Random unique stringmac- HMAC-SHA256 signature
How long is a billing token valid?
A token has no expiry date. It can be used until a charge with it is refused, for example because the card expired or was replaced.
- No event is sent when a token stops working; it shows up only as a failed charge
- A token works only with the credentials that created it
Best practices:
- Handle refused charges gracefully
- Prompt customer to update payment method after a refused charge
Can I charge different amounts each time?
Yes! Variable amounts are supported.
Use cases:
- 📊 Usage-based billing (charge by usage)
- 💰 Tiered subscriptions (different plans)
- 📈 Annual price increases
- 🎁 Promotional discounts
- ⚖️ Proration for upgrades/downgrades
Each recurring charge can specify a different amount and currency.
How do I cancel a subscription?
Simply stop charging the token.
No API call needed to "cancel" a token. Just:
- Update subscription status in your database
- Stop sending recurring payment requests
- (Optional) Notify customer via email
Customer-initiated cancellation:
- Provide cancellation UI in your app
- Mark subscription as cancelled
- Stop processing charges
What happens if a recurring charge fails?
No notification is sent for a failed or declined charge. Only payment_request.captured and payment_request.checkout_token_issued events exist.
The charge request answers immediately: on failure it returns an error with the reason in error_description, and the payment request stays new.
Possible error_description values:
- 💰
Insufficient funds - 🏦
Failed to authorize payment - 💳
Invalid card number - 📅
Expired card - 🚫
Restricted card
Other declines, for example a replaced card or a deactivated token, can come back as Unexpected issue occurred, please try again later. That answer and Service is unavailable. can also be technical errors: repeat the request for the same payment request instead of creating a new one, as a repeat checks the earlier attempt first. See Repeating a request.
Best practices:
- Retry a declined charge (for example
Insufficient funds) later; after a technical error or a timeout, repeat the request for the same payment request - Notify customer immediately
- Provide payment update option
- Suspend service after retries exhausted
Security Questions
Is Recurring Billing API secure?
Yes! Multiple security layers:
- 🔒 HTTPS encryption for all communications
- ✅ MAC authentication for request signing
- 🏦 PCI DSS Level 1 compliant
- 🔐 3D Secure for card payments
- 📝 Transaction logging and monitoring
- 🛡️ Fraud detection systems
Your responsibilities:
- Keep MAC credentials secret
- Validate callback signatures
- Use HTTPS on your site
- Secure token storage
How do I secure the billing token?
Token security best practices:
DO:
- ✅ Store in encrypted database columns
- ✅ Restrict access to authorized personnel
- ✅ Use secure connections (HTTPS/TLS)
- ✅ Implement access controls
- ✅ Log token usage
DON'T:
- ❌ Expose in client-side code
- ❌ Include in URLs or logs
- ❌ Send via email or chat
- ❌ Store in plain text
- ❌ Share across systems unnecessarily
How do I verify callback authenticity?
Always validate the MAC signature!
Callbacks must be validated to prevent fraud. The notification includes authentication in the request headers.
Security measures:
- Verify MAC signature
- Check timestamp to prevent replay attacks
- Validate notification ID is unique
- Use HTTPS for callback URL
Never trust callback data without verification!
Where should I store MAC credentials?
Security best practices:
DO:
- ✅ Store in environment variables
- ✅ Use secure config files (outside web root)
- ✅ Use secrets management services
- ✅ Encrypt at rest
- ✅ Limit access to authorized personnel
DON'T:
- ❌ Hardcode in source code
- ❌ Commit to version control (Git)
- ❌ Store in public repositories
- ❌ Send via email or chat
- ❌ Include in client-side code
What if my MAC credentials are compromised?
Immediate actions: