Stripe setup
Stripe is the fastest gateway to get working in TitanCart and the one we recommend for most stores. Expect this to take about ten minutes end to end.
1. Get your API keys
- Sign in to the Stripe Dashboard.
- Switch the top-right toggle to Test mode for now.
- Open Developers → API keys.
- Copy the Publishable key (starts with
pk_test_...) and the Secret key (starts withsk_test_...).
2. Paste them into TitanCart
- In WordPress go to TitanCart → Payment Gateways.
- Click Stripe to expand its settings.
- Toggle Enabled on.
- Set Mode to Sandbox / Test.
- Paste the test publishable key into Publishable key.
- Paste the test secret key into Secret key.
- Save settings.
3. Register the webhook
TitanCart needs to know when a Stripe charge completes, fails or refunds. Stripe notifies your store through a webhook.
- Back in the Stripe Dashboard, open Developers → Webhooks → Add endpoint.
- Copy the Webhook URL shown on the TitanCart Stripe settings page (format:
https://yoursite.com/?tc_gateway=stripe). - Select the events to listen for:
payment_intent.succeededpayment_intent.payment_failedcharge.refundedcharge.dispute.created
- Click Add endpoint. Stripe will display a Signing secret (
whsec_...). - Paste that signing secret into the Webhook secret field on the TitanCart Stripe settings page.
- Save settings.
4. Place a test order
From the storefront, add any product to cart and proceed to checkout. At the card step use Stripe’s test card:
- Card number:
4242 4242 4242 4242 - Expiry: any future date (e.g.
12/30) - CVC: any three digits
- ZIP: any five digits
Submit the order. You should land on the order-received page, and under Sales → Orders the order should be in Processing with “Stripe” recorded as the payment method.
5. Flip to live
When you are ready to accept real payments:
- Switch the Stripe Dashboard to Live mode.
- Grab the live publishable and secret keys (they start with
pk_live_...andsk_live_...). - Add a second webhook in the live Stripe account pointing at the same URL, with the same events. This creates a live-mode signing secret.
- In TitanCart’s Stripe settings switch Mode to Live and paste the live keys and live signing secret.
Troubleshooting
Order stuck in Pending. The webhook is not reaching your site. In Stripe Dashboard → Webhooks → click your endpoint → check the Attempts tab. Common causes: a firewall blocking Stripe’s IPs, a staging site behind HTTP basic auth, or the signing secret not matching.
“Invalid API key provided” error. You pasted a sandbox key into live mode or vice versa. Double-check the Mode setting on the TitanCart Stripe form.
“Invalid email address” error at checkout. The customer’s billing email did not pass validation. Stripe requires a receipt email; TitanCart pulls it from the billing address. Make sure your checkout form requires an email.
Note: Apple Pay and Google Pay work automatically once Stripe is live — no additional TitanCart configuration. They appear alongside the card form on supported browsers.