#Kareem
1 messages · Page 1 of 1 (latest)
HI @red mortar
Yes it can, you just use $0 as the amount for the request and confirm the secret like normal
@red mortar I've tried doing that
I got an error
error:
code: "incomplete_number"
message: "Your card number is incomplete."
type: "validation_error"
What call did you get that error on?
Can you send me the snippet of code that produced that error?
await stripe.confirmSetup(elements, {return_url})
Oh I think confirmSetup may only be for the payment element. With Payment Request Button I think you need to call confirmCardSetup
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
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