#Sv1751
1 messages · Page 1 of 1 (latest)
Do you have an example URL, publicly accessible to test?
Yes. Their test env: https://dev.kyobun.co.jp/, id/pass = piano/ epqnZv1Ew8q|
Okie.. how do I navigate to the payment page?
https://dev.kyobun.co.jp/subscription/?promo_code=half365# click on black button and enter mina.shimizu+test@piano.io
Piano2022
Um okie I can see it doesn't have ApplePay
Have you registered the ApplePay domain?
Do you mean, we (as a parental account) registered the ApplePay dpmain?
Yes, in most case. To clarify is this a Direct Charge? How do you initialized the frontend with Publishable Key?
Yes. We suppose to have a registered domain. But I'll double check
It's a bit tricky actually. You as the Platform account should have registered the domain for them, using your Live key as described here https://stripe.com/docs/stripe-js/elements/payment-request-button?client=html#html-js-using-with-connect
But the domain will show up on their account
Before digging deeper, can you confirm the part about Direct Charge?
I would like to see the code you initialized stripe.js with your Publishable Key
elements = stripe.elements({appearance, clientSecret});
let userModel = TPParam.config ? TPParam.config.user || TPParam.user : TPParam.user;
const defaultOptions = {
defaultValues: {
billingDetails: {
name: fullName ? fullName: userModel.displayName,
email: userModel.email
}
},
fields: {
billingDetails: {
},
}
};
paymentOptions = merge(defaultOptions, getStripeCreateOptions());
paymentElement = elements.create('payment', paymentOptions);
paymentElement.mount('#stripe-payment-elements');
How do you initialize stripe in the first place
yes, it's direct charge
$scope.initStripeApiKey(params.publishableAPIKey, params.accountId);
this.initStripe = () => {
const locale = lang.getLanguageTag();
let params = {
locale: locale,
};
if (accountId) {
params.stripeAccount = accountId;
}
stripe = Stripe(apiKey, params);
}
Okie I see, thanks very much. Last question: is this connected account created in Test mode?
And was it connected to your Platform account in Test mode?
I see the account is connected to your Platform in test mode
So here are conditions to make a Direct Charge with ApplePay domain to work (typing....)
- The Connected Account is created via Live mode and connected to Platform account in Live mode
- The domain should be registered to the Connected Account using the Platform account's Live mode key and the Stripe Account Id header as mentioned here https://stripe.com/docs/stripe-js/elements/payment-request-button?html-or-react=html#html-js-using-with-connect
So you will need to:
- Reconnect the Connected Account to your Platform Account in Live mode
- Ask them to remove the ApplePay domain in their account (I am seeing they currently have dev.kyobun.co.jp incorrectly)
- Register their ApplePay domain again, using your Live key and the Stripe Account header as mentioned in the Doc above
Okey thank you we will try
One last question: to register the domain we need to make the following api call? 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);
it is impossible to register new domain from the dashboard?
No, you need to set it via API like that
We just realized that we use Payment Element not Payment request button
Payment Element shows ApplePay button in test mode for connected account?
Is your advise relevant for Payment Element?
Yes! It also requires to register the domain