Skip to content

Use invoice preview API to calculate plan pricing for SaaS purchase

What does this MR do and why?

Uses invoicePreview GraphQL endpoint to preview transaction during SaaS purchase flow

  • With the introduction of preview transaction API, this MR also introduces a loading state and error handling for the same

Screenshots or screen recordings

Scenario Screenshot
Large breakpoint subscription purchase LBP_premium
Large breakpoint loading state LBP_loading
Large breakpoint error state LBP_error
Large breakpoint no users state (no change) LBP_no_users
Large breakpoint new group (no change) LBP_new_group
Small breakpoint subscription purchase SBP_premium
Small breakpoint loading state SBP_loading_state
Small breakpoint error state SBP_error
Small breakpoint no users state (no change) SBP_no_users
Small breakpoint new group (no change) SBP_new_group

How to set up and validate locally

  1. Start gdk in SaaS mode GITLAB_SIMULATE_SAAS=true gdk start
  2. Go to a free group's billing page: Settings -> Billing
  3. Click on Upgrade CTA on one of the plans

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #388075

Edited by Vamsi Vempati

Merge request reports

Loading