HomePaymentsStripe setup

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

  1. Sign in to the Stripe Dashboard.
  2. Switch the top-right toggle to Test mode for now.
  3. Open Developers → API keys.
  4. Copy the Publishable key (starts with pk_test_...) and the Secret key (starts with sk_test_...).

2. Paste them into TitanCart

  1. In WordPress go to TitanCart → Payment Gateways.
  2. Click Stripe to expand its settings.
  3. Toggle Enabled on.
  4. Set Mode to Sandbox / Test.
  5. Paste the test publishable key into Publishable key.
  6. Paste the test secret key into Secret key.
  7. 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.

  1. Back in the Stripe Dashboard, open Developers → Webhooks → Add endpoint.
  2. Copy the Webhook URL shown on the TitanCart Stripe settings page (format: https://yoursite.com/?tc_gateway=stripe).
  3. Select the events to listen for:
    • payment_intent.succeeded
    • payment_intent.payment_failed
    • charge.refunded
    • charge.dispute.created
  4. Click Add endpoint. Stripe will display a Signing secret (whsec_...).
  5. Paste that signing secret into the Webhook secret field on the TitanCart Stripe settings page.
  6. 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:

  1. Switch the Stripe Dashboard to Live mode.
  2. Grab the live publishable and secret keys (they start with pk_live_... and sk_live_...).
  3. 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.
  4. 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.

Previous
Payment gateway overview
Next
PayPal setup