In Stripe
Your keys
- Open API keys in your Stripe Dashboard, and make sure it shows live mode, not a sandbox.
- Copy the Publishable key. It starts with
pk_live_, and Stripe always shows it. - Get a secret key, one of two ways:
- Beside the standard Secret key, press Reveal live key and copy it. It starts with
sk_live_. Stripe reveals only a key it made for you. - Or press Create restricted key and give it only what Shoply uses: Write for Payment Intents and Refunds, and Read for Balance and Disputes. Leave the rest at None. It starts with
rk_live_. For subscriptions charged by themselves, it also needs Write for Customers, and access to payment methods and Checkout Sessions; a key without one is refused by Stripe with a sentence that names the permission to add, which the key’s request logs show too.
- Beside the standard Secret key, press Reveal live key and copy it. It starts with
The webhook (optional)
Shoply asks Stripe about each payment while the buyer waits, so payments complete without a webhook. With one, a payment is confirmed even when the buyer closes the page the moment they pay, and disputes reach your orders sooner.- Open Shoply’s Stripe dialog and copy the Callback URL it shows over Webhook Signing Secret.
- In Stripe, open Workbench, then Webhooks, and press Create an event destination. Choose Your account.
- For the payload, choose Snapshot, not Thin. Shoply reads the whole event, which a thin one leaves out.
- Select the
payment_intentevents and thecharge.disputeevents, press Continue, choose Webhook endpoint, and press Continue again. - Paste the Callback URL as the Endpoint URL, and create the destination.
- On its page, press Reveal secret and copy the secret. It starts with
whsec_.
Which payment methods buyers see (optional)
Left empty, the checkout offers what your Stripe account’s default configuration offers, which can include Klarna and other ways to pay later. To choose for yourself:- Open Payment methods in Stripe’s settings.
- In Payment configurations, open the menu (⋯), press Create a configuration, name it, switch on the methods you want, and press Save configuration.
- Copy the configuration’s ID. It starts with
pmc_.
In Shoply
- In your Shoply dashboard, open Settings, then Payment Methods.
- Under Add a Payment Method, find Stripe and press Connect.
- Paste the secret key into Secret Key and the publishable key into Publishable Key.
- If you made the webhook, paste its secret into Webhook Signing Secret. If you made a configuration, paste its ID into Payment Method Configuration ID.
- Press Test Connection to try what you pasted, then Connect App.
sk_test_) works too: test cards complete and deliver orders, and no money moves. A key that does not start with sk_ or rk_ is refused.
How Stripe works once it is connected, at the checkout and on an order, is in Payment methods. A subscription paid by card through Stripe keeps the card in your Stripe account, and each renewal is charged to it on its day.
