Integrate Stripe
With the Stripe integration, sales from your Stripe account reach ClickMax and create or update the contact by the buyer's email. It also unlocks the Stripe Checkout block in the page editor, which needs the publishable key and the webhook signing secret.
Before you start
- You need access to the Developers area of your Stripe account.
- Both keys must be in the same mode: both live or both test.
Step by step
1. Create the restricted key in Stripe
- In Stripe, open Developers → API keys and click Create restricted key.
- Under Choose how this key will be used, select Sharing with an external service.
- Fill in:
- Vendor name:
ClickMax; - URL:
https://clickmax.io.
- Vendor name:
- Under Assign permissions to your key, choose Standard. It already covers everything ClickMax uses: creating the checkout, listing prices and products, and receiving payments, refunds and disputes.
- Create the key and copy its value (it starts with
rk_).
2. Create the integration in ClickMax
- In ClickMax, open Integrations, pick Stripe and paste the key into Secret or restricted key.
- In Stripe, under Developers → API keys, copy the Publishable key (it starts with
pk_) and paste it into Publishable key. - Give the integration a name, set the status and click Create integration.
- Copy the webhook URL ClickMax shows.
3. Register the webhook in Stripe
- In Stripe, open Webhooks → Add destination and select the events:
checkout.session.completedcheckout.session.async_payment_succeededcheckout.session.async_payment_failedinvoice.payment_succeededinvoice.payment_failedcharge.refundedcharge.dispute.createdcharge.dispute.closed
- Choose Webhook endpoint, paste the ClickMax URL and click Add destination.
- Open the new destination and copy the Signing secret (it starts with
whsec_). - Go back to ClickMax, paste the secret into Webhook signing secret and click Finish integration.
With the signing secret, ClickMax only accepts webhooks sent by your Stripe account.
What arrives in ClickMax
Extra items in the same order show up as additional products of the sale.
If it didn't work
- The field turns red: the key you pasted is not the requested type. The secret key starts with
sk_, the restricted key withrk_, the publishable key withpk_and the signing secret withwhsec_. - Error creating integration (or Error completing integration) shows up: check that:
- both keys are in the same mode (both live or both test);
- the restricted key was created with the Standard permissions;
- the key was not deleted or rolled in Stripe.
- Prices don't show in the editor or the checkout doesn't load: the restricted key is missing a permission. In Stripe, open the key, click Edit on the permissions and use Standard.
- Sales don't arrive, or refunds and disputes don't change the sale: in Stripe, under Webhooks, check that the destination has the eight events from step 3 and that deliveries succeed. If you rolled the signing secret in Stripe, paste the new one in ClickMax.