mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-24 21:04:03 +08:00
<!--
Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md
-->
<!-- ELLIPSIS_HIDDEN -->
----
> [!IMPORTANT]
> Enhances payments system with stackable items, Stripe account
management, and improved purchase flow, including schema updates and new
tests.
>
> - **Behavior**:
> - Adds quantity support for stackable offers in
`apps/backend/src/lib/payments.tsx` and
`apps/backend/src/app/api/latest/payments/purchases/purchase-session/route.tsx`.
> - Introduces Stripe account info viewing and onboarding in
`apps/backend/src/app/api/latest/internal/payments/stripe/account-info/route.ts`.
> - Implements "Include by default" pricing and "Plans" group in
`apps/backend/prisma/seed.ts`.
> - **Schema Changes**:
> - Adds `quantity` and `offerId` columns to `Subscription` table in
`apps/backend/prisma/migrations/20250821212828_subscription_quantity/migration.sql`
and
`apps/backend/prisma/migrations/20250822203223_subscription_offer_id/migration.sql`.
> - Adds `stripeAccountId` column to `Project` table in
`apps/backend/prisma/migrations/20250825221947_stripe_account_id/migration.sql`.
> - **Improvements**:
> - Enhances purchase flow to return Stripe `client_secret` and handle
subscription upgrades/downgrades in
`apps/backend/src/app/api/latest/payments/purchases/purchase-session/route.tsx`.
> - Updates item management with new actions and protections in
`apps/backend/src/app/api/latest/payments/items/[customer_type]/[customer_id]/[item_id]/update-quantity/route.ts`.
> - Tightens validation for customer type and offer conflicts in
`apps/backend/src/app/api/latest/payments/purchases/validate-code/route.ts`.
> - **Testing**:
> - Adds extensive tests for new payment features in
`apps/e2e/tests/backend/endpoints/api/v1/internal/payments/setup.test.ts`
and
`apps/e2e/tests/backend/endpoints/api/v1/payments/purchase-session.test.ts`.
> - **Misc**:
> - Removes unused `stripeAccountId` and `stripeAccountSetupComplete`
from `branchPaymentsSchema` in
`packages/stack-shared/src/config/schema.ts`.
> - Refactors currency constants into `currency-constants.tsx` in
`packages/stack-shared/src/utils`.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup>
for
|
||
|---|---|---|
| .. | ||
| 20240306152532_initial_migration | ||
| 20240313024014_authroization_code_new_user | ||
| 20240418090527_magic_link | ||
| 20240507195652_team | ||
| 20240518151916_email_config | ||
| 20240520152704_selected_team | ||
| 20240528090210_email_templates | ||
| 20240529121811_spotify_oauth | ||
| 20240608142105_oauth_access_token | ||
| 20240610085756_outer_oauth_info | ||
| 20240618150845_system_team_permission | ||
| 20240701161229_fix_selected_team_and_added_ondelete | ||
| 20240702050143_verification_codes | ||
| 20240707043509_team_profile_image | ||
| 20240714031259_more_backend_endpoints | ||
| 20240722004703_events | ||
| 20240725161939_team_profiles | ||
| 20240726225154_facebook_config_id | ||
| 20240730175523_oauth_access_token | ||
| 20240802011240_password_reset_verification | ||
| 20240804210316_team_invitation | ||
| 20240809231417_disable_sign_up | ||
| 20240810052738_multi_factor_authentication | ||
| 20240811194548_client_team_creation | ||
| 20240812013545_project_on_delete | ||
| 20240815125620_discord_oauth | ||
| 20240820045300_client_read_only_metadata | ||
| 20240823172201_gitlab_oauth | ||
| 20240830010429_event_index | ||
| 20240901224341_connected_account | ||
| 20240904155848_add_bitbucket_oauth | ||
| 20240905201445_ms_tenant | ||
| 20240909201430_project_on_delete | ||
| 20240910211533_remove_shared_facebook | ||
| 20240912185510_password_auth_unique_key | ||
| 20240912212547_linkedin_oauth | ||
| 20240914210306_apple_oauth | ||
| 20240917182207_account_deletion | ||
| 20240919223009_x_and_slack_oauth | ||
| 20240923165906_otp_attempts | ||
| 20240929194058_remove_otp_contact_channel | ||
| 20241007162201_legacy_jwt | ||
| 20241013185548_remove_client_id_unique | ||
| 20241024234115_passkey_support | ||
| 20241026024655_user_sorting_indices | ||
| 20241116221711_geolocation_events | ||
| 20241124163535_verification_code_handler_index | ||
| 20241201043500_idp | ||
| 20241207223510_neon_project_transfers | ||
| 20241220033652_event_indices | ||
| 20241223205737_remove_empty_profile_images | ||
| 20241223225110_fill_empty_project_config_values | ||
| 20241223231022_remove_empty_team_profile_images | ||
| 20241223231023_onlyhttps_domains | ||
| 20241228033652_more_event_indices | ||
| 20250206063807_tenancies | ||
| 20250206073652_branch_event_indices | ||
| 20250207071519_tenancies_finalization | ||
| 20250214175437_create_user_indices | ||
| 20250221013242_sent_email_table | ||
| 20250225200753_add_tenancy_cascade | ||
| 20250225200857_add_another | ||
| 20250227004548_make_project_description_non_nullable | ||
| 20250303231152_add_cli_auth | ||
| 20250304004231_merge_oauth_methods | ||
| 20250304200822_add_project_user_count | ||
| 20250310172256_add_id_and_impersonation_field | ||
| 20250320223454_anonymous_users | ||
| 20250325235813_project_user_permissions | ||
| 20250327194649_api_keys | ||
| 20250401220515_permission_unique_constraint | ||
| 20250415175023_environment_config_override | ||
| 20250425171311_remove_old_config | ||
| 20250501033443_remove_unnecessary_enums | ||
| 20250520185503_rename_neon | ||
| 20250612094816_sign_in_invitation | ||
| 20250619200740_user_notification_pref | ||
| 20250623074155_source_of_truth | ||
| 20250624065420_project_config_override | ||
| 20250624070114_remove_mirroredproject_fkey | ||
| 20250710181826_tenancy_foreign_keys | ||
| 20250711232750_oauth_method | ||
| 20250712011643_thread_messages | ||
| 20250714205101_oauth_token_is_valid | ||
| 20250715181353_remove_msg_role | ||
| 20250717230045_remove_triggers | ||
| 20250718232921_drop_user_count | ||
| 20250723001607_twitch | ||
| 20250801204029_logo_url | ||
| 20250805195319_subscriptions | ||
| 20250806171211_add_team_based_project_ownership | ||
| 20250809002037_item_quantity_change | ||
| 20250820164831_custom_customer_types | ||
| 20250820175830_grant_internal_users_team_admin | ||
| 20250821175509_test_mode_subscriptions | ||
| 20250821212828_subscription_quantity | ||
| 20250822203223_subscription_offer_id | ||
| 20250825221947_stripe_account_id | ||
| migration_lock.toml | ||