#aeo_googlepay-connect-pmc
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1488645319481888909
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
my use case is: I am a platform account with hundreds of connected accounts, I have a toggle in my system to "enable mobile wallets", when that is clicked, I want to enable both apple pay / google pay to be used in the PaymentElement at checkout, and then also register the domains with stripe / apple ( which I've already accomplished), I'm just unsure on how to enable / disable the high level availability at the account level.. similar to how you can enable / disable in the Dashboard UI when editting viewing the "Payment Methods" from a connected account
hello! you can't actually set available, that's calculated on our end and only returned after checking account capabilities (so in this case for google / apple pay it would check against card_payments capabilities). from the perspective of the PMC you would set this parameter to "on"
https://docs.stripe.com/api/payment_method_configurations/update#update_payment_method_configurations-google_pay-display_preference-preference
so if you set that to "on" and the account has the proper capabilities, available will switch to "true" when you retrieve the PMC
so DisplayPrefence = ON/off is a toggle for "eabled / disabled" in the Payment Methods view in the dashboard?
yep!
i might suggest normalizing the keywords ๐
display preference is not really giving the "feeling" or enabled / disabled
of*
perfect, i'll give it a shot, thank you.
yep of course!
you should be able to call this and pass the stripe-account header of the account you want to retrieve
thank you...
wait, that wants a PMC_xxx ... how do I find the current one with just an acct_id?
oh you just want to retrieve all of them for a specific account? calling the list endpoint should work
a given account can have multiple, so if you want the default you want to look for the one flagged as is_default: true
technically they can have multiple active ones, you probably care about the default
fair enough, call list and look for is_default. just for knowledge, what is the case where multiple are "active"?
"active" just decides whether or not it can actually be used - you can have multiple PMCs and pass them when creating an invoice, payment intent, subscription etc. is_default will determine which one among the active ones will be used if no PMC is specified and no payment_method_types are passed (because when these are passed we ignore the PMC entirely)
yep of course!
lemme know if you need anything else, i'll keep the thread open for a bit
so something like this to enable both:
var pmcService = new PaymentMethodConfigurationService();
var defaultPmcId = pmcService.List(null, GetAccountLevelRequestOptions).Where(p => p.IsDefault).FirstOrDefault()?.Id;
if (string.IsNullOrEmpty(defaultPmcId)) {
log.Error("No default payment method configuration found for account " + MerchantId);
return false;
}
var pmcuOptions = new PaymentMethodConfigurationUpdateOptions {
ApplePay = new PaymentMethodConfigurationApplePayOptions {
DisplayPreference = new PaymentMethodConfigurationApplePayDisplayPreferenceOptions() {
Preference = "on"
},
},
GooglePay = new PaymentMethodConfigurationGooglePayOptions {
DisplayPreference = new PaymentMethodConfigurationGooglePayDisplayPreferenceOptions() {
Preference = "on"
},
},
};
pmcService.Update(defaultPmcId, pmcuOptions, GetAccountLevelRequestOptions);
yep! that looks right
thanks!
and for disabling.. if I just leave the domains registered, thats fine... in case the want to enable in the future, i dont have to worry about that part?
yep! no reason to disable the domain, if you set the preference to off it will disable it
great. i think that's it... for now.. ๐
turns out there are many levels on which wallets can be disabled, so most of the time people struggle more with getting it to show than the reverse ๐
i've already exprerienced that part
we all have at one point
still have to figure out why google pay is not showing up on my chrome iphone. but shows in desktop chrome
maybe thats just apple being naughty.. .idk
idk... still just digging into these wallets... and they are a little annoying ๐
if you try going here:
https://docs.stripe.com/testing/wallets?ui=express-checkout-element
and google pay isn't showing, it usually means there's an issue with how your wallet is configured on your phone. i'm actually not even certain if it's possible to configure google pay to show on an iphone ๐ค pretty sure it isn't
well... this is "interesting"
i was testing that bit of code... and Apple Pay is turning off / on, but google pay is not toggling
in the dashboard it shows that is is still "enabled" and not inheritting from my platform settings, even after I call that update
but apple pay does actually toggle..
is the update api endpoint restricted to only updating 1 thing at a time?
nope, I tried just updating google pay by itself, and the dashboard is not reflecting the change.
can you share the PMC ID with me?
can you share the request ID where you tried updating it? i see it's still set to this in the PMC:
available: false,
display_preference: {
overridable: true,
preference: "off",
value: "off"
}
},```
ahhh i see, i assumed you were trying to enable them ๐ 1 sec
yeah, sorry, was testing back and forth...
apple pay worked.. and the disabled/enabled reflects on that page..
do you know if google pay is actually displaying? or have you not gotten that far in testing
wondering if it's just the dashboard being weird
i didn't test that... was just trying to verify the api request was doing its thing
yeah theoretically if the PMC has it disabled it shouldn't show. obviously it's not great if the dashboard is misleading though
lemme see if i can test it out myself real quick
i gotta go get a kid from school, but I'll be back in like 15 minutes
let me know what you find
k
hmmm when i'm testing it the dashboard is updating
can you share the request ID req_ where you're updating the preferences so i can sanity check something?
Hi ๐
I'm stepping in as my colleague had to go
howdy!
I can see you are updating the PMC identified as pmc_1Sg8jCAjxmkU1mQBZfBSXWcW and it does show Google Pay as inactive in the API response.
google_pay: {
available: false,
display_preference: {
overridable: true,
preference: "off",
value: "off",
},
},
yep, that's not the issue... it is still showing as "enabled" in the dashboard
Unfortunately, we cannot provide much insight into the logic of what is being displayed in the Dashboard (thats not our team's speciality). But are you seeing Google Pay show up in any surfaces where it shouldn't?
ok, that's kind of a non-answer... but I don't feel confident in it "working" if the dashboard is not showing it correctly.. reference your colleagues message above, "obviously it's not great if the dashboard is misleading though".... additionally, why was he not able to repro that?
It isn't great if the Dashboard is being misleading but, as my colleague pointed out they (and I) have not been able to reproduce the behavior you are seeing. I don't think it's a good thing either but, unfortunately, we cannot provide support for it here on this server because the staff who maintain it are not experts in the logic that controls the dashboard.
ok... how do you suggest I ease the concern?
I'm a platform account using UA2 accounts... i don't know if that helps in any way?
maybe there is something funky with my sandbox account?
Both the Platform PMC and the PMC for the Connected account show Google Pay as disabled
ok.. i'm not sure how to feel better about moving this to prod
I would recommend testing it in a situation where you would normally see Google Pay and validate that Google Pay is no longer present
It's easily testable
ok.. well, interesting.. maybe... i manually disabled google pay from the dashboard, and now it responds accurately to both enablement and disablement through the api
You can create a Checkout Session or Payment Link (or render a Payment Element) that consumes this PMC and it should exclude Google Pay. There will also be logs on our end where we can see this
so.. ยฏ_(ใ)_/ยฏ
The API is our source of truth but it's definitely odd that the Dashboard appears to differ
i'm going to not worry about it anymore ๐ likely a sandbox / setup / caching issue of some sort...
thank you
Happy to shed what little ๐ก I can ๐