0

I installed Firebase stripe extension. Every time user is created, the extension creates stripeId.

I created buttons to buy subscription plans

<a class="btn btn-primary" href="https://buy.stripe.com/test_5kA8x65CAeF23Cg8ww" role="button">BASIC</a>
<a class="btn btn-primary" href="https://buy.stripe.com/test_7sI00A0igbsQ4Gk7st" role="button">Premium</a>

How to pass user stripeId in link, so Stripe knows which customers buy it?

Now even customer use the same email, Stripe creates new customer.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
awariat
  • 331
  • 1
  • 5
  • 22

1 Answers1

0

When using Payment Links, you can pass some URL parameters like client_reference_id and prefilled_email as mentioned in this doc. However this will still create a new customer object every time someone make a purchase.

If you want to reuse existing customer objects, you cannnot use Payment Links. Instead you should use Checkout Sessions and set the customer parameter.

soma
  • 1,332
  • 1
  • 2
  • 8