#birdy247

1 messages ยท Page 1 of 1 (latest)

rotund schoonerBOT
keen river
#

Can you share a sample payment intent id?

candid silo
#

/v1/payment_intents/pi_3Mmea8Klq6TS8Hna1VyHUpJk/confirm

#

{
"error": {
"code": "invalid_request_error",
"message": "BAD_VALUE|||Bad value: billing_address.given_name",
"payment_intent": {
"id": "pi_3Mmea8Klq6TS8Hna1VyHUpJk",
"object": "payment_intent",
"amount": 3000,
"amount_details": {
"tip": {
}
},
"automatic_payment_methods": {
"enabled": true
},
"canceled_at": null,
"cancellation_reason": null,
"capture_method": "automatic",
"client_secret": "pi_3Mmea8Klq6TS8Hna1VyHUpJk_secret_mP5HlsVyJY5k5pjbaHa6BnonS",
"confirmation_method": "automatic",
"created": 1679064516,
"currency": "gbp",
"description": "Quick Demo Fundraising Option (JustGiving) - Aaron Bird ## ",
"last_payment_error": null,
"livemode": false,
"next_action": null,
"payment_method": "pm_1MmeaqKlq6TS8Hna9VVDaeGT",
"payment_method_types": [
"card",
"afterpay_clearpay",
"klarna",
"link"
],
"processing": null,
"receipt_email": null,
"setup_future_usage": null,
"shipping": null,
"source": null,
"status": "requires_confirmation"
},
"request_log_url": "https://dashboard.stripe.com/acct_1E0srrKlq6TS8Hna/test/logs/req_GMJ8svbyVKoJor?t=1679064560",
"type": "invalid_request_error"
}
}

proven hinge
#

๐Ÿ‘‹

#

Taking a look

candid silo
#

Thanks

proven hinge
#

Looks like it isn't liking the billing_address.name

#

That is a bit of a weird error message we are providing though

#

Overall I believe this is an error coming back from Klarna though about the name

#

You can see it is being passed as \"xxx xxx"

#

So looks like some potential encoding issue in your code with that variable?

candid silo
#

I see

#

I will have a play with it

#

Thanks for your help

#

On anoter note

#

when using afterpay, it asks for a shipping address

#

If there is no shipping address, how can we use it?

#

Also, why does the payment intent allow clearpay as an option if it mandates a shipping address?

proven hinge
candid silo
#

Oh right

#

How do we know to collect address for certain payment methods?

proven hinge
#

I do think we can make this easier on you and just have Payment Element handle this for you.... I'm going to file some feedback internally about this

candid silo
#

Cool

#

On another note, I love how simple the paymentElement is to use, but we want to change the buttons

#

is it possible with the paymentElement

#

or do we have to work this ourself if we want a radically different design?

proven hinge
candid silo
#

Can these be turned into a bulleted list instead?

proven hinge
#

So you can use an accordion layout with radios set

candid silo
#

Im guessing stripe feel the accordian converts the best?

proven hinge
#

I actually am not sure if we have run experiments on that

#

We added the accordion layout pretty recently due to a lot of merchants requesting it

candid silo
#

is radios new?

#

I havent seen that before

proven hinge
#

Yeah that is new-ish as well

#

Don't recall exactly when that was added

candid silo
#

Uncaught IntegrationError: Invalid value for elements.create('payment'): layout should be one of the following strings: accordion, tabs, auto or layout should be an object. You specified layout as radios.

#

My bad

proven hinge
#

Yeah if you use radios then you need an object

candid silo
#

Thanks

#

You have been really helpful ๐Ÿ™‚

proven hinge
#

Happy to help!

candid silo
#

Last question ๐Ÿ™‚

proven hinge
#

Sure

candid silo
#

The address element. If we want to put that in a border (like payment elemet), are we best styling this ourselves

proven hinge
#

Yep

#

I believe that is the way to do it

#

Can double check if there is a better way

#

But afaik that is correct

candid silo
#

Also... last last question ๐Ÿ˜„

#

Can we put the other options above card but leave card as the default option?

proven hinge
#

Yeah your own styling for a border for address element looks to be the way

candid silo
#

If we change the order, can card still always be the default one that opens?

proven hinge
#

If it is first then I believe it should always be the one that is shown by default

#

Unless I am misremembering

candid silo
#

Is the default country in the addressElement dynamic

#

Its coming up as US but I am based in the UK

#

paymentElement defaults to the UK

#

Wondering if we need to do this?

#

Also, any tips to stop this?

sturdy blaze
#

Hi ๐Ÿ‘‹

#

So the auto-complete is starting with the US?

candid silo
#

The country is in the US

#

I change the default to GB and works ok

#

But not sure if stripe "guesses" what to select here?

sturdy blaze
#

It should either be a setting in your browser (locale) or the geolocation of your IP address