#nielsen_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1372657661971005601
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello, Stripe doesn't have a built-in way to do this. The standard way to do this now is writing code on your side to check the payment method's fingerprint against the fingerprints of existing PMs of that type.
https://docs.stripe.com/api/payment_methods/object?api-version=2025-04-30.basil#payment_method_object-card-fingerprint
I will add to the feature request around this, but that is where our APIs capabilities are now
how can I check the fingerprint without adding it first? I ask because I have been told we get charged for every payment method created.
It is possible to create a ConfirmationToken object which has a preview of the card object and check the preview object
https://docs.stripe.com/js/confirmation_tokens/create_confirmation_token
I'm guessing this is just for the client side? It requires sending the credit card details through this call right?
You can call it and pass it the payment element and it will collect the details similar to how it does when confirming. So your PCI compliance requirements would stay the same
Also I don't know much about fees but am not finding info on a fee per payment method creation from Stripe. I definitely could be missing something, but it may be worth it to double check on that on your end.
Yea I don't know if this is some contract specific thing my company has but I'm told it's $0.75 per created bank account
The confirmation token, doesn't create the payment method then?
What does it return?
Ah gotcha, that may be financial connections related (again no expert there). FC would be run before the confirmation token is created, so I'm not sure how that would effect your situation.
It returns a ConfirmationToken object, they are meant to store the details temporarily for inspection or if you want to confirm them somewhere else. So you can create the confirmation token, check its fingerprint, and then call confirm with the confirmation token instead of the payment element to attempt to confirm the seutp intent.
This doc shows what I am talking about there https://docs.stripe.com/payments/build-a-two-step-confirmation#create-ct
Ok I see, thank you. I'll take this information and contact our account rep to see if this method will avoid the fee
One more question
Sure!
We also create payment methods directly from our backend service. We send you the details securely through a proxy. We use the PaymentMethod API directly. Is there a way to accomplish the same thing using that?
Taking a look
What are you really trying to achieve here? Are you saying that you already have the payment method details and then you'd want to create the payment method on server side, then use it to create a payment? You initially asked if you can omit using SetupIntents, and the you switched. I want to ensure that I fully understand your ask/ flow before making any recommendations.
Yes, I apologize for that, I just remembed that we have 2 flows for adding payment methods. In both, we create a payment method in Stripe and then create our own payment method that references the Stripe one.
One is a flow from a web app, and the other is a flow from a automated phone system
both flows need to be able to not have duplicate payment methods.
We normally have been able to do this by first created the payment method, and once we see that the fingerprint is the same, we detach
but it looks like this cause a charge
At this instance, 'payment method in Stripe', with the above flow my teammate suggested you can use the confirmation token to look at the fingerprints
Does the PaymentMethod api, support confirmationTokens too?
Can you reword that please?
Instead of creating the payment method, you would use the confirmation token
How would I do that from the backend?
You're creating the 'payment method in Stripe' so instead of using the back end to create the payment method. You need use confirmation token on the client-side.
ah there in lies the issue for us then. We don't have a client side for the automated phone system
The client is just a system that calls our servers directly and our servers then relay the payment details to Stripe
Are you using something like https://stripe.com/resources/more/moto-payments-101 ?
You stated 'We don't have a client side for the automated phone system'
so it sounds like there is not client system to input that payment method data no?
Let's step back. What do you want your flow to look like? How are you collecting these payment method details?
The "client" is a customer that sends us the card details through our rest api
But there has to be a place where you take that data to make that request no?
yes, but it's not in our control.
The client or customer has an automated phone system that collects the payment details. This system then takes that data and sends it directly to our servers. Our servers then relay that to Stripe.
This flow relies on the client not knowing anything about Stripe
How are you passing that on the server side? Just creating a payment method object on the server-side by passing the card payment method details?
I need to fully understand your exact flow end-to-end to ensure that my recommendation is what would solve your use case
so, we get a request with the credit card details(encrypted). We take those details and pass them to Stripe through our proxy, which decrypts the details before sending to Stripe.
Then from the response we get from Stripe, we create a payment method in our database with a reference to the stripe payment method id.
๐ Hi there - I'll be stepping in for pgskc, who had to step away
Would it be possible to have a look at an example of the output you get from this? As in, what you receive from Stripe? I assume you're talking about a pm_123 object
And, to be clear, you're just asking about how you can avoid creating duplicates given the above flow, right?
yes
Effectively we just get the normal output from this call
Stripe.apiKey = "sk_test_BQokikJOvBiI2HlWgH4olfQ2";
PaymentMethodCreateParams params =
PaymentMethodCreateParams.builder()
.setType(PaymentMethodCreateParams.Type.US_BANK_ACCOUNT)
.setUsBankAccount(
PaymentMethodCreateParams.UsBankAccount.builder()
.setAccountHolderType(
PaymentMethodCreateParams.UsBankAccount.AccountHolderType.INDIVIDUAL
)
.setAccountNumber("000123456789")
.setRoutingNumber("110000000")
.build()
)
.setBillingDetails(
PaymentMethodCreateParams.BillingDetails.builder().setName("John Doe").build()
)
.build();
PaymentMethod paymentMethod = PaymentMethod.create(params);
We take the paymentMethod, and create our own payment method. Let me see if I can share a request id
Here is a request ID
req_T6jSzITiRbIUj6
When that call returns, we deserialize the response as a PaymentMethod
That's great - thank you - so is req_T6jSzITiRbIUj6 being made by the proxy you were describing?
Correct
so a more complete flow is.
client calls our backend servers
servers redirect call to secure proxy for cc detail encryption
proxy calls our servers with encrypted details
our server calls the proxy again with stripe api endpoint
proxy decrypts details and forwards to stripe
stripe responds to proxy
proxy returns the response to us
we handle it accordingly
When you create the Payment Method, does the Customer already exist and you just attach afterward, or do you create and attach after creating the PaymentMethod
The customer already exists and we attach after
I think your ideal state would be that Stripe returned a 4xx if a Payment Method with identical details already exists - not uncommon - but unfortunately our APIs don't work that way. So you would have to do some logic at some point before creating the Payment Method if you want to avoid duplicates before creation.
I think an approach would be to call the "List a Customer's Payment Methods" endpoint, look at the output and compare the details you have with what already exists for the Customer in Stripe and make a determination on if you think its the same card