Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent multiple stripe trials by card details

We are looking to offer a free trial of our product with payments powered by Stripe Subscriptions.

However, what I'm not sure about is whether it is possible to prevent a user from having multiple emails by limiting it to one trial by card, similar to how sites like Netflix operate.

like image 521
gjames Avatar asked Feb 06 '18 10:02

gjames


1 Answers

You can definitely do this though you have to build the logic yourself. The idea is that you can detect duplicate cards and automatically block ones you've seen before if they try to access the trial.

Stripe returns the fingerprint property on Cards. That property is a unique identifier for a given card number in your account.

This means that if I sign up today with my card and then I come back tomorrow with the same card under a different email address you'd see the same exact fingerprint on both tokens or card objects.

The idea then would be to keep track of all the card fingerprints you see in your database to detect a returning customer. Whenever a customer adds a new card you'd first look if you've seen that card fingerprint before in your database and decide to create the customer or return an error based on this.

like image 184
koopajah Avatar answered Jan 04 '23 02:01

koopajah