Knowledge Base / How can we handle the situation when users use different email addresses for signing up on our platform and making payments via Stripe, resulting in missing email data?

How can we handle the situation when users use different email addresses for signing up on our platform and making payments via Stripe, resulting in missing email data?

Question

How can we handle the situation when users use different email addresses for signing up on our platform and making payments via Stripe, resulting in missing email data in our internal platforms?

Answer

To address the issue of missing email data when users use different emails for sign-up and Stripe, you can ensure that Stripe customers are correctly linked to their initial sign-up email through a couple of methods:

  1. For Stripe Checkout: Utilize the 'client_reference_id' to pass your internal customer identifier when creating a checkout session or payment link. Before redirecting to Stripe, trigger an event to Able with a 'keys' parameter including the original email and internal id. Example event: "keys": { "email": "original_email@x.com", "client_id": "abcdefg" }. This ensures that Able knows which Stripe customer corresponds to the sign-up email, regardless of the email entered during the Stripe Checkout process.
  2. For API-created Stripe Customers: If a different email is used via the API when creating a Stripe Customer, send an event to Able with both the original email and the Stripe customer id prefixed with 'stripe:', and, if applicable, a new email. The event would look like this: "keys": { "email": ["original_email@x.com", "new_email@y.com"], "client_id": "stripe:cus_abcdEFg" }. This should be done immediately after checkout to allow Able to map the purchase to the correct email.

Refer to the Stripe Documentation for the 'client_reference_id' usage and consult Able's Integration Guides for specifics on event tracking:

This approach will ensure data consistency across your internal and Stripe platforms, even when customers use multiple emails.

What's next?