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

Recover abandoned carts #4

Merged
merged 2 commits into from
Feb 23, 2022
Merged

Recover abandoned carts #4

merged 2 commits into from
Feb 23, 2022

Conversation

dawn-stripe
Copy link
Contributor

Add a recovery flow for abandoned carts, i.e. Checkout sessions that expire before the customer completes their purchase. This flow has a few pieces:

  • Collect consent from the customer to receive promotional emails: Within our Checkout Session create call, we need to configure Checkout to collect consent
  • Configure recovery options: Within our Checkout session create call we'll add the after_expiration configuration options so that Checkout will generate a recovery URL we can send to customers. We'll also add support for promotional codes to that session so that we can use a discount to incentive our customers to complete their purchase
  • Listen for checkout.session.expired events: when we receive one of these we'll look at whether we have consent from the customer to email them and if so, we'll send them an email with the recovery url from the session.
  • Other enhancements: We reduced our expiration time on the session so we know earlier on that the customer has abandoned their cart. We also started tracking the recoved_from attribute on the session when we get a checkout.session.completed event, this can help us track conversion from our email outreach.

@dawn-stripe dawn-stripe merged commit 58fd7d0 into main Feb 23, 2022
@dawn-stripe dawn-stripe deleted the recover-abandoned-carts branch February 23, 2022 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant