ott-web-app
ott-web-app copied to clipboard
[IDM-209] - feat: stripe checkout
Description
This pull request implements the backend logic for creating a checkout session within the Access Bridge component. It establishes the necessary interactions with the Sims and Stripe services to validate access plans and create a checkout session.
The Access Bridge now includes the following backend interactions:
Retrieve Available Plans:
- Access Bridge queries Sims for available access plans for a specified site and validates the provided access_plan_id.
Create Stripe Checkout Session:
- Upon successful plan validation, Access Bridge requests Stripe to create a checkout session. This includes sending details like price_id, mode, and redirect_url. Also, the SIMS
viewer_id
is added as a metadata to the checkout session.
Endpoint:
POST: /v2/checkout
Jira card: Create checkout session Design document: AC-SIMS integration
According to our definition of done, I have completed the following steps:
- [x] Acceptance criteria met
- [x] Unit tests added
- [ ] Docs updated (including config and env variables)
- [ ] Translations added
- [ ] UX tested
- [ ] Browsers / platforms tested
- [ ] Rebased & ready to merge without conflicts
- [ ] Reviewed own code