Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(console): Service Plans & Billing - Entitlement purchase integration #2400

Closed
3 of 5 tasks
betimshahini opened this issue Jun 14, 2023 · 1 comment · Fixed by #2432
Closed
3 of 5 tasks

feat(console): Service Plans & Billing - Entitlement purchase integration #2400

betimshahini opened this issue Jun 14, 2023 · 1 comment · Fixed by #2432
Assignees
Labels
enhancement Indicates new feature requests

Comments

@betimshahini
Copy link
Contributor

betimshahini commented Jun 14, 2023

Context for Stripe APIs: #2334 (comment)
Dependency: #2390

Implement payment integration with stripe and use it in the Entitlement purchase screen.

  • Add a stripe module that implements the abstraction for interfacing with Stripe for adding entitlements to Stripe payment subscription as well as removing, with parameters for an optional CustomerID and a required metadata structure (see below).
  • Add webhooks endpoints for receiving fulfillment results from Stripe for payment successes and failures.
  • On first purchase, Stripe will include a CustomerID in the success callback. Store this in the servicePlans key in the user's AccountDO. For subsequent purchases/removals on an existing payment subscription, send the CustomerID in the Stripe session creation request.
  • When sending a change to Stripe, add the plan type, amount (positive or negative) and nonce to the Account DO under pendingServicePlans. On a successful fulfillment, the nonce and accountURN from the metadata prop of the webhook response should be checked with values in the pendingServicePlans for that accountURN's DO. If matched, remove entry from pendingServicePlans and reflect the change in the servicePlans key.
  • Cancellation of the Stripe screen should send back to our Billing and Invoicing page, with a toast message indicating so.

Note: unsuccessful responses from Stripe as well as errors and cleanup of non-processed pendingServicePlans will be handled in a separate ticket.

@maurerbot
Copy link
Contributor

CR:
Create a customer via API with email
Deep link to payment / billing setup
Create and update subscriptions via API (no more redirects to stripe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates new feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants