#cow-paymentintent-clientsecret

1 messages · Page 1 of 1 (latest)

south barnBOT
fluid plover
#

Hi 👋

Can you tell me what you mean by "they"?

fathom rover
#

Oh, yeah sorry, this is a reply to this:

Hi there!

Been using this lovely API for an ecommerce site I'm writing and I want to check something pretty important that I made an assumption on;

Are ClientSecrets returned from the PaymentIntent Flow Guaranteed to be unique?

As it stands I am storing transaction records and I plan on just using those as the Tables primary key. Just want confirmation those will definitely be consistently unique.

So "they" is the ClientSecrets

fluid plover
#

Ah. Well the client secret includes the Payment Intent ID as part of it and that will be unique to your account

fathom rover
#

Right, but I'm just trying to make super clear; If I generate a token let's say today, there is no chance any token I generate in the future for a different transaction will be the same, is there?

#

As that would cause a key collision in my Table

#

ie; can I, for all intents and purposes, treat these like GUUIDs?

south barnBOT
karmic oasis
#

client secrets are unique but really you should solely rely on the PaymentIntent id pi_123

#

cow-paymentintent-clientsecret

fathom rover
#

Okay, yeah easy switch I think -- assuming I also get that when I init the PaymentIntent, right?

karmic oasis
#

yes

fathom rover
#

Okay awesome. Thanks for this prompt help, ya'll make this a superb dev experience.