Payment gateways
CartUser ships with 22 integrated payment gateways covering global, regional, and country-specific payment methods. Each gateway has sandbox/live mode toggle. Configure from Admin โ Settings โ Payment Methods.
How to enable a gateway
- Get API credentials from the gateway provider's dashboard.
- Admin โ Settings โ Payment Methods.
- Click Edit on the gateway row.
- Paste the required keys (see table below).
- Toggle Status to Active.
- Toggle Test Mode off when going live.
- Save.
- If gateway uses webhooks, copy the Callback URL shown on edit page โ paste into gateway dashboard.
Supported gateways
Global (PCI-compliant)
| Gateway | Required keys | Webhook | Sandbox |
| Stripe | Publishable Key, Secret Key | Not required (inline.js) | Use sk_test_ + pk_test_ keys |
| PayPal | Client ID, Secret | Not required (REST checkout) | Toggle Test Mode โ sandbox.paypal.com |
| Razorpay | Key ID, Key Secret | Optional (for refunds) | Use rzp_test_ keys |
| Paystack | Public Key, Secret Key | Not required | Use pk_test_ + sk_test_ keys |
| Mercadopago | Access Token, Public Key | Required | TEST credentials from dashboard |
| Flutterwave | Public Key, Secret Key, Encryption Key | Required | Use FLWPUBK_TEST/FLWSECK_TEST |
| Instamojo | Client ID, Client Secret | Required | Sandbox API URL different |
| Ngenius | Outlet Reference, API Key | Not required | UAT credentials from Network International |
Bangladesh
| Gateway | Required keys |
| bKash | App Key, App Secret, Username, Password, Merchant ID |
| Nagad | Merchant ID, Public Key, Private Key, Callback URL |
| Aamarpay | Store ID, Signature Key |
Pakistan
| Gateway | Required keys |
| Cashmaal | Account No, Wallet ID, Verify Token |
India
| Gateway | Required keys |
| PhonePe | Merchant ID, Salt Key, Salt Index |
| PayU Money | Merchant Key, Salt |
Sri Lanka
| Gateway | Required keys |
| Payhere | Merchant ID, Merchant Secret |
| Webxpay | Merchant Key, Public Key |
Nepal
| Gateway | Required keys |
| eSewa | Merchant Code, Secret Key |
Other regional
| Gateway | Country | Required keys |
| Voguepay | Nigeria | Merchant ID |
| Senangpay | Malaysia | Merchant ID, Secret Key |
| Payku | Chile | Public Key, Private Key |
| Payeer | Russia/Eastern Europe | Merchant ID, Secret Key |
Cash / manual
| Method | Configuration |
| Cash on Delivery | Admin โ Settings โ General โ toggle "Cash on Delivery" to Active |
| Manual / Bank Transfer | Admin โ Payment Methods โ Add Custom (define instructions + required fields) |
| Wallet | Admin โ Settings โ General โ toggle "Customer Wallet" to Active. Customers can pay from wallet balance. |
Sandbox testing
Always test in sandbox before going live. For each gateway:
- Set Test Mode to ON in admin.
- Use test credit card from gateway's test cards page.
- Place a test order through the storefront.
- Verify order status updates correctly after payment.
- Check transaction logged in
transactions table.
- Once verified, switch to live keys + Test Mode OFF.
Common test card numbers
| Gateway | Card | CVV / Expiry |
| Stripe | 4242 4242 4242 4242 | Any future date / Any 3 digits |
| PayPal sandbox | Use sandbox personal account โ Login with PayPal | โ |
| Razorpay | 4111 1111 1111 1111 | Any future / Any 3 digits |
| Paystack | 4084 0840 8408 4081 | Any future / Any 3 digits, PIN 0000 |
Callback / webhook URLs
When you open a gateway's edit page in admin, the required callback URL is shown (auto-generated from your domain). Copy + paste into the gateway's dashboard webhook config.
Example formats:
- Stripe: not needed (uses inline JS)
- Paystack:
https://yourdomain.com/payment/paystack/callback
- Razorpay:
https://yourdomain.com/payment/razorpay/callback
- PayPal:
https://yourdomain.com/payment/paypal/callback
Troubleshooting
Payment shows "Failed" but customer was charged
Common cause: callback URL not configured correctly in gateway dashboard, so success notification doesn't reach your server.
Fix: log in to gateway dashboard, set the webhook URL exactly as shown on CartUser edit page. Then trigger refund + retest.
Invalid signature errors
Usually a mismatch between sandbox vs live keys. Check Test Mode toggle matches the keys you entered.
Currency mismatch errors
Some gateways only support specific currencies. e.g. Paystack supports NGN, GHS, ZAR, USD, KES only. Check your store's default currency under Admin โ Settings โ Currency.
Gateway not appearing on checkout
- Verify Status = Active
- Verify your store currency is supported by that gateway
- Clear cache:
php artisan cache:clear