#xaositect_api

1 messages ยท Page 1 of 1 (latest)

agile currentBOT
#

๐Ÿ‘‹ 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/1389318271043637280

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

cyan flume
#

Hi there!

glacial tulip
#

Hello
Is there a doc you're following to set this up? If so, can you share a link so I'm on the same page?

cyan flume
#

Sorry should have added that to the submission

glacial tulip
cyan flume
#
    const session = await stripe.checkout.sessions.create( {
        payment_method_types: [ paymentMethodType ],
        mode,
        customer: stripeCustomerId,
        client_reference_id: paymentInstallment.id,
        metadata: {
            paymentInstallmentID: paymentInstallment.id,
            environment: process.env.ENVIRONMENT || '',
        },
        line_items,
        payment_intent_data:
            mode === 'payment'
                ? {
                    description: `Payment for ${ paymentInstallment.name }`,
                    statement_descriptor: rpcShared.invoices.createStatementDescriptor(
                        invoice.organization.name
                    ),
                    transfer_data: {
                        destination: invoice.organization.stripeID || '',
                        amount: amountToTransferToPlatform,
                    },
                    setup_future_usage: 'off_session',
                }
                : undefined,
        payment_method_options: {
            us_bank_account: {
                verification_method: 'instant',
                financial_connections: {
                    permissions: [ 'payment_method', 'balances' ],
                },
            },
        },
        saved_payment_method_options: {
            allow_redisplay_filters: [ 'always' ],
        },
        ui_mode: 'custom',
        return_url: returnUrl,
    } );
#

let me see if I can find an id for one of those requests

#

req_FmXCPoWVf6UEXf

glacial tulip
#

Thanks, looking

#

If you click on "change" option, do you see other saved payment methods?

cyan flume
#

No, just the new payment method option

glacial tulip
#

oh that's link.. What if you logout of link?

cyan flume
#

If I log out of link I just get the plain card widget

#

Peculiarly if I display the ACH widget, I get a whole boatload of payment methods that are not attached to the customer account

glacial tulip
#

Is the site you're testing with remotely accessible? if so, can you share a link to the checkout page?

cyan flume
#

yes, but I'd need an IP address to let you past our WAF shield

glacial tulip
#

Hmm actually, let me just try reproduce this with a web app on my end

#

give me a few

cyan flume
#

Okay, thanks!

#

realized what I had deployed was the previous ticket I was working on, so I'm currently deploying the branch with the above code in it which will probably take a bit.

#

but what was described above was in local dev

glacial tulip
#

Ah alright. Keep me updated if you see anything different

cyan flume
#

Yup, same experienfce when deployed ๐Ÿ˜ข

glacial tulip
cyan flume
#

yes, that would be a fly in the ointment

glacial tulip
#

For example, it works fine with mode embedded as well

cyan flume
#

and you can replicate that it doesn't work with custom?

glacial tulip
#

Yup

cyan flume
#

Is it intended, or should I file a bug report?

glacial tulip
#

as far as I know, this is intended

#

confirming with a colleague though

cyan flume
#

If so, I'm curious as to the rationale, if they know it

glacial tulip
#

Actually, looks like this is a bug

#

and my team already reported this internally

cyan flume
#

Is it something we might expect to see fixed in the near future, or would you recommend a workaround and not wait?

glacial tulip
#

looks like the product team is still working on the fix but I can't provide an ETA unfortunately.

There are no workarounds for this afaik

cyan flume
#

What we were doing previously was displaying previously added payment methods in a dropdown in addition to 'new card / new ach' and then if they selected one of those, creating a payment intent, etc....

Okay, well I'll go report back to my team.

Thank you for helping clarify the issue, I appreciate it.

glacial tulip
#

oh actually

#

Can you try following?

  fetchClientSecret: () => {...},
  elementsOptions: {
    savedPaymentMethod: {
      enableSave: 'auto',
      enableRedisplay: 'auto'
    }
  }
});```
cyan flume
#

sure, let me see

#

yes that works if I am logged into link

glacial tulip
#

that works for me without link as well

cyan flume
#

I do get a type error in the front end with those args:

Object literal may only specify known properties, and 'savedPaymentMethod' does not exist in type 'StripeCheckoutElementsOptions'

agile currentBOT
glacial tulip
#

Hmm could you disable typescript linter for that specific line?

cyan flume
#

Oh yeah, easily. It doesn't seem to make a difference though. should I disable link and see if that changes anything?

celest hedge
#

Yes if you can, I think those PMs should still show because they should be the ones saved to the Stripe customer. hanzo had to step out so I can help from here, but I am still working to get my local test page for this working

cyan flume
#

Thanks Hanzo, sorry for invading your lunch hour!

#

Okay let me see about disabling link

#

Is the only way to disable link through the stripe dashboard payment methods or is there a param for checkout session that I'm missing?

celest hedge
cyan flume
#

its curious because right now I'm only passing in 'card' or 'us_bank_account' for the paymentMethodTypes

#

oh curious,

celest hedge
#

Oh apologies for missing that. Yep that will do exactly what you need here!

cyan flume
#

no if I exclude link I get no saved payment methods, alas

#

Though I see now that I'm 2 minor versions behind the current version of the API. Lets see if that changes anything

#

alas no change

celest hedge
cyan flume
#

interesting! Thanks, I'll check that out.

#

Well, back to the salt mines, I hope you have a great afternoon ๐Ÿ‘‹