Use Stripe test mode
Install PayShare on your Stripe account in test mode or a Stripe sandbox, and use your test secret key on your server. PayShare follows the mode of the order proof, so test PaymentIntents create test sessions and test shares. There is no separate PayShare test flag or test API host.
A test PaymentIntent sent for a live install, or the reverse, is rejected with PROOF_INELIGIBLE.
A new sandbox has its own secret key and its own acct_. Replacing only STRIPE_SECRET_KEY while start-split still names the previous account makes Stripe say The provided key does not have access to account. Point stripeAccountId at the sandbox account that owns the new key.
Run the flow end to end
Install and choose your checkout type
Install PayShare in test mode and choose I control my own checkout.
Add the button and start-split route
Deploy them to an HTTPS environment you can reach from a phone.
Confirm set up in PayShare
Until you do, starting a split returns
WEBSITE_SETUP_REQUIRED.Select Split with others on a test order
Your browser should move to the PayShare session in the same tab.
Pay as several people
Open the invite link in private windows or on other devices. Pay with Stripe test cards such as
4242 4242 4242 4242, any future expiry and any CVC.Check the result in Stripe
When the last share is paid, the shares are captured together and your webhook marks the order paid. The customer lands on your success page.
Checklist before going live
- Split with others sits beside Pay now, and Pay now still works as before.
- Your route reads the amount and currency from your own records, not from the browser.
stripeAccountIdcomes from server config, and the Stripe secret key never reaches the browser.- The browser moves to the session in the same tab.
- Your order is marked paid from Stripe events, not from the success page.
- An abandoned session leaves the order unpaid and releases every authorised share.
refundTokenis stored server-side, and a test refund works from the PayShare app.- You have repeated the flow in live mode with your live install and live key.
Failure cases to try
- Let a session expire before everyone pays.
- Cancel as the host.
- Use a declining test card for one person.
- Start a split with a checkout hold that has already passed.
- Send the same order proof twice.