Implement Stripe Checkout when adding cards
Goal
To reduce friction with our current card component (and so that we can drop support for checkout.minds.com), we want to implement Stripe Checkout.
What needs to be done
See https://stripe.com/docs/api/checkout/sessions/create?lang=php for how to generate the session. We are only interested in the 'setup' phase at this moment.
The complicated part is going to be the redirect logic. Stripe Connect can not be placed into an iFrame.
Proposed Flow (via /settings/payments/payment-methods)
- User clicks 'Add new card'
- Redirect to /api/v3/stripe/checkout/setup
-
success_url
andcancel_url
should be/settings/payments/payment-methods
Proposed Flow (via Payment Methods (modals)
- User select 'Add new card' from the dropdown selector
- New card modal still loads and open
/api/v3/stripe/checkout/setup
in a new tab - card modal continues to poll for callback logic (use either cookies or cache)
-
success_url
andcancel_url
should be/api/v3/stripe/checkout/inline-complete
- card modal will update after the callback
QA
The above flow works. Sandboxes should now be able to be easily supported.
UX/Design
See flow above
Personas
Spenders
Experiments
Yes
Acceptance Criteria
-
The flows mentioned above are implemented -
E2E tests may be difficult here so can be optional -
Experiment flag
Definition of Ready Checklist
-
Definition Of Done (DoD) -
Acceptance criteria -
Weighted -
QA -
UX/Design -
Personas -
Experiments
Edited by Mark Harding