#NordWest
1 messages ยท Page 1 of 1 (latest)
hi, we have this article on that https://support.stripe.com/questions/passing-the-stripe-fee-on-to-customers
@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
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
overal the best way to test this is to use test cards from other countries : https://stripe.com/docs/testing#international-cards , look at the test mode fees : https://stripe.com/docs/expand/use-cases#stripe-fee-for-payment and calibrate your code that predicts the fee using that information/test mode evidence
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?
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.
I see, that just confirms what we were thinking. Thank you so much.
Should I open a new thread to ask a different question?
You can ask your question here.
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?
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
so that mean that if using payment_method: 'pm_card_visa' no card date are required?
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
});
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?
Yes exactly, there's no need to add any additional detail, so it makes everything simpler.
Happy to help ๐
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
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?
sorry I'm not sure I follow, would you mind elaborating?