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

  1. Get API credentials from the gateway provider's dashboard.
  2. Admin โ†’ Settings โ†’ Payment Methods.
  3. Click Edit on the gateway row.
  4. Paste the required keys (see table below).
  5. Toggle Status to Active.
  6. Toggle Test Mode off when going live.
  7. Save.
  8. If gateway uses webhooks, copy the Callback URL shown on edit page โ†’ paste into gateway dashboard.

Supported gateways

Global (PCI-compliant)

GatewayRequired keysWebhookSandbox
StripePublishable Key, Secret KeyNot required (inline.js)Use sk_test_ + pk_test_ keys
PayPalClient ID, SecretNot required (REST checkout)Toggle Test Mode โ†’ sandbox.paypal.com
RazorpayKey ID, Key SecretOptional (for refunds)Use rzp_test_ keys
PaystackPublic Key, Secret KeyNot requiredUse pk_test_ + sk_test_ keys
MercadopagoAccess Token, Public KeyRequiredTEST credentials from dashboard
FlutterwavePublic Key, Secret Key, Encryption KeyRequiredUse FLWPUBK_TEST/FLWSECK_TEST
InstamojoClient ID, Client SecretRequiredSandbox API URL different
NgeniusOutlet Reference, API KeyNot requiredUAT credentials from Network International

Bangladesh

GatewayRequired keys
bKashApp Key, App Secret, Username, Password, Merchant ID
NagadMerchant ID, Public Key, Private Key, Callback URL
AamarpayStore ID, Signature Key

Pakistan

GatewayRequired keys
CashmaalAccount No, Wallet ID, Verify Token

India

GatewayRequired keys
PhonePeMerchant ID, Salt Key, Salt Index
PayU MoneyMerchant Key, Salt

Sri Lanka

GatewayRequired keys
PayhereMerchant ID, Merchant Secret
WebxpayMerchant Key, Public Key

Nepal

GatewayRequired keys
eSewaMerchant Code, Secret Key

Other regional

GatewayCountryRequired keys
VoguepayNigeriaMerchant ID
SenangpayMalaysiaMerchant ID, Secret Key
PaykuChilePublic Key, Private Key
PayeerRussia/Eastern EuropeMerchant ID, Secret Key

Cash / manual

MethodConfiguration
Cash on DeliveryAdmin โ†’ Settings โ†’ General โ†’ toggle "Cash on Delivery" to Active
Manual / Bank TransferAdmin โ†’ Payment Methods โ†’ Add Custom (define instructions + required fields)
WalletAdmin โ†’ 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:

  1. Set Test Mode to ON in admin.
  2. Use test credit card from gateway's test cards page.
  3. Place a test order through the storefront.
  4. Verify order status updates correctly after payment.
  5. Check transaction logged in transactions table.
  6. Once verified, switch to live keys + Test Mode OFF.

Common test card numbers

GatewayCardCVV / Expiry
Stripe4242 4242 4242 4242Any future date / Any 3 digits
PayPal sandboxUse sandbox personal account โ†’ Login with PayPalโ€”
Razorpay4111 1111 1111 1111Any future / Any 3 digits
Paystack4084 0840 8408 4081Any 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:

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

  1. Verify Status = Active
  2. Verify your store currency is supported by that gateway
  3. Clear cache: php artisan cache:clear