#yeray - apple pay

1 messages · Page 1 of 1 (latest)

limpid basin
#

Hello! Just starting a thread for you -- I'll review and respond as soon as I can 🙂

unkempt apex
#

Thanks!

limpid basin
#

(the one at the top that you can click)

#

Oh it does appear if you register the domain via dashboard, i see

#

Can you share the API request where you tried to register?

#

Are you using connect at all, or only your own standalone account?

unkempt apex
#

This is the request and the response:

[1] pry(main)> res = Stripe::ApplePayDomain.create({ domain_name: 'https://amenitiz.ngrok.io' }, { api_key: <KEY> })


=> #<Stripe::ApplePayDomain:0x52864 id=apwc_1KyyPHLI8zcR9zK6WpTFKPMX> JSON: {
  "id": "apwc_1KyyPHLI8zcR9zK6WpTFKPMX",
  "object": "apple_pay_domain",
  "created": 1652447987,
  "domain_name": "https://amenitiz.ngrok.io",
  "livemode": false
}

#

Looks like a successful request but it won't show up in the dashboard unless I add it manually.

#

By adding it manually everything works fine. The problems looks like the ApplePayDomain creation is not done properly via API

limpid basin
#

Don't share key values, but can you explain why you label that STRIPE_EXPRESS_SECRET_KEY?

#

Are you using connect here?

#

(This is important as this is complicated by connect configurations)

unkempt apex
#

We currently have a standalone account for us as a company and a stripe express integration for our clients. Currently we're adding the specific key to all the requests, depending on what integration we're using.

#

By default our project has the standalone key so when we want to interact with the stripe express integration we use the specific api_key in the request.

limpid basin
#

You need to use your platform API key + provide the connected account in the stripe-account header

#

then do the same when initializing Stripe.js (platform PK + stripeAccount option)

#

note that if the domain is already set up by the account directly you might need to remove it before setting this up via your platform

unkempt apex
#

Okay so it looks like we're missing the stripe_account, however when adding it via the dashboard it was not required.

limpid basin
#

using the technique you've done for the conencted account, you might try adding the stripeAccount option you stripe.js initialization as is -- i understand that when using the old oauth access keys that this can make things work

#

well it can be set up multiple ways, as platform vs not

#

can you show me how you initialize Stripe.js?

unkempt apex
#

const stripe = Stripe('<%= <KEY> %>');

#

this is our client side initialization

limpid basin
#

What is that key representing?

unkempt apex
#

the public key

limpid basin
#

for the way you've done it now, add the stripeAccount option there

#

const stripe = Stripe('<%= <KEY> %>', {stripeAccount: 'acct_1234'});

#

and it might work, but otherwise ensure youre using the platform PK, then make the call to set up the domain as I showed using the platform SK + account header

unkempt apex
#

What difference would this make?

limpid basin
#

this is an edge case for the oauth keys you're using to set up the domains

#

(Note we don't recommend using connect this way any longer, only using the platform keys)

unkempt apex
#

When you say platform key what do you exactly mean? Sorry if I'm a bit behind here. We currently have two keys, the public (pk_test_123) and the secret (sk_test_123)

#

And the account ID you are referring to is the connected account ID or our own account ID?

limpid basin
#

always the connected account

unkempt apex
#

Okay, I've done so via ruby console

#
=> #<Stripe::ApplePayDomain:0x528dc id=apwc_1Kz13FQ0oyCTHVl6p9DdwcTf> JSON: {
  "id": "apwc_1Kz13FQ0oyCTHVl6p9DdwcTf",
  "object": "apple_pay_domain",
  "created": 1652458153,
  "domain_name": "amenitiz.ngrok.io",
  "livemode": false
}```
#

I get what it looks like a successful request

limpid basin
#

So you'd need to do this differently for your standalone account vs your platform requests

unkempt apex
#

but still not appearing in the dashboard

limpid basin
#

I see it set up for that account via your platform for test mode

#

now does it work?

unkempt apex
#

Where are you seeing it?

limpid basin
#

In my internal tools, don't worry about the dashboard for express accounts

#

oh wait, but also you dont need to do this for express accounts

#

you would only need it to set it up for your actual platform account

unkempt apex
#

hahaha I'm really confused now

#

GooglePay was so easy to setup

limpid basin
#

since you'll be doing destination charges, this needs to be enabled for the paltform, not the connected account

unkempt apex
#

and this is driving me crazy

limpid basin
#

this only applies for connected accounts in the standard account case

#

ok, ignore everything about the conencted account

unkempt apex
#

Well the only thing I can tell you is that nothing worked until I created manually here

#

That's the only thing I had to do to make it work

limpid basin
#

you need to have the domain enabled for your platform

unkempt apex
#

What does that mean?

limpid basin
#

You already have those domains set up for your platform

unkempt apex
#

What domains?

limpid basin
#

the platform account, thats where the domains need to be registered

#

amenitiz.ngrok.io for apple pay

unkempt apex
#

Nothing either?

#

I'm a bit lost... My understanding was that by creating an ApplePayDomain via API using our express key we would see a new row in that "Web domains" table.

#

We have also set the public domain association file and it works properly

#

Basically followed the exact steps in the documentation

#

I contacted support via chat and they said their specialists will take a look.

#

Then the person on the chat suggested me to try creating the domain manually there and then it worked. It's not a solution for us though because we have thousands of subdomains at the moment.

#

And we'd like to automatize that.

limpid basin
#

ok but i want to take a step back, because you're talking about an express account and you should not need to do anything for that

#

the apple pay domain only needs to be configured for your platform

#

Is the dashboard you are looking at for your platform?

#

Not sue if you expect it to work, but I can't access the page at that ngrok domain

#

but at a high level, for express+destination charges:
1/ set up the domain for your platform account (using dashboard or platform SK via API)
2/ initialize stripe.js using the platform PK
3/ destination charges for that platform should work