#DaanVDH
1 messages · Page 1 of 1 (latest)
Yup! https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-country - you should be able to retrieve the PaymentMethod and check card.country
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Is this country code the same on that is delivered by the user? Because at least in test mode the paymentMethod will still be created if the country delivered by the user doesn't match the actual country.
Or is this different for live mode?
When do you mean by the country delivered by the user? Do you mean the billing address country?
Yes
card.country is different then billing address country - card.country is the country the card was issued from, which doesn't necessarily match the billing address of the customer
Ahhh alright, that clears it up for me, thanks!
Follow up, is there a way to get the stripe transaction fees after a payment Intent is confirmed?
You can see it after the payment intent is confirmed + successful - we actually give an example of how to do it here: https://stripe.com/docs/expand/use-cases#stripe-fee-for-payment
Thanks!
So something like this should do the trick right?
var total int64
ts := pi.Charges.Data[0].BalanceTransaction.FeeDetails
for _, t := range ts {
total += t.Amount
}
return total
using the old Go SDK version
Yup! (as long as you're on an older API version)