#NordWest

1 messages ยท Page 1 of 1 (latest)

spiral waveBOT
covert umbra
ionic robin
#

@covert umbra thanks, but how we get those fees (formula) corect

#

it seems to me that it would need to be made smart, I mean use IP location etc

covert umbra
#

it's not based on IP

#

if you mean the differing fee for international cards(https://stripe.com/ie/pricing), that is based on the country field of the PaymentMethod object

ionic robin
#

Thank you so much that clears up a lot of questions. So basically there is no way to know in advance what the charge will be on a international market?

#

We want to add the fee to the total cost of the product. For example a product is 1500$ we cannot add the fee in advance unless the customer enters the card?

novel jacinth
#

Hi! I'm taking over this thread.

#

Yes the fee will depend on the country and payment method used, so you can't really know in advance.

#

We want to add the fee to the total cost of the product.
You should just add a simple flat fee on top of your price, to take into account the costs associated with the transaction.

ionic robin
#

I see, that just confirms what we were thinking. Thank you so much.

#

Should I open a new thread to ask a different question?

novel jacinth
#

You can ask your question here.

ionic robin
#

Thank you.

#

I see Stripe allows test integration.

#

but it is mentioned that we should not use card numbers but rather payment_method: 'pm_card_visa'.

#

So, if the payment method is pm_card_visa and no card data is provided how does Stripe know which card was used?

#

Can we run integrated automated testing in parallel with the live mode on the same account? I mean while the prod env is running, we will run some automated tests using the test key on the same account?

novel jacinth
#

If you are manually inputting data into the payment form, you can use test cards like 4242 4242 4242 4242.
But otherwise it's simpler to use things like payment_method: 'pm_card_visa'
And you can see all pm_xxx by clicking on the "payment method" tab on this page: https://stripe.com/docs/testing

ionic robin
novel jacinth
#

What do you mean by "no card date are required"?
If you run this code, you will get a PaymentIntent that succeeded.

const paymentIntent = await stripe.paymentIntents.create({
  amount: 500,
  currency: 'gbp',
  payment_method: 'pm_card_visa',
  confirm: true
});
#

If you want a PaymentIntent that is declined:

const paymentIntent = await stripe.paymentIntents.create({
  amount: 500,
  currency: 'gbp',
  payment_method: 'pm_card_visa_chargeDeclined',
  confirm: true
});
ionic robin
#

I see .... you are right ... all I wanted to understand is that if I run tests from code as such:

const paymentIntent = await stripe.paymentIntents.create({
  amount: 500,
  currency: 'gbp',
  payment_method: 'pm_card_visa',
  confirm: true
});

I don't need to send card_details or anything else?

novel jacinth
#

Yes exactly, there's no need to add any additional detail, so it makes everything simpler.

ionic robin
#

sound, thank you ๐Ÿฅน

#

I am supper grateful

novel jacinth
#

Happy to help ๐Ÿ™‚

potent moon
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

ionic robin
#

Just wanted to understand one more thing

#

there are multiple payment methods, they are available for specific countries

#

If we are based on the UK for example, our charge currency is $ ... and for example on of the payment methods is listed as available for the UK ... but not available for China, can Chinese clients still pay us using that method?

potent moon
#

sorry I'm not sure I follow, would you mind elaborating?