New to VisionScaper?
Start here
Help Center › Invoices & payments › Set up Stripe for your site (site owner)
Set up Stripe for your site (site owner)
Paste your Stripe secret key and webhook signing secret, add the webhook events, and turn on Connect.
This article is for the person who owns the WordPress site. Contractors do not do this part. One Stripe account on your site powers online invoice payments, AI credit packs, storage packs and subscriptions.
Note: Stripe changes its screens often. Follow Stripe’s current instructions for each step. This article names the VisionScaper fields and the exact event names.
Steps
- Create or open your Stripe account and finish its business details so it can accept payments.
- In Stripe, copy your secret API key. It starts with
sk_live_. Use a test key (sk_test_) while you practice. - In WordPress, go to Settings → VisionScaper. Paste it into Stripe secret key.
- In Stripe, add a webhook endpoint. Copy the exact address from the numbered instructions under Selling extra AI credits on the Settings → VisionScaper page. It is built from your own site address.
- Add these events to the endpoint:
–checkout.session.completed
–checkout.session.async_payment_succeeded
–checkout.session.async_payment_failed(bank payments)
–account.updated - Copy the endpoint’s signing secret. It starts with
whsec_. Paste it into Stripe webhook signing secret. - In Stripe, turn on Connect (Express accounts) so contractors can connect their own accounts.
- Click Save Changes.
What each event does
| Event | What VisionScaper does |
|---|---|
checkout.session.completed |
Marks an invoice paid, or “Bank payment clearing” for bank payments. Also adds purchased credits or storage. |
checkout.session.async_payment_succeeded |
A bank payment cleared: marks the invoice paid. |
checkout.session.async_payment_failed |
A bank payment failed: the invoice opens again and the contractor and customer are told. |
account.updated |
Updates whether a contractor’s Stripe account is ready to take payments. |
Other events the code also handles
The settings page does not list these, but other features read them if you add them:
- Contractor subscriptions:
customer.subscription.created,customer.subscription.updated,customer.subscription.deleted,invoice.paid,invoice.payment_failed. - Autopay and card reader:
payment_intent.succeeded,payment_intent.payment_failed,payment_intent.canceled.
How VisionScaper checks messages
It checks Stripe’s signature, refuses messages older than 10 minutes, and applies each message once. A repeat is ignored.
Tips
- Practice in test mode first, including Instant Payouts.
- Credit purchases are also confirmed when the customer returns, so a missed webhook does not lose a purchase.
If something goes wrong
- “Not configured” or “Bad signature.” The signing secret is empty or does not match this endpoint.
- Contractors see “Online payments aren’t set up on this website yet.” The secret key is empty.
- Invoices stay unpaid after a payment. Check that the events above are on the endpoint.