#esteban-gorostiaga_api

1 messages · Page 1 of 1 (latest)

analog axleBOT
#

đź‘‹ 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/1220011091783061585

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

simple pineBOT
flat hearth
#

Hello
Are you saying you're not seeing payment method get prefilled in live mode but it works in test mode?

thorn grove
#

I am trying it only in test mode

simple pineBOT
flat hearth
#

Not sure what you mean by that

You said this

When performing a checkout session, in development, Stripe returns the current customers saved payment method as an option, while in production using the other Stripe account it doesn't.
is production != live mode?

thorn grove
#

My production is currently on test mode data as an alpha*

#

In essence I am using test mode on both ends because we still haven't linked a bank account

distant hedge
#

Is this for Checkout in subscription mode? If so, have you checked if both customers have a default payment method set up?

#

That should be what determines if the PM is shown in subscription mode

thorn grove
#

Yes, checkout for Subscription Mode. I created a payment method through the Customer Portal to make sure a payment method was linked to the Customer, making it default as the only PM. Still it wouldn't work. I believe this to be a Stripe Dashboard configuration because when using Stripe Account A (the one that works and is used in local development), the default PM always appears. However using Stripe Account B (the one that doesn't work and is used in alpha production), it never shows. This then renders it to a misconfiguration in Stripe on my end and not the code itself, which is what I am wondering what it is

distant hedge
#

Can you send me the ID of both customers? And can you make a checkout session for each, confirm they are seeing this behavior, and send those IDs as well?

thorn grove
#

Does it make sense? I just want to know if I am explaining myself properly

distant hedge
#

It makes sense but I still want to check some stuff. I am not aware of a dashboard setting for this, with those IDs I can check in to what might be the difference and raise this to my colleagues if I can't find anything

thorn grove
#

Sure. For Stripe Account A, called Flux Development, this is the customer id: cus_PjNSNC9tGd8IyJ (it has 3 PM on file, none of which appear in the Checkout) For Stripe Account B, called Flux Local, this is the customer ID: cus_PifYX1pbbRjoh7. Give me one second I will create a checkout session for each

#

Stripe Account A Checkout Session ID: req_whgfVTIY4Bwu7n, Stripe Account B Checkout Session ID: req_zaNa2HwieXnpTf

distant hedge
#

Thank you, checking these out

#

Thank you for those IDs. That is pretty much flipped from the behavior I would expect. I will raise this to my colleagues and get back to you

thorn grove
#

It was for me too. I have been googling a ton before asking this because I thought it was a configuration, but I always read that Stripe would return by default any PM marked as default on a checkout session

distant hedge
#

It looks like there is a requirement that I forgot about: the payment methods need valid address, name, and email info. It looks like cus_PifYX1pbbRjoh7's payment methods do not have that info but cus_PifYX1pbbRjoh7's payment method does

In subscription mode, the customer’s default payment method will be used if it’s a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer’s card details.

thorn grove
#

Wow. How so? On both of those cases I used the default Visa 424242424242 card. Also, how is the address added in the Checkout Session? I am using Paraguay as a country, and there's no address form to be filled. When I choose the US, I get a ZIP, but that's abot it. Do you mean adding address for the customer then?

distant hedge
#

Good question, checking in to this

#

It looks like specifically the default payment method on cus_PifYX1pbbRjoh7 was created via Stripe Elements. The country was passed but address and email were not. You can pass them in with Stripe.js but your page would need its own fields to collect those values https://dashboard.stripe.com/test/logs/req_YiRVnNykP0wSyt

analog axleBOT
thorn grove
#

The thing is I use the Stripe hosted page to create a payment method, specifically either in the Customer Portal or in a Checkout Session. When creating either, Stripe already has the customer's email, because I add the email property in the CustomerCreateOptions. Both are an issue, but address is more worrying.

#

I use the Stripe hosted page to add the Payment Method due to security reasons, and I wouldn't want to be doing that myself just to get the address, which isn't provided as an input in the Stripe hosted page...

native goblet
#

Hello! I'm taking over and catching up...

thorn grove
#

No worries! Take all the time you need

native goblet
#

The best way to make sure a saved Payment Method will show up in Checkout is to save it using Checkout. I don't think using the Customer Portal will always produce a Payment Method eligible for display in Checkout.

thorn grove
#

Neither will creating one in the Checkout as I would then have to do an additional post request to the specific payment method to update the billing address, billing name, and billing email to prefill the customer’s card details

native goblet
#

Checkout should collect the required information unless you've configured Checkout to not collect that information.

thorn grove
#

doesn't the checkout associate the customer's existing email for billing email?

native goblet
#

It should associate the email address they provide during Checkout, or use the email that's prefilled if you use an existing Customer or prefill an email.

thorn grove
#

Exactly. I am using an existing Customer, therefore it should prefill the email? Could you help me understand why that wasn't the case?

thorn grove
native goblet
#

Looking...

#

There's a lot of activity on both of these Customers. Can you try testing this from scratch with a new Customer?

native goblet
#

You still there?

analog axleBOT
thorn grove
#

I will. Can this thread stay open? Or will I have to ask a new question?

native goblet
#

We close idle threads, but you can always go to #help and ask a new question if you don't have an open thread!

thorn grove
#

Could I reference this thread on the new one?

#

Just to help the next person helping me out!

native goblet
#

It should automatically be referenced, but we're focused on realtime transactional support here. If you want long-running, async help you should write in to Stripe support so we can help via email instead: https://support.stripe.com/contact/email

thorn grove
#

Ok ok, thank you so much!