Overview
TelemanAI supports multiple payment gateways, allowing you to accept payments through various methods worldwide. The platform uses a flexible payment service architecture that makes it easy to process payments through your preferred gateway.Payment gateways must be configured by your administrator in the
.env configuration file before they become available for use.Supported Payment Gateways
TelemanAI supports the following payment gateways:Stripe
Global payment processor supporting credit cards, debit cards, and digital wallets
PayPal
Popular digital wallet and payment platform with worldwide coverage
Razorpay
Leading payment gateway for India supporting UPI, cards, and net banking
Flutterwave
African payment gateway supporting cards, mobile money, and bank transfers
Paystack
Modern payment infrastructure for Africa with card and bank account support
Instamojo
Indian payment gateway for cards, UPI, wallets, and net banking
Squad
Nigerian payment processor supporting cards and bank transfers
Mollie
European payment service provider with extensive local payment methods
Square
Payment processing solution popular in North America
Payment Gateway Configuration
Each payment gateway requires specific API credentials to function. These are configured in the.env file by your system administrator.
Stripe Configuration
Stripe Setup
Stripe Setup
Stripe is a powerful payment processor that supports credit and debit cards globally.Required Environment Variables:Features:
.env
- Instant payment processing
- Support for major credit/debit cards
- PCI DSS compliant
- Built-in fraud protection
- Supports 135+ currencies
- Sign up at stripe.com
- Navigate to Developers > API keys
- Copy your Publishable key and Secret key
- Use test keys for development, live keys for production
PayPal Configuration
PayPal Setup
PayPal Setup
PayPal enables users to pay using their PayPal balance, bank account, or credit card.Required Environment Variables:Features:
.env
- Trusted payment method worldwide
- Support for PayPal balance and linked accounts
- Buyer protection included
- Multiple currency support
- Mobile-optimized checkout
- Sign up for a PayPal Business account
- Go to Dashboard > Apps & Credentials
- Create a new app or use an existing one
- Copy your Client ID and Secret
- Use sandbox credentials for testing
PayPal redirects users to PayPal’s website for payment, then returns them to your application.
Razorpay Configuration
Razorpay Setup
Razorpay Setup
Razorpay is India’s leading payment gateway supporting multiple payment methods.Required Environment Variables:Features:
.env
- UPI payments (Google Pay, PhonePe, etc.)
- Credit and debit cards
- Net banking
- Digital wallets (Paytm, Mobikwik, etc.)
- EMI options
- International cards
- Sign up at razorpay.com
- Complete KYC verification
- Navigate to Settings > API Keys
- Generate new API keys
- Copy Key Id and Key Secret
Razorpay requires webhook configuration for payment verification. The platform handles this automatically.
Flutterwave Configuration
Flutterwave Setup
Flutterwave Setup
Flutterwave provides payment infrastructure across Africa.Required Environment Variables:Features:
.env
- Cards (Visa, Mastercard, Verve)
- Mobile money (MTN, Vodafone, etc.)
- Bank accounts
- USSD payments
- Multiple African currencies
- Sign up at flutterwave.com
- Complete business verification
- Go to Settings > API
- Copy Public Key, Secret Key, and Encryption Key
Paystack Configuration
Paystack Setup
Paystack Setup
Paystack is a modern payment gateway for African businesses.Required Environment Variables:Features:
.env
- Card payments
- Bank transfers
- USSD
- Mobile money
- Subscriptions
- Split payments
- Sign up at paystack.com
- Verify your business
- Navigate to Settings > API Keys & Webhooks
- Copy your test or live keys
Instamojo Configuration
Instamojo Setup
Instamojo Setup
Instamojo is an Indian payment gateway with simple integration.Required Environment Variables:Features:
.env
- Credit/debit cards
- Net banking
- UPI
- Wallets
- EMI options
- Sign up at instamojo.com
- Go to Settings > API & Plugins
- Generate API credentials
- Copy API Key and Auth Token
Squad Configuration
Squad Setup
Squad Setup
Squad is a Nigerian payment gateway.Required Environment Variables:Features:
.env
- Card payments
- Bank transfers
- Virtual accounts
- NGN and USD support
- Sign up at squadco.com
- Navigate to Settings > API Keys
- Generate or copy existing keys
Mollie Configuration
Mollie Setup
Mollie Setup
Mollie is a European payment service provider.Required Environment Variables:Features:
.env
- Credit cards
- iDEAL (Netherlands)
- SEPA bank transfers
- PayPal
- Apple Pay / Google Pay
- 30+ local payment methods across Europe
- Sign up at mollie.com
- Go to Developers > API keys
- Copy your test or live API key
Square Configuration
Square Setup
Square Setup
Square is a popular payment processor in North America.Required Environment Variables:Features:
.env
- Credit/debit cards
- Digital wallets
- ACH bank transfers
- Gift cards
- Buy now, pay later options
- Sign up at squareup.com
- Go to Developer Dashboard
- Create an application
- Copy Application ID, Access Token, and Location ID
Payment Processing Flow
Understand how payments are processed in TelemanAI:Payment Initialization
TelemanAI sends payment details to the selected gateway:
- Amount
- Currency
- User email
- Description
- Return URL for callbacks
Gateway Processing
Payment gateway handles the transaction:
- For card payments: Process immediately
- For redirect methods (PayPal): Redirect user to gateway site
- For mobile money: Display payment instructions
Payment Verification
Gateway sends response back to TelemanAI:
- Success: Transaction ID and payment confirmation
- Failure: Error message and reason
Payment Verification
All payment gateways use secure verification methods:Stripe
- Instant verification via API response
- Transaction ID provided immediately
- Webhook notifications for additional security
PayPal
- User redirected to PayPal
- Payment completed on PayPal site
- User returned to TelemanAI with payment confirmation
- Callback handler verifies payment with PayPal API
Razorpay
- Frontend checkout modal
- Payment signature verification
- Server-side confirmation via API
- Webhook for payment status updates
All gateways use HTTPS encryption and follow PCI DSS compliance standards for secure payment processing.
Supported Currencies
Different payment gateways support different currencies:| Gateway | Primary Currencies | Notes |
|---|---|---|
| Stripe | USD, EUR, GBP, and 135+ others | Most flexible for international payments |
| PayPal | USD, EUR, GBP, CAD, AUD, and 25+ others | Depends on merchant account country |
| Razorpay | INR, USD | Best for Indian customers |
| Flutterwave | NGN, GHS, KES, UGX, TZS, ZAR | African currencies |
| Paystack | NGN, GHS, ZAR, USD | African focus with USD support |
| Instamojo | INR | India only |
| Squad | NGN, USD | Nigerian Naira and US Dollar |
| Mollie | EUR and 30+ others | Focused on European payments |
| Square | USD, CAD, GBP, AUD, JPY | North America and select countries |
Testing Payments
All payment gateways provide test/sandbox modes for development:Test Mode Best Practices
Use Test Credentials
Always use test API keys during development:
- Stripe: Keys starting with
pk_test_andsk_test_ - Razorpay: Keys starting with
rzp_test_ - Others: Sandbox or test credentials from dashboard
Test Card Numbers
Use gateway-provided test cards:Stripe Test Cards:
- Success: 4242 4242 4242 4242
- Decline: 4000 0000 0000 0002
- Requires Auth: 4000 0027 6000 3184
- Success: 4111 1111 1111 1111
- OTP: 1234 (for test mode)
Verify Callbacks
Test payment callbacks and webhook handling:
- Successful payments
- Failed payments
- Pending payments
- Refunds
Troubleshooting Payment Issues
Payment gateway not appearing
Payment gateway not appearing
Problem: Payment gateway doesn’t show up as an optionSolutions:
- Verify gateway is enabled in
.env:STRIPE="YES" - Check API credentials are correctly configured
- Clear application cache:
php artisan cache:clear - Verify gateway is registered in
PaymentService.php
Payment fails with API error
Payment fails with API error
Problem: Payment returns an error from the gatewaySolutions:
- Verify API credentials are correct and active
- Check if using correct environment (test vs production)
- Ensure payment amount meets gateway minimums
- Review gateway dashboard for specific error messages
- Check currency is supported by the gateway
Payment succeeds but subscription not activated
Payment succeeds but subscription not activated
Problem: Payment completes but package not assignedSolutions:
- Check payment callback URL is accessible
- Verify webhook endpoints are configured
- Review application logs for errors
- Manually verify payment in gateway dashboard
- Check database for payment_histories record
- Contact support with transaction ID
Callback URL errors
Callback URL errors
Problem: Payment redirects fail or timeoutSolutions:
- Verify callback URLs are correctly configured in
.env - Ensure URLs are accessible from internet (not localhost)
- Check SSL certificate is valid
- Add callback URLs to gateway dashboard
- Test URL accessibility with curl or Postman
Currency mismatch errors
Currency mismatch errors
Problem: Gateway rejects payment due to currency issuesSolutions:
- Verify gateway supports the payment currency
- Check currency is correctly set in
.env - Ensure package prices use supported currency
- Convert amounts if necessary
Security Best Practices
- Never expose API secrets - Keep credentials in
.envfile only - Use HTTPS - Always serve your application over SSL
- Validate callbacks - Verify payment signatures and IDs
- Log transactions - Maintain audit trail of all payments
- Use test mode - Never test with production credentials
- Rotate keys regularly - Change API keys periodically
- Monitor for fraud - Watch for suspicious payment patterns
- Comply with regulations - Follow PCI DSS and local payment laws
Next Steps
Subscription Packages
Learn about package structure and pricing tiers
Usage Limits
Understand credit consumption and usage tracking