Appearance
Errors and FAQs
Error handling
| Error code and type | Reason |
|---|---|
| 400 Bad Request | Missing or invalid values (for example, a required field is empty). |
| 401 Unauthorized | No valid API key provided. |
| 402 Request Failed | The request was valid but failed (for example, a payment was declined). |
| 403 Forbidden | Your API key does not have permission for this request (common with restricted keys). |
| 404 Not Found | The requested resource does not exist (for example, the ID is wrong). |
| 409 Conflict | The request conflicts with another request (for example, an idempotency key issue). |
| 429 Too Many Requests | Too many requests in a short time; retry after a short delay. |
| 500 Internal Server Error | Stripe-side error; retry after a short delay. |
FAQs
Do I need both keys in WeWeb?
Yes. The Publishable Key is used for Stripe’s interface-side features (e.g. the payment element), and the Secret Key or Restricted Key is used for Stripe actions running in your WeWeb backend.
Why is my amount 100x larger or smaller than expected?
Most Stripe amounts are in the smallest currency unit (for example cents). For USD, 1000 means $10.00.
Can I use a restricted key?
Yes, but make sure it has permission for the resources you use (for example Payment Intents, Customers, Products, Subscriptions, or Invoices).
See also
- Setup — Connection steps and common pitfalls (wrong keys, amounts in cents, restricted keys, limitations).

