You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Context for Stripe APIs: #2334 (comment)
Dependency: #2390
Implement payment integration with stripe and use it in the Entitlement purchase screen.
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).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.pendingServicePlans
. On a successful fulfillment, thenonce
andaccountURN
from the metadata prop of the webhook response should be checked with values in thependingServicePlans
for that accountURN's DO. If matched, remove entry from pendingServicePlans and reflect the change in theservicePlans
key.Note: unsuccessful responses from Stripe as well as errors and cleanup of non-processed
pendingServicePlans
will be handled in a separate ticket.The text was updated successfully, but these errors were encountered: