#Gautam
1 messages ยท Page 1 of 1 (latest)
Hi ๐
HI๐
The drop down here is for billing information related to the credit card being used.
Are you saying you want to restrict your customers to only using credit cards in the US?
Yes
Unfortunately I don't think you can do this. You can restrict the currency the user can pay in to only accept USD but if they have a valid USD payment method with a billing address in another country they can still use it AFAIK
In the cutomer portal also, can't restrict the use to use for only in the US cards only right?
Actually this is the requirement of our USA Client.
He does't want the dropdown for the phone No and county.
If there is any way to customise it via the dashboard or code then it would be great.
You can not allow the Customer to update their payment methods
If you look here: https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-customer_update-allowed_updates. you will see the different configurations you can use to change what the Customer can and cannot update via the portal
Okay looking
No, I want to allow the customer to update their payment method, but restrict it only for US only.
Actually the issue is happening mainly when I am redirecting the user to the checkout page or customer portal then in the web App by default country is US selected and phone no is also the showing in the US format, but in the Mobile by default the country and phone no is not US selected, which is very painful for the user to change every time according to him.
So, at least is there any option for showing the default one US when redirecting from the Mobile.?
Yes, you can set their preferred_locales property by updating the Customer record: https://stripe.com/docs/api/customers/update#update_customer-preferred_locales
This will be used to determine what currencies and languages to show the Customer Portal and Checkout page in
Thanks๐
Happy to help ๐
Hey I want one more help, When the I am redirecting the user from the webApp to the the stripe customer portal then for going back I am giving our website url in the return url. and this is working fine.
But when the user if going to this portal via his mobile the in that case there is no exact url so the user can go to the back.
I there any way to go back in Mobile?
My backend code
const session = await stripe.billingPortal.sessions.create({
customer: customer.id,
return_url: `${process.env.REACT_APP_WEB_BASE_URL}`,
});
Okay so in this case you are looking for a deep link redirect?
Where the Checkout Session redirects to the mobile app?
Sorry I think I'm unclear on what you mean by "go back in Mobile"? Where is the customer coming from and where do you want them to go to?
See I have both the Mobile App and the website. but the backed of both is same. so while creating the checkout or Billing session I am giving the return url which is my website url, which is usefull when the user click on the Return option then I am redirecting to the user in my website.
for the Mobile App I am also redirecting the user to the same session.url by opening the web view in the Mobile App.
The issue is happening when a user go to the Billing portal via the Mobile and when clicking on the back button then it redirects to the same website url. but I want that when the user clicks form the Mobile instead of redirecting to our website url. he should be able to go to the Mobile App home screen. how I can achieve this thing?
For your more understanding
I am redirecting to the user on the session.url which stripe will provide by opening the webView in the Mobile.
but after going back to that screen threre is no any option to go back to his previous screen, bacause that is the stripe checkout page and in the return_url parameter I am giving the my webApp link.
Okay so you would need to create a deep link to the Mobile app when you create the Checkout Session. This would mean your back-end would need to know if the user is on Mobile or Web
yeah I am detecting that thing in the backend and doing like this
```js return_url: (payloadData.redirectTo=== "MOBILE")? await window?.ReactNativeWebView?.postMessage("WINDOW_CLOSED"):${process.env.REACT_APP_WEB_BASE_URL}/success?session_id={CHECKOUT_SESSION_ID},
but window?.ReactNativeWebView?.postMessage("WINDOW_CLOSED") is not woring in backend