#mtalhaabbas
1 messages · Page 1 of 1 (latest)
However, some users are obtaining a trial using an invalid card number or CVC
How did they do it? Which integration do you use?
checkout_session = stripe.checkout.Session.create(
client_reference_id=request.user.id,
line_items=[{
'price': f'{price_id}',
'quantity': 1,
}],
payment_method_types=['card'],
mode='subscription',
subscription_data={
"trial_from_plan": True,
},
success_url=f'{settings.FRONT_END}checkout/success?code={request.user.id}',
cancel_url=f'{settings.FRONT_END}checkout/cancel',
)
The transaction is a Subscription update, which I think is not when you create a new Checkout Session
If you click on the transaction, what id does it have? pi_xxx?
pi_3OGMj3CTvPx3UrOi065YhduD
we're providing trial based subscription when the user checkout, we're not getting any payment instantly but after the trial end when stripe try to deduct payment from the user account then it say invalid account/card number
we need to verify the user card number when the user checkout to overcome the issue, is there any method to do that?
when stripe try to deduct payment from the user account then it say invalid account/card number
Here the Subscription status changed topast dueand indicates that the payment was uncessuful. You can check the Subscription status to avoid providing your service to the customer, in this case
we need to verify the user card number when the user checkout
You can think of using Setup mode. It will verify the card. After a SetupIntent succeeded, you can use the collected Payment Method to manually start a trial Subscription on your backend