#Badr-apple-pay-domain

1 messages · Page 1 of 1 (latest)

cyan raft
#

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?

cyan raft
#

So did you register test-payzone.easypaymentsplus.com?

torn summit
#

yep

cyan raft
torn summit
#

not sure which button do you mean but if it's about my device my not supported , it's not the case here

#

fyi, we are stripe connect. so we verify sub accounts from the code not the stripe dashboard

cyan raft
#

Gotcha, so you are using Direct Charges? Can you provide the account ID where you verified that subdomain?

torn summit
#

acct_1F2EnuIzQrXzOQ2M

cyan raft
#

Okay yeah the domain looks to be registered fine there.

#

How are you initializing Stripe with the Connected Account ID?

torn summit
#

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

cyan raft
#

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.

torn summit
cyan raft
#

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

torn summit
#

😬

cyan raft
#

Thinking and looking more

#

Give me a few

torn summit
#

no worry, take your time

cyan raft
#

Okay so it looks like these pages are using different publishable keys

#

Did you roll your keys recently?

torn summit
#

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

cyan raft
#

Oh okay I think I see what's going on

#

You are connecting the account via OAuth?

torn summit
#

yes

cyan raft
#

And when you do so, you are returned a key?

#

Right?

torn summit
#

yep and we store it in db

cyan raft
#

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.

#

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?

torn summit
#

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

cyan raft
#

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.

torn summit
cyan raft
#

Yep

#

That last part is the part you aren't doing

torn summit
#

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

cyan raft
#

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)

torn summit
#

so is adding the Connected Account header there should make it work ?

cyan raft
#

Yes

torn summit
#

thanks a millions for your help. 🙏 you are the best 💪

cyan raft
#

❤️

#

Let us know if you run into any further issues.