#lost-paypal-connect
1 messages ยท Page 1 of 1 (latest)
Hello ๐
If you have the payment methods enabled under settings and are using automatic_payment_methods parameter then those should show up automatically
Let me verify ๐
<Elements stripe={stripePromise} options={{
mode: "payment",
amount: currentAmount,
currency: currency,
appearance: {
theme: "flat",
},
}}>
<PaymentElement />
</Elements>
This is what I have for my payment element.
But I don't see anything in options for automatic_payment_methods ?
Is it undocumented?
Not exactly, what flow are you integrating? Are you following a guide?
Yeah, trying to. But it's disjointed. Here's what I'm using:
But then I'm hoping to do this:
But I don't see anywhere to select automatic payment methods prior to having to go to my server to create an intent
The defer intent flow would list the supported payment methods automatically from your payment method settings
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=payment
So I checked that, and I have "7 turned on"
Yet it's still showing me this warning.
And I'm not using a payment method type in my checkout integration?
Can you check if you have the test mode toggled on?
Live mode and test mode will have separate settings for this
checking...
7 enabled in test mode
I've never fiddled with these settings, so I presume they're all still at their defaults.
And yet this is how it's rendering:
only the card details
Are you seeing any errors in your console?
Not the selector for gpay, etc
is this page live? If so, can you share the URL?
Not live, local development (apologies)
So I see some errors, but I figured these were nominal for my local dev scenario.
The one thing I can say is if I use the explicit gpay/apple pay element, it works.
But that's not the UX I was hoping for.
So, <ExpressCheckoutElement onConfirm={console.log} /> shows me a gpay button
You can also pass in paymentMethodTypes to elements object
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=payment#additional-options:~:text=No-,paymentMethodTypes,-string[]
a list of payment methods you want it to render
I know, this is just to see if it works manually or it doesn't
Ahhh, one sec
['card','us_bank_account','afterpay_clearpay'] etc
We have a full list here
https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_types
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
paypal isn't supported in the US
I see. so it does work with manual list of payment methods
Indeed!
It's just for some reason not grabbing them automatically.
I assume you're checking a few things? ๐
Yeah
NP, thank you for your help, I'll hang on ๐
what currency are you setting with currency parameter?
mode: "payment",
amount: currentAmount,
currency: currency,
appearance: {
theme: "flat",
},
}}>
<PaymentElement />
</Elements>```
Can you share the account ID you're testing with?
Dunno if it helps, but this is the publishable key: pk_test_51MPUldBhBPAhixsRWWKPEogol81wulBStFcjBDwdO1OuYmx4A9EzStm27w5mqoWebzE2mQCF8ME77W9ZEa5nI3zO00nqvemeam
So looks like most of the PaymentMethods you have activated in test mode are for eur presentment currency like banacontact , eps etc
You don't have afterpay activated in test mode under
https://dashboard.stripe.com/test/settings/payment_methods
I have apple pay and google pay enabled though
or affirm
Apple Pay and Google Pay have some additional requirements
https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#apple-pay-and-google-pay
kk, I've enabled affirm, will it take some time to populate?
It shouldn't, make sure to take out paymentMethodTypes
heh, yeah I have ๐
Also, can you explain why then when I use:
<ExpressCheckoutElement onConfirm={console.log} />
It shows a working gpay button?
I should think if I'm not meeting any specific requirements (yet), that such a button shouldn't work?
Do you see a google pay button when you go to this page?
https://stripe.com/docs/stripe-js/elements/payment-request-button
yep
is your site being served on HTTPS?
Yep. But running locally, not visible to internet.
If I do the express checkout element, I get that button
If I click it, I get this modal.
It's not the same as the built in browser one mind you...
๐ stepping in as hanzo needs to step away
Heya! Thanks Hanzo!
So to clarify you are seeing Google Pay button render when you are testing locally?
Yes, I see that button.
However, to be clear, I'm not trying to get that working
What I want is something similar to this
But without having to specify the payment methods manually
Right now, if I don't specify the payment methods, I get this:
And I'm doing the flow where I get payment information before creating a payment intent.
So you are using Automatic Payment Methods but not seeing the ones that are turned on in your Dashboard?
Like you have the ones you want enabled here: https://dashboard.stripe.com/test/settings/payment_methods yes?
Well, I want automatic payment methods. But I don't have anywhere to opt-in. So I'm anticipating that the default behaviour will have it enabled.
Yes, all enabled
When my <PaymentElement /> renders however, it doesn't show anything except the manual credit card entry options.
Appreciate it. What is the actual amount that is being passed in?
Since that seems to be a variable currently
Yeah that would be 2500 ๐
I do!
I'm using connect as well. Although I don't think it matters at this stage yet.
I'm using the publishable key that my platform obtains when the connection is made.
Both my stripe accounts are CA based though.
And both connected to my CA bank account
Hmm do you set onBehalfOf?
No, never.
That changes the charge type and I just went through a whole ordeal figuring out that I don't need that parameter, haha.
All charges will be "owned" by the connected account, not by my platform.
My platform is simply a facilitator.
Ah you don't want to be doing that
Oh??
Let's back up a second
yep!
These are Standard Accounts correct?
Yep great
So what you want to do is initialize as the Connected Account
You pass the Stripe-Account header with your own publishable key
You should never need (or be asking) your Connected Account merchant's for their keys
Oh interesting. It was one piece of information made available during the connect process.
I don't ever ask them for it, but I was capturing it.
Are you using OAuth?
Gotcha and is this because they have already-created Stripe accounts?
Correct.
Okay
So the issue here is that for Automatic Payment Methods this will actually be determined by the Connected Account's settings at https://dashboard.stripe.com/test/settings/payment_methods
So you either want to tell your Connected Account users that so they turn on the ones they want. Or you want to specify paymentMethodTypes here explicitly
Right, so the screenshots above were for the connected account
Not the platform
In my scenario:
- Street Swipe == platform
- Copper Dusk == connected account (which I use for testing)
Everything I'm showing from the Stripe configs/dashboard/keys is for Copper Dusk.
However what you're saying is that I should be using the publishable key from Street Swipe? Not Copper Dusk?
Yep
From what I believe is that you should use your platform key and Stripe account ID ( _stripe_account ) as the payment is supposedly made using your platform
Where do I need to specify the stripe account? Options?
Yes using param _stripe_account
After key ( publishable)
No you specify it when you initialize Stripe.JS. Via loadStripe in React
Alright, just doing the rewiring now to use my platform PK, and then to plumb the connected account ID.
Will just take a few moments.
No rush
hmm
no love
I'm using:
pk_test_51NccxJLuyOQnR8JDoS510Da8a61cJ9ZcCGNNWgHs8ct4Nw9Fw25H8l2o1l25QlfIzB8bhhVki1Q9RoKfTv0MQ2jk0030xgI1ZD
acct_1MPUldBhBPAhixsR
So the PK should be from Street Swipe.
And the account ID should be for Copper Dusk.
For sure
Hmmm very strange
Seems like it should work just fine
Can you test something for me and try to use EUR real quick instead of CAD?
Can you check if you are using the Latest api version?
As the new api only has automatic payment methods
That shouldn't be relevant for the deferred intent flow
then it defaults to the api in your stripe account when it was made
"@stripe/react-stripe-js": "^2.3.0",
"@stripe/stripe-js": "^2.1.5",
I know these are just JS wrapper versions, but JIC it implies anything
https://stripe.com/docs/api/versioning
You can check this
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Is there a way to roll my account forward without having to specify version explicitly?
The API version only has an impact in the standard payment element flow where you create the PaymentIntent upfront
ah
You are using the deferred intent flow, so if you don't specify paymentMethodTypes then we use Automatic Payment Methods (the ones set in your Dashboard) by default
Yeah, that's what I was hoping ๐
Regardless, it looks like I'm on the latest API version anyway.
Hmm okay. If you don't use Connect at all and you just initialize as your platform, what do you see?
checking...
Interestingly, I get the Link message.
But still no payment methods.
Haha
Can you complete a PaymentIntent and provide me the PaymentIntent ID?
err, haven't made it that far ๐ฆ
This isn't communicating with my server for creating the payment
No worries
Ah wait you don't have Afterpay on for you platform
Yeah toggle that on and let's make sure it works
lol okay that's good
Google Pay and Apple Pay require HTTPS
So they shouldn't show locally
Ah
That's fine, we can continue with these as examples
Okay, so they're showing up when I don't put the account id of the connected account.
But wat du?
Okay so let's try something else. I was under the impression this shouldn't matter (since you are using OAuth and aren't the controlling platform) but go to https://dashboard-admin.stripe.com/test/settings/payment_methods/connected_accounts and flip the settings there to "On by default"
Really no. This shouldn't have any affect imo but I can double check on that if this does work.
Hah, it works
Okay I mean yeah that was the last thing I could think of
Let me check with a colleague but I don't think it should work like this
Regardless, that should get you unblocked for now
So the only thing I can think then is that the platform and connected account must both agree on methods before they show
I suppose, but really you shouldn't have any control from the platform if you aren't the controlling platform. But yeah maybe we built it with the idea that you still have some control
Let me check
For sure, thanks!
I don't mind either way, I'll just set the most permissive from my platform.
The general idea is that my customers will have the most control.
Yep that works well
But yeah, maybe this screen was only intended as defaults for accounts I create, right? Haha.
That was my impression. But maybe that was mistaken
๐
We both learning here. Maybe me moreso than you though, haha
How does one get paypal to show up?
I'm not hung up on it, but I thought it was a thing
Ahh
What if my connected account is EU?
Shouldn't they be allowed to process using it at that point?
Yep that should work
But I don't have paypal in my dashboard to block or allow it for connect?
Would it show up if I got an EU connected account?
Hmmm actually I'm not positive we support Paypal in Payment Element yet.
Let me double check
Okay confirmed it is supported in Payment Element and I believe if you have an EU connected account with it turned on then it should just work
But I haven't tested this myself as Paypal is relatively new
I'd recommend testing it out!
Fair, no prob. I guess yeah once I have some way of creating EU accounts, I will do so.
If I might suggest having the connect page show all possible forms of payment, even outside of what the platform account itself supports ....
That would at least help me understand the full list of what to anticipate.
and then if there was a method that I wanted to block that I didn't myself have access to...
Also Neo, I think you've added Neo?
lost-paypal-connect
They have a big office here in my home city of Winnipeg, haha. I should think they'd show up as an option if you're set up with them too ๐