#Kiran-tokens
1 messages ยท Page 1 of 1 (latest)
I don't know of a specific amount of time, but i do believe they expire quickly - you would have to regenerate a new token
Actually nevermind, I may be wrong about that - give me a minute
Okay
So they don't actually "expire" per-se, but they are meant to be used immediately after creation since some information (like CVC) is only available for a short period of time and using it after the fact may increase declines. Is there a reason you can't take the token immediately and trade it in for a Payment Method for future use?
We are designing a flow where authorizing a token after it is generated may sometimes delay for quite longer time due to user interaction delay and some async operations. Also we are still using cards api right now. Is there a way we can internally refresh the token with Stripe instead of re-generating the token.
Also if we can know the exact expiry period of the token then that could help us in maintianing a timeout for refreshing or regeneration of tokens.
If you're still using our older APIs, you can still attach the token to the customer (https://stripe.com/docs/api/customers/create#create_customer-source) immediately and then use it in a charge/payment later on.
The timeout is around 10 minutes, but unfortuantely there isn't a way to just "refresh" the token, you would have to create a new token.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
We are also using Customer api to save individual customers cards. But I beleive we need to use only one token per transaction. So what you are suggesting is we can save that generated token to a customer only for that transaction and use it later when authorizing?
FYI, we are currently using Payment intents with Cards and customers api.
Hello ๐ , taking over for @abstract iris let me get caught up
sure
If you save the card to the customer it would not technically be only for that transaction any more but yes you will be able to use it later when authorizing
No its about tokens we generate before each transaction for Apple pay and Gpay.
๐ I'm still around, just in a meeting so responses may take a bit longer
sure take your time
"So what you are suggesting is we can save that generated token to a customer only for that transaction and use it later when authorizing?" -> Yes, if you don't have the guarantee that you'll use the token w/in the 10 minutes and don't want to have to regenerate the token then the best option would be to save it to the customer to give it the best chance of being successfully used in a transaction