#blinkdaffer
1 messages · Page 1 of 1 (latest)
No you don't. SetupIntent is to collect card information. Token is another older API
so how would i attach a token id to a customer
?
let me explain a bit, so from Frontend i receive a tokenid, i want to use this token id and attach it to the customer as a payment method
I see. How are you received a token in the first place?
generated on the client side
stripe?.createToken(cardNumber).then((value) => {
value.token && onPayWithCard({ tokenId: value.token.id });
});
Okiee
what would be the correct way to attach this token to the customer considering we want to use it for recurring payments
?
So when you have this token already, you can use it directly in PaymentIntent
But in the first place, this is a legacy API and you should move over the SetupIntent completely
can directly use it in subscriptions.create
Probably not. It's legacy you know..