I want to set by default country as UAE. is it possible to set it? and also is it possible to set it server-side?
All the time it's set United State. But this problem is only on Android and Ios SDK. It's automatically set UAE on web.

Specify default values for billing details collected in the payment sheet by setting defaultBillingDetails. PaymentSheet pre-populates its fields with the values provided.
for iOS Swift
var configuration = PaymentSheet.Configuration()
configuration.defaultBillingDetails.address.country = "US"
configuration.defaultBillingDetails.email = "[email protected]"
for Android Kotlin:
var configuration = PaymentSheet.Configuration(...)
configuration.defaultBillingDetails.address.country = "US"
configuration.defaultBillingDetails.email = "[email protected]"
For React Native, please provide the defaultBillingDetails when initPaymentSheet
You can refer below example
const {error} = await initPaymentSheet(
{
defaultBillingDetails: {
address: {
country: 'HK',
},
}
}
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With