Damodar Lohani eeb28a4ce8 fix(billing): surface real confirmPayment error and clean up draft on failure
Two issues surfaced during user testing of the live-payment flow on
create-organization and change-plan.

1. confirmPayment() in src/lib/stores/stripe.ts always called
   resolve('/(console)/organization-[organization]/billing', {organization: orgId})
   eagerly at the top of the try block. The create-organization callsite
   passes only `route` (no orgId, since the team doesn't yet exist), so
   resolve() threw on the missing required `organization` param, the
   outer catch fired, and the user saw the generic
   "There was an error processing your payment..." message instead of
   the actual Stripe error. The URL is now built lazily — resolve() is
   only invoked when no `route` is supplied. The outer catch now
   surfaces the underlying error message (Stripe / SDK error) and falls
   back to the generic copy only when no message is available.

2. When the frontend Stripe confirmation failed, the backend was never
   notified, leaving draft teams (status='draft') and partial upgrades
   stranded. handleTeamCreateUpgradeFailure already deletes drafts and
   rolls back upgrades — but only when the backend recognises failure.
   The create-organization and change-plan error branches now make a
   best-effort call to organizations.validatePayment after a failed
   confirmation. validatePayment inspects the actual Stripe intent and
   routes to handleTeamCreateUpgradeFailure when it isn't
   succeeded/processing. validatePayment is expected to throw
   BILLING_PAYMENT_FAILED in this path; the throw is swallowed because
   the user has already seen the underlying Stripe error and the
   backend cleanup is the desired side-effect.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 10:32:59 +00:00
2026-04-01 19:18:11 +05:30
2026-01-27 14:22:37 +05:30
2026-04-01 19:18:11 +05:30
2024-11-20 14:45:58 +01:00
2025-12-31 18:40:36 +05:30
2024-05-31 15:06:51 +02:00
2025-12-31 18:40:36 +05:30
2023-08-31 18:18:06 +02:00
2026-04-01 19:18:11 +05:30
2026-04-01 19:18:11 +05:30
2026-03-31 18:20:51 +05:30
2025-12-31 18:42:45 +05:30
2026-04-01 19:18:11 +05:30
2026-04-23 08:59:50 +01:00
2024-08-09 17:15:32 +02:00
2022-11-14 16:01:35 +00:00
2025-12-31 18:40:36 +05:30
2024-12-30 16:51:41 +05:30
2022-11-14 16:06:47 +00:00
2025-05-15 12:05:36 +02:00
2026-02-20 13:55:49 +05:30

Console 🖥️

Discord Twitter Account appwrite.io

Appwrite

Appwrite Console is the Graphical User Interface that developers interact with when accessing their Appwrite instance in the web browser.

Appwrite Console has been built with the following frameworks:

Developer Experience

Developer experience has always been a priority for Appwrite since its inception. The web console is one of the most important pieces of the developer experience puzzle. The new web console not only looks better but serves a functional purpose.

Simplicity

The new UI reduces visual load with more purposeful color use and more selective inclusion of information.

Consistency

The new Appwrite Console uses a consistent UI library, so navigating from page to page and task to task will flow seamlessly.

Accessibility

Console 2.0 is designed to be accessible, from design to code. Console 2.0 is also designed to be accessible to developers of all skill levels. Complex workflows will provide more guidance for newer developers and promote good technical decisions.

Scalability and Collaboration

The new console is more maintainable and welcoming to community contributions. Console 2.0 is built using Svelte instead of our own library. It's better documented and well-known, making it easier for developers to contribute to Appwrite.

Contributing

All code contributions, including those of people with commit access, must go through a pull request and be approved by a core developer before being merged. This is to ensure a proper review of all the code.

We truly ❤️ pull requests! If you wish to help, you can learn more about how you can contribute to this project in the contribution guide.

Security

For security issues, kindly email us at security@appwrite.io instead of posting a public issue on GitHub.

Follow Us

Join our growing community around the world! See our official Blog. Follow us on Twitter, Facebook Page, Facebook Group, and Dev Community or join our live Discord server for more help, ideas, and discussions.

License

This repository is available under the BSD 3-Clause License.

S
Description
The Console that makes Appwrite tick from the browser 🖥
Readme BSD-3-Clause 146 MiB
Languages
Svelte 84.2%
TypeScript 15.5%