#meh
1 messages · Page 1 of 1 (latest)
Hey there
Yep works with Automatic Payment Methods and it also supports Apple/Google Pay
how do i turn on automatic payment methods?
hmm ok thanks
when i don't pass in paymentMethodTypes i don't get anything other than card. i can force card + link and have those two appear. is there something i need to edit in the stripe dashboard?
and could it be related to my test https site being behind http basic auth? i can turn that off for a bit.
Yes wallets won't show unless you are using HTTPS
You control your Automatic Payment Methods from https://dashboard.stripe.com/test/settings/payment_methods
Do you have other Payment Method types turned on there?
i do yes:
Okay so yeah with Apple Pay and Google Pay HTTPS is required.
And for Apple Pay you have to register your domain
i've done that as well.
If you go to https://stripe.com/docs/stripe-js/elements/payment-request-button in Chrome do you see Google Pay at the top of the page?
And if you go to the same page in Safari do you see Apple Pay?
This is a good way to test if you have a card properly set up in your wallets
Those payment methods also won't show if you don't have a live card in your wallets
docs is broken for me right now unless i'm incognito but yes they showed at ome point
i find it odd that i don't get any other methods than card though. shouldn't i at least get link automatically?
the only thing i can think of is the test site has http basic auth on it but i don't get any methods other than card when running the cart code locally either
(i understand i wouldn't get apple or google pay locally)
You should get Link locally I do believe.
If you aren't seeing Apple/Google Pay on the above site then something is wrong with the wallet on your device
But yeah a good way to test link would be to actuall pass it specifically as a paymentMethodType
So you could try passing paymentMethodTypes: ['card', 'link']
If your site is accessible for me to test I could take a deeper look as well
Hello! I'm taking over and catching up...
thanks. looks like you just tried a checkout and got an error.
This might take a little while. It seems like it should be showing up, but it's not, and I'll need to dive in to figure out why.
thanks. im pushing a change now to set paymentMethodCreation: 'manual'
this is using a connected account fwiw. i can give you whatever you need to find the main and the connected accounts.
How are you initializing Stripe.js?
And are you using direct or destination charges with the connected account?
window.$stripe.stripe = window.Stripe(
this.method.client_side_gateway.pub_api_key,
{
stripeAccount: this.method.client_side_gateway.stripe_account,
}
);
window.$stripe.elements = window.$stripe.stripe.elements({
mode: "payment",
amount: this.cart.total * 100,
currency: this.currency.toLowerCase(),
theme: "flat",
// paymentMethodTypes: ["card", "link", "klarna", "demo_pay"],
paymentMethodCreation: "manual",
// paymentMethodTypes: ["card"],
// Fully customizable with appearance API.
// appearance: {/*...*/},
// clientSecret: this.method.custom.payment_intent.client_secret
});
const paymentElementOptions = {
theme: "flat",
layout: {
theme: "flat",
type: "tabs",
defaultCollapsed: false,
},
};
const paymentElement = window.$stripe.elements.create(
"payment",
paymentElementOptions
);
paymentElement.mount("#payment-element-v3");
window.$stripe.card = paymentElement;```
(i had to do the window.$stripe stuff to get around some poor design on my part along with difficulty communicating between components in vue2)
i don't remember the difference between charge type sorry. the money goes straight to the connected account and we don't take any fees.
Looks like you're trying to do direct charges. That means the connected account needs to have all of the relevant payment methods enabled. Are the connected accounts Standard accounts?
yes and when i go to manage payment methods it says that they're being managed by the parent account
so do i need to enable something during onboarding?
when i create the account i'm doing (php):
$account = $stripe->accounts->create(['type' => 'standard']);
Are the payment methods enabled here (test mode link)? https://dashboard.stripe.com/test/settings/payment_methods/connected_accounts
i didnt know that page existed! i thought i had gone there before!
apple and google were "on by default". link was "off by default" so i turned it on
link shows up by default now so that's progress!
Reloading, let me see what it says now...
is there a "connected accounts" config page for apple pay as well?
No, you would need to validate the domain on the connected account using the API.
I'm not sure why Google Pay isn't showing up though.
which api end point would that be under? that would explain the apple pay issue
This is how to validate a domain using the API: https://stripe.com/docs/stripe-js/elements/payment-request-button?client=html#verifying-your-domain-with-apple-pay
You would do that with a Connect request on the connected account(s): https://stripe.com/docs/connect/authentication
Note that you must do this in live mode, with a live mode key, and a live mode connected account.
hmm ok. so it sounds like it's not possible to get apple pay working in test for a connected account at all?
Not really, but Google Pay should be working as far as I can tell. Let me pull in someone else and see if they can find what I'm missing.
ok. many many thanks for your help! i need to run for about 45 min.
We found the issue! I wish I had caught this earlier, but it slipped past me. The problem is that your publishable API key is really old, and does not have a pk_test_ or pk_live_ prefix (it only has pk_). The code in Stripe.js that handles wallets looks at the key to determine the environment, and without the prefix it doesn't know what to do, so that means Apple Pay and Google Pay won't show up. You would need to generate a new publishable key with the newer prefixes to work around this issue.
Unfortunately the only way to fix this is to roll your publishable key: https://stripe.com/docs/keys#rolling-keys