#Badr-apple-pay-domain
1 messages · Page 1 of 1 (latest)
Hi there, you should only need to register it once however you do have to register it for both top level domains and subdomains. Is this a new subdomain?
So did you register test-payzone.easypaymentsplus.com?
yep
Can you see the button at the top of the page if you visit https://stripe.com/docs/stripe-js/elements/payment-request-button?
not sure which button do you mean but if it's about my device my not supported , it's not the case here
I have same deploy another domain which is working fine
https://dev-payzone.easypaymentsplus.com/fundraising/campaign/1172/donate/
but we moved to new env but it's not working there https://test-payzone.easypaymentsplus.com/fundraising/campaign/75/donate/
fyi, we are stripe connect. so we verify sub accounts from the code not the stripe dashboard
Gotcha, so you are using Direct Charges? Can you provide the account ID where you verified that subdomain?
acct_1F2EnuIzQrXzOQ2M
Okay yeah the domain looks to be registered fine there.
How are you initializing Stripe with the Connected Account ID?
didn't fully get what you mean , is there more than one way ? as I khow the account owner can click connect somewhere on our website and we redirect the user to stripe, they connect to us , and stripe send them back
Sorry, I mean your code.
How are you initializing Stripe client-side.
It looks to me like you aren't passing the Connected Account ID here with your publishable key.
we just don't do anything on client.
as I saw before it was optional.
it's exactly same code and it's working under
https://dev-payzone.easypaymentsplus.com/fundraising/campaign/1172/donate/
both are test environments,
One sec, doing some testing
Okay this is odd because yeah I can create test payments on both sites and they do tokenize on that account. The domain does look to be registered correctly via the platform....
😬
no worry, take your time
Okay so it looks like these pages are using different publishable keys
Did you roll your keys recently?
no we didn't. this is different environment but I'm expecting all environments have same variables .
maybe I'm wrong, how many publish key per account ? isn't one ?
oh that publish key is just the sub account connect to us and stripe replay that back. so yeh it's normal to be different
but both domains belong to same sub account
yes
yep and we store it in db
And you are using that key
Okay okay
So really when you use Direct Charges you aren't supposed to use that key. That is legacy method of creating requests on a Connected Account.
Really you should be doing as so: https://stripe.com/docs/connect/authentication#adding-the-connected-account-id-to-a-client-side-application
Where you use your platform key and not your Connected Account key
Now for this specific scenario
It looks like you actually registered dev-payzone.easypaymentsplus.com in both live and test mode on the Connected Account
Using you platform key
That is why the button is showing when you use the test publishable key for that Connected Account
test-payzone.easypaymentsplus.com was only registered in livemode.
Which means it will work if you use the platform publishable test key and pass the Stripe account header.
Instead of using the publishable key that is returned to you from connecting the account.
I'm still a bit confused as to how you are getting a new publishable key for the Connected Account each time.... didn't you only complete OAuth once?
think about dev domain and test domain as two different websites , each one of those has it own database and own way of deployment ( the code and variables are same).
so when I OAuth on dev domain .
I have to start fresh when I go to test as it's new database and I need to do the OAuth again there.
still didn't read fully what you sent . let me check
Okay that makes sense in how you are getting different publishable keys, but really the solve here is that you should never be initializing using the publishable key from the Connected Account here to make requests via your platform. You should use your platform key and pass the Stripe Account header for the relevant Connected Account.
this chat was couple of days ago but I can't find it. where Karllekko asked me to use the live key and pass the other one into the front end
Yeah you are doing that correctly to register the domain
But when you initialize Stripe on the page, you are using the publishable key from the Connected Account
Instead of using the same route as when you register the domain (use your platform key + Connected Account header)
so is adding the Connected Account header there should make it work ?
Yes
thanks a millions for your help. 🙏 you are the best 💪