#Alan Tse

1 messages · Page 1 of 1 (latest)

marble pendantBOT
dry parcel
abstract mortar
#

options: { "accId": "acct_1D58c0FWmrFHVcd4", "publicApiKey": "pk_live_JDH8nV5m95xdJ9eRar82KesE", "stripeApiVersion": "2020-08-27", "accountCountryCode": "AU" }
https://stripe-playground.uwiew.xyz/

#

this one

#

the pk is the platform account
the acct id is the connected account

dry parcel
abstract mortar
#

yes i did it

dry parcel
#

The domain should be registered via Platform live secret key using code for Direct Charges, not dashboard. For example:

Stripe.apiKey = "sk_live_••••••••••••••••••••••••";

ApplePayDomainCreateParams params =
  ApplePayDomainCreateParams.builder()
    .setDomainName("example.com")
    .build();

RequestOptions requestOptions =
  RequestOptions.builder()
    .setStripeAccount("{{CONNECTED_ACCOUNT_ID}}")
    .build();

ApplePayDomain domain = ApplePayDomain.create(params, requestOptions);

Reference: https://stripe.com/docs/stripe-js/elements/payment-request-button?client=html&html-or-react=html#html-js-using-with-connect

abstract mortar
#

so the merchants do not need to add the domain name to the dashboard?

dry parcel
#

No for direct charges. Apple Pay domain registration should be done by platform with code using its live mode secret key.

#

Connected accounts don't have to add Apple Pay domain in the dashboard themselves. Platform is the one doing it for them via code

abstract mortar
#

So I'm kind of misinformed, because it says you can set a domain name either way 😅

dry parcel
#

You should look for Use the Payment Request Button with Stripe Connect section since you're using Connect, not direct account integration.

abstract mortar
#

hi river after i set the domain with the platform account sk, it still can't work

#

{
"id": "apwc_1MCzqtFWmrFHVcd4eUuchH79",
"object": "apple_pay_domain",
"created": 1670566471,
"domain_name": "stripe-playground.uwiew.xyz",
"livemode": true
}

dry parcel
#

Let me double check if anything is missing

#

Which platform account ID (acc_xxx) do you use to register Apple Pay domain? I can see this connected account is connected to many platforms.

abstract mortar
#

acct_19meNCI9qxn1A7eM

#

this one it's our paltform account which use in the production environment

#

@dry parcel

dry parcel
#

Sorry! Discord server is busy now

#

Looking into it

fading flame
#

👋 looking

#

@abstract mortar Could you clarify your Platform account and your Connected Account again? I read that acct_19meNCI9qxn1A7eM is Platform

abstract mortar
#

@fading flame acct_19meNCI9qxn1A7eM is Platform
acct_1D58c0FWmrFHVcd4 is Connected

fading flame
#

You are registering stripe-playground.uwiew.xyz correct?

abstract mortar
#

{
"id": "apwc_1MCzqtFWmrFHVcd4eUuchH79",
"object": "apple_pay_domain",
"created": 1670566471,
"domain_name": "stripe-playground.uwiew.xyz",
"livemode": true
}
yes it's the response

fading flame
#

Um can you share how did you call the API? I mean the code

#

It's still displayed incorrect from our end

abstract mortar
#

sure
curl --location --request POST 'https://api.stripe.com/v1/apple_pay/domains'
--header 'Stripe-Account: acct_1D58c0FWmrFHVcd4'
--header 'Authorization: Basic c2tfbGl2ZV8yd0VOZ21VZk9XU1VVdmhodGQ2Q3JKdkQ6'
--header 'Content-Type: application/x-www-form-urlencoded'
--header 'Cookie: __stripe_orig_props=%7B%22referrer%22%3A%22https%3A%2F%2Fstripe.com%2Fpayment_methods%2Ftest_payment%3Fpayment_attempt%3Dpayatt_3M7WOtC4R2Nmvca41UHYqf3d%22%2C%22landing%22%3A%22https%3A%2F%2Fstripe.com%2Fen-hk%2Fpayment_methods%2Ftest_payment%3Fpayment_attempt%3Dpayatt_3M7WOtC4R2Nmvca41UHYqf3d%22%7D; lang=curl; scfc=5'
--data-urlencode 'domain_name=stripe-playground.uwiew.xyz'

fading flame
#

Is there any reason you don't use platform secret key and use that Authorization Basic? (what is that c2... value?)

#

The curl example is

curl https://api.stripe.com/v1/apple_pay/domains \
  -u {PLATFORM_SECRET_KEY}: \
  -H "Stripe-Account: {{CONNECTED_ACCOUNT_ID}}" \
  -d domain_name="example.com"
abstract mortar
#

Do you need the raw secret key or my request is wrong?

fading flame
#

No I don't need the raw secret key (don't paste it here or any public place), I mean you should try the exact same curl command as our Doc, using your secret key

abstract mortar
#

ok let me try

#

@fading flame 😂
The curl that postman sends after he imports it looks like this

fading flame
#

how does it look like?

abstract mortar
#

it' s postman screenshot

fading flame
#

I see

#

But I am afraid stripe-playground.uwiew.xyz still hasn't been registered correctly. Can you remove the domain from Dashboard, then run the curl command again directly (without Postman)?

abstract mortar
#

ok let me try

#

it works ~~ thanks @fading flame @dry parcel

#

😂 😂

fading flame
#

glad to hear! You are welcomed!