#417goose_api

1 messages ¡ Page 1 of 1 (latest)

open sparrowBOT
#

👋 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/1227639646662561844

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

prisma tangleBOT
#

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.

restive vector
#

Here is a response I am getting back

#

Here is the code that makes the call:

function setPaymentMethod() {

    stripe
    .retrievePaymentIntent('<cfoutput>#session.stripe_client_secret#</cfoutput>',
    {
        expand: ['payment_method'],
    })
    .then(function(result) {
        // Handle result.error or result.paymentIntent
        console.log('retrievePaymentIntent --v')
        console.log(result);
    });
    
}
prisma tangleBOT
restive vector
#

Is it possible for the return url information to contain more details? can that be configured?

clever mauve
#

I actually don't think our client-side API supports expansion. What info are you trying to get back about that payment method?

restive vector
#

which payment method they used card, klarna, afterpay etc ...

clever mauve
#

Gotcha, as a workaround for PM type specifically you can listen to the on change function for the Payment Element. A new event will be fired each time the customer clicks between the Payment Element's tabs and that contains the payment method type they are looking to use. So if you track that you can display the payment method type of the tab that they most recently switched to.
For the actual data you would need your server to look it up and send it to your client, so maybe displaying that could be enough while waiting on the server's response. https://docs.stripe.com/js/element/events/on_change?type=paymentElement

restive vector
#

Ok let me look into that

open sparrowBOT
restive vector
#

So is there anyway to configure what the return_url passes back?

clever mauve
#

You can add your own URL params when specifying it but unfortunately you can't control it other than that as far as I am aware