#Gautam

1 messages ยท Page 1 of 1 (latest)

limpid jacinthBOT
heavy ivy
#

Hi ๐Ÿ‘‹

hybrid thorn
#

HI๐Ÿ‘‹

heavy ivy
#

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?

hybrid thorn
#

Yes

heavy ivy
#

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

hybrid thorn
#

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.

heavy ivy
#

You can not allow the Customer to update their payment methods

hybrid thorn
#

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.?

heavy ivy
#

This will be used to determine what currencies and languages to show the Customer Portal and Checkout page in

hybrid thorn
#

Thanks๐Ÿ‘

heavy ivy
#

Happy to help ๐Ÿ™‚

hybrid thorn
#

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}`,
        });
heavy ivy
#

Okay so in this case you are looking for a deep link redirect?

#

Where the Checkout Session redirects to the mobile app?

hybrid thorn
#

it will redirect to the url that stripe will provide

#

in session.url

heavy ivy
#

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?

hybrid thorn
#

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.

heavy ivy
#

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

hybrid thorn
#

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

heavy ivy
#

I think you would need to pass a deep link to your mobile app (not the string "MOBILE"). Otherwise the phone's OS won't know to redirect the response back to the app itself

#

Unfortunately, Deep link syntax is different between iOS and Android apps as far as I am aware.