#Kareem

1 messages · Page 1 of 1 (latest)

mystic mulchBOT
kindred steppe
#

HI @red mortar

red mortar
#

Yes it can, you just use $0 as the amount for the request and confirm the secret like normal

kindred steppe
#

NIce to see you

#

humm

#

not sure;

#

@normal quarry is also around

magic walrus
#

@red mortar I've tried doing that
I got an error

error:
code: "incomplete_number"
message: "Your card number is incomplete."
type: "validation_error"

red mortar
#

What call did you get that error on?

#

Can you send me the snippet of code that produced that error?

magic walrus
#

await stripe.confirmSetup(elements, {return_url})

red mortar
#

Oh I think confirmSetup may only be for the payment element. With Payment Request Button I think you need to call confirmCardSetup

magic walrus
#

I've tried using that also.

But I'm short of parameters.

const {error} = await stripe.confirmCardSetup(subscription.stripeSetupIntent.client_secret, {
          payment_method: {
            card: event.paymentMethod.card,
            billing_details: event.paymentMethod.billing_details
          }
        })

The payment_method object I'm passing is not expected type of property

red mortar
#

On my test site, I currently have:

  // Confirm the PaymentIntent without handling potential next actions (yet).
  stripe.confirmCardSetup(
    clientSecret,
    {payment_method: ev.paymentMethod.id},
    {handleActions: false}
  ).then(function(confirmResult) {
    ...
#

So it may be that you are passing an entire object instead of the ID

magic walrus
#

Alright let me try this

#

Great, this works. thanks @red mortar