Requires TeraWallet Pro with the Withdrawal module active and a Stripe account with Connect
enabled. Unlike PayPal, each customer must first connect their own Stripe account to your store.
If your customers won’t have Stripe accounts, consider PayPal or
bank transfer (BACS) instead.
How it works
- A customer connects their Stripe account once (OAuth), which stores their Stripe account ID.
- They request a withdrawal; the wallet is debited the requested amount.
- On approval (automatic, or by you), TeraWallet creates a Stripe transfer for
amount − feeto the customer’s connected account. - If Stripe accepts the transfer, the request is marked Approved straight away.
- If the transfer is later reversed in Stripe, the webhook cancels the request and restores the customer’s balance.
Step 1 — Enable Stripe Connect
- Sign in to the Stripe Dashboard and switch to Test mode to begin.
- Open Settings → Connect and complete the Connect onboarding for your platform.
- Under Connect settings → Onboarding options → OAuth, turn on OAuth for Standard accounts (or the equivalent OAuth option your dashboard shows).
- Copy your Client ID (starts with
ca_).
Step 2 — Add the redirect URI
Stripe only returns customers to URLs you have allow-listed. In Connect settings → OAuth → Redirects, add the URL of your customers’ Payment Settings page:my-walletis the default wallet endpoint. If you changed it in WooCommerce settings, use yours.- If your wallet is on a page using the
[woo-wallet]shortcode instead of My Account, the URL is that page with?wallet_action=withdraw_settings. - Open the Payment Settings page as a customer and copy the address from the browser to be sure it matches.
Step 3 — Get your API keys
In Developers → API keys, copy the Publishable key and Secret key for the same mode (test or live) as the Client ID above. Test and live keys are separate.Step 4 — Configure TeraWallet
Go to TeraWallet → Settings → Withdrawal. General options: turn on Enable Withdrawal, choose the Approval Mode (use Manual while testing), set optional Minimum / Maximum Withdrawal, and turn on Enable logging during setup. See Wallet Withdrawal for details. Stripe gateway options
Save your changes.
Step 5 — Register the webhook
- In Stripe, go to Developers → Webhooks → Add endpoint.
-
Set the Endpoint URL to:
The same URL is shown under the webhook secret field in TeraWallet.
-
Select the event
transfer.reversed. -
Save, then reveal the Signing secret (starts with
whsec_) and paste it into Stripe webhook secret in TeraWallet.
transfer.reversed: the request is cancelled and the customer’s balance is
restored. Because a successful transfer is approved immediately, no “success” event is needed. Other
events are acknowledged and ignored.
Each webhook’s signature is verified, and requests older than five minutes or with a bad signature are
rejected. A replayed event is ignored, so a request is never cancelled twice. If the secret is empty,
the endpoint returns an error and reversals will not be picked up.
Step 6 — Fund your platform balance
Transfers are paid out of your Stripe platform balance in the transfer’s currency. Make sure the balance can cover pending withdrawals. In test mode, Stripe’s test card4000 0000 0000 0077 adds available funds
to your balance.
Step 7 — What customers need to do
Customers connect once under My Account → Wallet → Withdrawal → Payment Settings by clicking Connect with Stripe, then signing in or creating a Stripe account and authorising it. They return to the settings page and see “You are now connected with Stripe.” The same screen has a Disconnect stripe account button. If a customer hasn’t connected, the withdrawal form tells them to connect before they can submit.Step 8 — Test in test mode
- Set Mode to Sandbox / Test and use test keys, test client ID and a test webhook.
- As a test customer, click Connect with Stripe and finish the flow with a Stripe test account.
- Add wallet balance, then submit a withdrawal.
- Approve it in wp-admin (or use Automatic mode).
- The request should show Approved with a note “Stripe transfer initiated: tr_…”. The transfer appears in the Stripe Dashboard under Connect → Transfers.
-
To test reversals, reverse the transfer in the dashboard, or use the Stripe CLI:
A real reversal of an approved request should flip it to cancelled and restore the balance.
Go live checklist
- Connect enabled and OAuth redirect URI added in live mode
- Mode switched to Live / Production
- Live Client ID, Publishable key and Secret key pasted
- A new live webhook created for
transfer.reversed, and its signing secret pasted - Platform balance funded
- Enable logging turned off
- One small real withdrawal tested end to end
Duplicate-payment protection
Every transfer is sent with a fixed idempotency key based on the withdrawal ID. TeraWallet also stores the Stripe transfer ID on the request and skips creating a second transfer if one exists, even after Stripe’s 24-hour idempotency window. Re-approving a request therefore can’t pay twice.Currencies
Amounts are converted to Stripe’s smallest currency unit (for example,10.50 becomes 1050). Zero-decimal
currencies such as JPY and KRW are sent as whole numbers.
Troubleshooting
Enable Enable logging and open the request to see its log. Failure reasons are also saved as notes.
See Pro Hooks & REST API for the full reference.