Skip to content
QR code to Stripe paymentsQR2Stripe documentation

← All guides

Set up the WordPress plugin

The QR2Stripe Pay plugin creates the payments, shows the QR code and marks a payment as paid when Stripe confirms it.

Temporary Stripe key Key A. Used once by the automatic Stripe setup and not stored.
Location name, Street, City, Postal code, Country (2 letters) The address of the Terminal Location. The country must match your Stripe account's country.
Terminal Location ID The ID of the Terminal Location, it starts with tml_. Filled in by the automatic setup.
Webhook signing secret The signing secret of the Stripe webhook, it starts with whsec_. Without it payments are never marked as paid.
QR mode API (recommended) or Inline. See the article on API mode and inline mode.
Website Stripe key (API mode) Key B. Instead of saving it here you can define QR2STRIPE_API_KEY in wp-config.php, then the key is not stored in the database.
QR validity (minutes) How long a QR code can be paid. The default is 10 minutes.
Default currency, Merchant name The currency of new payments and the merchant name shown on the phone.

Install the plugin: in WordPress open Plugins → Add New → Upload Plugin, upload qr2stripe-pay-VERSION.zip and click Activate. A page named Payment with the shortcode [qr2stripe_payment] is created for you.

Automatic Stripe setup: open QR2Stripe → Settings → Automatic Stripe setup, paste key A, fill in the name and address of the Location and click Set up Stripe. The plugin creates the Terminal Location and the webhook and stores the Location ID and the webhook signing secret. Key A is used once and not stored. Delete key A in Stripe right after.

Choose the QR mode. In API mode paste key B into Website Stripe key (API mode) or define it in wp-config.php (see the first example). Save the settings.

The yellow warnings at the top of the QR2Stripe pages tell you what is still missing. When they are gone, the website is ready.

To do the Stripe part by hand, create the Location in Stripe (Terminal → Locations, copy the tml_ ID) and a webhook (Developers → Webhooks → Add endpoint or Add destination) for events from Your account, the single event payment_intent.succeeded and the endpoint URL from the second example. Reveal the signing secret and paste the Location ID and the secret into the plugin settings. A webhook needs no permissions. It must be public HTTPS, localhost does not work.

The site address must use HTTPS and pretty permalinks must be switched on (Settings → Permalinks, anything but “Plain”). Otherwise the QR address contains ?rest_route= and the app refuses it.

define('QR2STRIPE_API_KEY', 'rk_...');
https://YOUR-SITE/wp-json/qr2stripe/v1/stripe-webhook