Docs / Payment Gateways
🏠 Home

Payment Gateways

Turn on online payments: the six gateways that ship with the system, where to get the keys for Stripe, PayPal and Paystack, the Stripe webhook, and how to test before going live.

Overview

Open Tools & Settings β†’ Payment & Finance β†’ Payment Gateways. Six gateways are seeded out of the box:

The storage mechanics of each gateway (table rows, credential keys) are also documented in Admin Tools → Payment gateways.

GatewayKeys neededSeeded state
Cashβ€” (instructions only)Active
Wire transferβ€” (bank details only)Active
Cash on deliveryβ€” (instructions only)Active
StripePublishable + secret keyInactive
PayPalClient ID + secretInactive
PaystackPublic + secret keyInactive

The three offline methods (cash, bank/wire transfer, cash on delivery) are active by default and need no keys β€” their Configure form only asks for Instructions / account details shown to customers. The three online processors ship inactive with empty keys.

Enabling an online gateway is always the same three moves: flip the Active switch on the gateway list (it saves instantly), open its Configure action, paste the keys and press Save. Every configure form also has a Description field β€” that text is what customers see on the payment screen.

IMPORTANT β€” gateways vs payment methods Payment Gateways are online processors that charge the customer in the app (Stripe, PayPal, Paystack). Payment Methods (Tools & Settings β†’ Payment & Finance β†’ Payment Methods) is a different concept: order credit terms such as Prepaid, Postpaid 15/30/60 day and Payment on delivery, attached to packages and shipments. See Admin Tools β†’ Payment gateways & payment methods.

Stripe

Create keys in the Stripe dashboard and paste them into Configure Stripe:

  • Publishable key β€” starts with pk_…
  • Secret key β€” starts with sk_…

The form itself suggests starting with test keys (pk_test_… / sk_test_…) while you develop. Package and shipment online payments go through the Stripe Payment Intents API.

CargoPRO admin β€” Configure Stripe form
Configure Stripe β€” publishable key, secret key and the Active switch (the form suggests test keys in development).

Webhook

Add a webhook endpoint in the Stripe dashboard (Developers β†’ Webhooks) pointing to:

https://your-domain.com/api/payments/stripe/webhook

Subscribe to payment_intent.succeeded. Copy the webhook signing secret (whsec_…) into your .env as STRIPE_WEBHOOK_SECRET β€” the backend uses it to verify the Stripe-Signature header of every request and rejects anything unsigned or tampered with. When a payment_intent.succeeded event arrives and checks out, the matching package or shipment payment is recorded as approved.

No secret, no webhook Until STRIPE_WEBHOOK_SECRET is set, the webhook endpoint answers with an error instead of trusting unverified payloads β€” the app-side payment still works; only the automatic confirmation is affected.

Go live: swap the test keys for live keys in the same form and keep the site on HTTPS β€” Stripe requires it.

PayPal

Create a REST app in the PayPal developer dashboard and paste the Client ID and Secret into Configure PayPal. PayPal mode follows your server: it uses the sandbox while APP_ENV is not production, and the live API when APP_ENV=production β€” so use matching sandbox or live credentials (the configure form says the same).

CargoPRO admin β€” Configure PayPal form
Configure PayPal β€” Client ID, Secret and the Active switch (sandbox in non-production).

Paystack

Get the keys from your Paystack dashboard (Settings β†’ API Keys & Webhooks) and paste the Public key and Secret key into Configure Paystack. Paystack is only available to businesses registered in the countries it operates in (Ghana, Nigeria, South Africa, Kenya and others) β€” confirm your country is supported before relying on it.

CargoPRO admin β€” Configure Paystack form
Configure Paystack β€” public key, secret key and the Active switch.

Testing & go-live checklist

  • Start in test mode β€” Stripe test keys, PayPal sandbox β€” and run a full payment through the app.
  • Before launch, make one small real charge with live keys and refund it.
  • Verify the transaction shows up in Admin β†’ Transactions with the right amount and status.
  • Check the currency in General Settings matches what your gateway account supports β€” mismatched currencies are the usual cause of declined test charges.
  • Go live on HTTPS β€” the processors require it, and PayPal's live mode keys are only honored in production.