Payment Gateways
Configure and manage 20+ payment gateways for subscription payments.
All payment gateways require HTTPS (SSL certificate). Payments will fail on non-secure connections.
Available Payment Gateways
CoinTrail supports 20+ payment gateways organized into three categories:
Payment Gateway Settings page showing all available payment gateways
Traditional Payment Processors
| Gateway | Regions | Features | Recurring |
|---|---|---|---|
| Stripe | Global (46+ countries) | Credit cards, 3D Secure, ACH | Yes |
| PayPal | Global (200+ countries) | PayPal wallet, Credit cards | Yes |
| Razorpay | India | Cards, UPI, Net Banking, Wallets | Yes |
| Paystack | Africa (Nigeria, Ghana, South Africa) | Cards, Mobile Money, Bank Transfer | Yes |
| Mollie | Europe | iDEAL, Bancontact, SEPA, Cards | Yes |
| Flutterwave | Africa, Global | Cards, Mobile Money, Bank | Limited |
| Paytm | India | Paytm Wallet, UPI, Cards | Limited |
| Instamojo | India | Cards, UPI, Net Banking | No |
| 2Checkout | Global | Cards, PayPal, Wire Transfer | Yes |
| Authorize.Net | US, Canada, UK, Europe, Australia | Credit Cards, eChecks | Yes |
| Skrill | Global | Digital Wallet, Cards | Limited |
Cryptocurrency Payment Gateways
| Gateway | Supported Coins | Settlement |
|---|---|---|
| Binance Pay | 70+ cryptocurrencies | Crypto or Fiat |
| Coinbase Commerce | BTC, ETH, LTC, DOGE, USDC, DAI | Crypto only |
| BitPay | BTC, ETH, LTC, BCH, XRP, DOGE + stablecoins | Fiat (bank) or Crypto |
| NOWPayments | 150+ cryptocurrencies | Crypto or Fiat |
| CoinGate | 70+ cryptocurrencies | EUR, USD, or Crypto |
| Cryptomus | 20+ cryptocurrencies | Crypto or Fiat |
Manual Payment Methods
| Method | Description | Admin Action Required |
|---|---|---|
| Bank Transfer | Wire transfer to your bank account | Manual approval after payment verification |
| Custom Manual Gateway | Create any manual payment method with custom fields | Manual approval after payment verification |
Accessing Payment Gateway Settings
To configure payment gateways:
- Log in to the Admin Panel at
/admin - Navigate to Payment Gateway Settings in the sidebar
- You'll see a list of all available gateways
- Click on any gateway to configure it
Navigate to Payment Gateway Settings from the admin sidebar
General Gateway Configuration
Each gateway has these common settings:
| Setting | Description |
|---|---|
| Enabled | Toggle to enable/disable the gateway on checkout |
| Display Name | Name shown to users during checkout |
| Description | Brief description shown on payment selection |
| Logo | Custom logo image for the gateway |
| Sandbox Mode | Enable test/sandbox mode for development |
| Supported Currencies | Which currencies this gateway accepts |
| Min/Max Amount | Transaction amount limits |
| Sort Order | Display order on checkout page |
Common gateway settings available for all payment gateways
Stripe Configuration
Stripe is the recommended payment gateway for most use cases.
Getting API Keys
- Create or log in to your Stripe Dashboard
- Go to Developers → API Keys
- Copy your Publishable Key and Secret Key
- For testing, use the test mode keys (toggle "Test mode" on)
Configuration Fields
| Field | Description | Example |
|---|---|---|
| Publishable Key | Public API key (starts with pk_) | pk_test_xxxxx or pk_live_xxxxx |
| Secret Key | Private API key (starts with sk_) | sk_test_xxxxx or sk_live_xxxxx |
| Webhook Secret | For webhook signature verification | whsec_xxxxx |
Setting Up Webhooks
- In Stripe Dashboard, go to Developers → Webhooks
- Click Add endpoint
- Enter your webhook URL:
https://yourdomain.com/api/webhooks/stripe - Select events to listen for:
checkout.session.completedcustomer.subscription.updatedcustomer.subscription.deletedinvoice.payment_succeededinvoice.payment_failed
- Copy the Webhook Signing Secret and paste it in the admin panel
Use 4242 4242 4242 4242 with any future expiry date and any CVC for testing in sandbox mode.
PayPal Configuration
Getting API Credentials
- Log in to PayPal Developer Dashboard
- Go to Apps & Credentials
- Create a new app or select existing one
- Copy the Client ID and Secret
Configuration Fields
| Field | Description |
|---|---|
| Client ID | PayPal application Client ID |
| Client Secret | PayPal application Secret |
| Webhook ID | PayPal webhook ID for notifications |
Setting Up Webhooks
- In PayPal Developer Dashboard, go to your app
- Scroll to Webhooks section
- Click Add Webhook
- Enter URL:
https://yourdomain.com/api/webhooks/paypal - Select events:
BILLING.SUBSCRIPTION.ACTIVATEDBILLING.SUBSCRIPTION.CANCELLEDPAYMENT.SALE.COMPLETED
Razorpay Configuration (India)
Getting API Keys
- Log in to Razorpay Dashboard
- Go to Settings → API Keys
- Generate a new key pair
- Copy Key ID and Key Secret
Configuration Fields
| Field | Description |
|---|---|
| Key ID | Razorpay Key ID (starts with rzp_) |
| Key Secret | Razorpay Key Secret |
| Webhook Secret | For webhook signature verification |
Webhook Setup
- Go to Settings → Webhooks
- Click Add New Webhook
- Enter URL:
https://yourdomain.com/api/webhooks/razorpay - Generate and copy the webhook secret
- Select events:
payment.authorized,payment.captured,subscription.activated
Cryptocurrency Payment Setup
Binance Pay
- Log in to Binance Merchant Portal
- Create a merchant account if you haven't
- Go to API Management
- Create new API key with payment permissions
- Copy API Key and Secret Key
Coinbase Commerce
- Log in to Coinbase Commerce
- Go to Settings → API Keys
- Create a new API key
- Copy the API key
- Set up webhook:
https://yourdomain.com/api/webhooks/coinbase
NOWPayments
- Create account at NOWPayments
- Go to Store Settings → API
- Copy your API Key
- Set IPN Callback URL:
https://yourdomain.com/api/webhooks/nowpayments
Bank Transfer Configuration
Bank transfer allows users to make direct bank payments with manual verification.
Configuration
- Enable the Bank Transfer gateway
- Enter your bank details:
- Bank Name
- Account Name
- Account Number
- Routing/Sort Code (if applicable)
- SWIFT/BIC Code (for international transfers)
- IBAN (if applicable)
- Add payment instructions for users
Processing Bank Transfers
- User selects Bank Transfer at checkout
- User sees bank details and reference number
- User makes transfer and provides proof of payment
- Payment appears in Payment Transactions as "Pending"
- Admin verifies payment in bank account
- Admin approves/rejects the payment in admin panel
- User's subscription is activated upon approval
Testing Payments
Always test payments in sandbox/test mode before going live. Each gateway provides test credentials and test card numbers.
Test Card Numbers
| Gateway | Test Card | Notes |
|---|---|---|
| Stripe | 4242 4242 4242 4242 |
Any future expiry, any CVC |
| PayPal | Use sandbox account | Create test buyer account in developer dashboard |
| Razorpay | 4111 1111 1111 1111 |
Test mode only |
| Paystack | 4084 0841 0841 0841 |
Test mode: OTP is 123456 |
Troubleshooting
Solutions:
- Check that the gateway is enabled in admin panel
- Verify API credentials are correct
- Check that the subscription currency is supported by the gateway
- Clear application cache:
php artisan cache:clear
Solutions:
- Verify webhook URL is correctly set in gateway dashboard
- Ensure your site has valid SSL certificate
- Check that webhook secret is correctly configured
- Check
storage/logs/laravel.logfor errors - Verify firewall isn't blocking incoming webhook requests
Solutions:
- Check if webhook was received (check Payment Logs)
- Verify webhook signature validation is passing
- Check
storage/logs/laravel.logfor subscription creation errors - Manually activate subscription from admin panel if needed
Solutions:
- Ensure subscription plan currency matches gateway's supported currencies
- Update the supported currencies list in gateway settings
- Some gateways only support specific currencies (e.g., Razorpay = INR only)