#Tomato-stripe-fees

1 messages · Page 1 of 1 (latest)

shy harbor
delicate ocean
#

Sorry don't understand. Do u suggest me to add zip code field?

shy harbor
#

Zipcode is required for card payments. The Card Element is from stripe.js and is used to collect card details. The Card Element collects zipcode automatically.

delicate ocean
#

I think we use this one (without zip code)

#

And if so - how could we grab zip code value with stripe.js?

shy harbor
#

It is sent back when the payment method is confirmed

delicate ocean
#

Back to where

#

Could u please give a link to stripe.js API doc. How could i get country or zip code

shy harbor
#

You have the doc that would show you that. There is no doc that shows exactly how to get the zipcode, as it is returned when the payment method is confirmed. I would recommend following that guide to build an integration that accepts a card payment first then come back here if you have more questions

delicate ocean
#

We already have app that successfully accept payments

#

Could u please write instruction what i need to do to know card country

#

I see change event

#

But how with it -get zip code?

shy harbor
delicate ocean
#

We use only

<PaymentElement
onReady={() => {
setLoading(false)
}}
/>

#

So we use "card" Payment Method

#

Maybe i need to say that we use custom payments with stripe.js

shy harbor
#

When in the payment flow do you need zipcode?

delicate ocean
#

No

#

here's what it looks like now

shy harbor
#

That's not helpful

#

I asked:

When in the payment flow do you need zipcode?

#

Why can't you simply retrieve the Payment Method after it is created?

delicate ocean
#

We don't need it at all

shy harbor
#

Don't need what?

delicate ocean
#

We don't use Payment Method at all too

delicate ocean
shy harbor
#

Okay, but country is also on the Payment Method

#

So what's the problem with retrieving the Payment Method after it is created?

delicate ocean
#

I don't understand how to retrieveing Payment Method

#

So i need Payment Method Id. How could i get it from "PaymentElement" form?

shy harbor
#

You can't. The payment element is used to create a payment method. You have to create the payment method for there to be a payment method id.

delicate ocean
#

ok, the method is not suitable for us

#

we don't need to create payment method

#

how else we can get payment card country?

shy harbor
#

Via the Dashboard

#

What are you actually trying to do with the country?

delicate ocean
#

My first message

#

"Hello. I need to calculate Stripe fee, before payment. I see that i need to know country of payment card to understand which price to use"

shy harbor
#

Yes, but how are you calculating fees before a payment is created?

#

What use is the country to you?

delicate ocean
#

With formulas

#

2.9% for not Europe cards

#

So i need get card country to understand which fee to apply

shy harbor
#

So, you will need to create the Payment Method, in order to know what country the customer's fees are going to be tied to. The fees are dependent on the Payment Method's billing_details. If you don't have a Payment Method, you don't know what country the payment fees are going to come from.

delicate ocean
#

Does stripe generate billing_details by card number?

#

I know that it is possible to know card country by its first 8 numbers

shy harbor
shy harbor
#

The customer enters their billing zipcode or their full billing address when the Payment Method is created

#

That's where that data comes from

#

The Payment Element does everything at once, so there's no way to extract that info before the payment is made