Skip to content

Updating visuals

If you see any images containing outdated UI, please bear with us.

We are updating all content as quickly as possible to mirror our new UI.

Setup ​

Follow these steps to connect Stripe to your WeWeb project so you can use Stripe actions and webhooks.

1. Get your Stripe keys ​

  1. Go to Stripe Dashboard → API keys.
  2. Use Test mode (toggle in the dashboard) while building and testing.
  3. Copy:
    • Publishable key (starts with pk_test_ or pk_live_)
    • Secret key (starts with sk_test_ or sk_live_)

Test vs live

Use test keys (pk_test_, sk_test_) in the WeWeb Editor and when testing. Switch to live keys (pk_live_, sk_live_) only for Production when you’re ready to accept real payments.

2. Add Stripe in WeWeb ​

  1. In WeWeb, open the Data & API tab, then open the Integrations subtab. You can also open the Integrations panel from the Interface tab.

  2. Add the Stripe integration if it’s not already there. It sits under Payments & Billing.

    The Integrations subtab with Stripe selected and its connection list

  3. Create a connection (e.g. “Stripe – Editor”, “Stripe – Production”).

  4. For each environment you use (Editor, Staging, Production), fill in:

    • Publishable Key — paste the Publishable key.
    • Secret Key or Restricted Key — paste the Secret key (or a restricted key with the right permissions).

    Use the Environment switch at the top of the block to move from one environment to the next.

    Stripe connection settings in WeWeb with the Publishable Key and Secret Key or Restricted Key fields

3. Test the connection ​

  1. In the API Endpoints tab of the Backend Workflows subtab in Data & API (or in a backend workflow), add an action.

  2. Open Stripe in the action menu. Stripe actions are grouped by resource (Customers, Products, Prices, Invoices, Refunds, Subscriptions, Checkout, Payment Intents): open Products and pick List Products.

    The action menu with Stripe open, showing the resource groups

  3. Select your Stripe connection and run the action (or publish and call the API).

  4. If you see a list (even if empty), the connection works.

If something fails, check Errors and FAQs and the pitfalls below.

Common pitfalls ​

Using a live key in the editor (or a test key in production) ​

If the key environment doesn’t match where you’re testing, Stripe calls can fail or return unexpected data. Use pk_test_ / sk_test_ for testing and pk_live_ / sk_live_ for production.

Amounts are in cents ​

Actions like Create Payment Intent and Create Price use the smallest currency unit. For USD, 1000 means $10.00.

Your restricted key does not have the required permissions ​

If you use a restricted key, give it access to the Stripe resources you use (e.g. Payment Intents, Customers, Products, Subscriptions, Invoices). Otherwise requests can return 403.

Payment Intent cannot be canceled ​

Stripe only allows canceling a Payment Intent in certain states. If cancel fails, check the Payment Intent status in Stripe and your flow.

Limitations and what’s not in the editor ​

  • Setup Intents (saving a card for later without charging) are supported by the backend but are not in the workflow action picker. You’d need a custom API that calls the backend.
  • Charges and Payment Methods (create, attach, detach, list) exist in the backend but are not in the Stripe integration actions in the editor. Prefer Payment Intents and Checkout for new flows.

Everything else is in the action picker, including the full lifecycle for customers, products, prices, invoices and their line items, invoice items, subscriptions, payment intents, refunds, and checkout sessions. See the Actions reference for the complete list.


Next: Choose how to collect payments