DrPlugin

Stripe payments

Updated October 24, 2026

Connect TierMint to Stripe, set up the webhook that completes orders, and test payments before you take real money.

How Stripe payments work

TierMint takes one-time payments through Stripe. When the buyer clicks Pay now, TierMint creates a pending order and a Stripe PaymentIntent for the order total. The checkout then shows the Stripe Payment Element, a payment form that Stripe serves into the page. TierMint asks Stripe for automatic payment methods, so the form offers the methods you turn on in your Stripe Dashboard.

The checkout with the Stripe Payment Element: card number, expiry date, security code and country fields above Pay now

Card details go from the buyer's browser to Stripe and never reach your server. Stripe handles Strong Customer Authentication and 3D Secure, including any extra check the buyer's bank asks for.

TierMint marks the order Completed only when Stripe's webhook confirms the payment. Checkout and billing fields shows the steps from the buyer's side.

Subscriptions are a TierMint Pro feature: Subscriptions covers them. TierMint Pro also adds PayPal payments.

Connect your Stripe account

Open TierMint → Settings → Payments. You need the manage_tiermint_settings capability, which administrators have. With TierMint Pro, the tab splits into Stripe and PayPal sub-tabs.

  1. In your Stripe Dashboard, switch to test mode and open the API keys page. Stripe's API keys guide shows where it is.
  2. Copy the publishable key into Test publishable key and the secret key into Test secret key.
  3. Leave Stripe mode on Test.
  4. Click Save changes.
  5. Add the test webhook endpoint and paste its signing secret into Test webhook signing secret. Set up the webhook has the steps.

Each mode has its own keys, so you can set up and test everything in test mode before you enter live keys. Go live lists the steps for the switch.

The Stripe test mode keys: the publishable key and two saved secrets shown masked, each with a Clear button

Field What it holds
Stripe mode Test (default) or Live. Checkout, refunds and webhook checks use only the keys of this mode.
Test publishable key, Live publishable key The publishable key. It starts with pk_test_ or pk_live_.
Test secret key, Live secret key The secret key, which starts with sk_, or a restricted key, which starts with rk_. Stored encrypted.
Test webhook signing secret, Live webhook signing secret The signing secret of the webhook endpoint for that mode. It starts with whsec_. Stored encrypted.

Checkout works only when the current mode has both a publishable key and a secret key.

After you save a secret, its field shows only a mask with the last four characters, and the label adds "(enter a new value to replace)". To change it, type the new value and save. Clear removes the secret when you save, and Undo brings it back before then.

Use a restricted key

You can paste a restricted key into the secret key field instead of the full secret key. The free plugin creates PaymentIntents and refunds at Stripe, so give the key write access to PaymentIntents and Refunds. TierMint Pro subscriptions call more Stripe APIs, such as customers and subscriptions, so a restricted key needs more permissions there. Stripe's API keys guide explains how to create one.

When SECURE_AUTH_KEY changes

TierMint encrypts the secret keys and signing secrets with a key built from SECURE_AUTH_KEY in wp-config.php. If that constant changes, for example after a move to a new host, TierMint can no longer read the saved secrets. Their fields then show as empty and checkout stops until you enter the secrets again. Without SECURE_AUTH_KEY, TierMint cannot save a secret at all.

Set up the webhook

TierMint completes an order only when Stripe's webhook confirms the payment. Without the webhook, Stripe takes the money but the order stays Pending in TierMint.

  1. In your Stripe Dashboard, add a webhook endpoint. Stripe's webhooks guide shows the current screens.
  2. Set the endpoint URL to https://yourstore.example/wp-json/tiermint/v1/webhooks/stripe, with your own domain.
  3. Select the events payment_intent.succeeded, payment_intent.payment_failed and charge.refunded.
  4. Save the endpoint and copy its signing secret.
  5. Paste it into the signing secret field for the same mode under TierMint → Settings → Payments, then click Save changes.

Test mode and live mode each need their own endpoint, and each endpoint has its own signing secret. TierMint checks every webhook against the signing secret of the current Stripe mode, so a live event fails the check while the mode is Test.

TierMint Pro subscriptions need more events on the same endpoint. Subscriptions lists them.

Event What TierMint does
payment_intent.succeeded Marks the order Completed. TierMint then issues the license keys and queues the receipt email.
payment_intent.payment_failed Marks a pending order Failed.
charge.refunded Records on the order any refund made in the Stripe Dashboard.

Stripe can send the same event more than once. TierMint records each event id and acts on it once, so a repeat never completes an order twice. An event TierMint does not handle gets a success reply and is ignored. If handling an event fails, TierMint replies with an error so that Stripe sends it again.

Refunds

You can refund from TierMint or from the Stripe Dashboard. Either way, the refund is recorded on the order once.

  • From TierMint, open the order under TierMint → Orders and click Refund. TierMint asks Stripe to refund the payment, then records the refund. Refund an order walks through the screen.
  • From the Stripe Dashboard, Stripe sends charge.refunded, and TierMint records any refunded amount it has not recorded yet.

A refund started in TierMint is not counted again when Stripe's webhook reports it. Refunds use the secret key of the current Stripe mode, so a refund of a live order fails while the mode is Test.

Test payments

With Stripe mode on Test and the test keys saved, checkout uses Stripe's test environment and no real money moves. Stripe publishes test card numbers in its testing guide. Use any future expiry date and any three-digit CVC.

Card number Result
4242 4242 4242 4242 A successful payment.
4000 0025 0000 3155 Asks for 3D Secure authentication.
4000 0000 0000 9995 A declined payment.

A site on your own computer cannot receive webhooks from Stripe over the internet. The Stripe CLI can forward test events to it:

stripe listen --forward-to https://yourstore.example/wp-json/tiermint/v1/webhooks/stripe

When it starts, the CLI prints a signing secret that starts with whsec_. Paste that into Test webhook signing secret while you test with the CLI.

Go live

  1. Copy the live publishable key and secret key from your Stripe Dashboard into Live publishable key and Live secret key.
  2. Add a live webhook endpoint with the same URL and events, and paste its signing secret into Live webhook signing secret.
  3. Set Stripe mode to Live.
  4. Click Save changes.

Common questions

A buyer paid, but the order is still pending. What is wrong?

The webhook did not reach TierMint, or it failed the signature check. Check that the endpoint URL is right, that the endpoint sends payment_intent.succeeded, and that the signing secret in TierMint belongs to that endpoint and to the current Stripe mode. The endpoint's event log in the Stripe Dashboard shows each delivery, the status code your site returned and the reply.

Why does the webhook fail with an invalid signature?

TierMint replies with status 400 and "Webhook signature verification failed." The signing secret usually belongs to another endpoint or the other mode. The server clock can also be the cause: TierMint refuses a signature whose timestamp is more than five minutes from the server time.

Why does the checkout say it is not available?

The current Stripe mode has no publishable key or no secret key. This happens when Stripe mode is Test but only the live keys are filled in, or the other way round. It also happens after SECURE_AUTH_KEY changes, until you enter the secrets again.

Does TierMint ever see card numbers?

No. The Stripe Payment Element sends card details from the buyer's browser to Stripe. Your server sees only the PaymentIntent id and its status.