#Sam Stripe-pi-confirmation

1 messages · Page 1 of 1 (latest)

hollow cosmos
#

Hey! you're attempting to confirm a PI (via confirm: 'true') without a payment method attached

dusky ermine
#

automatic method isnt enough?

#

I want to be able to save payment details using this parameter setup_future_usage='off_session'
However there was no checkbox when sending through the request.

#

We are trying to make two requests, one with a setup_future_usage param on it. The follow request has these params:
stripe.PaymentIntent.create(
amount=payment_amount,
currency="GBP",
automatic_payment_methods={
"enabled": True,
},
off_session=True,
confirm=True,
return_url=dashboard_landing_page
)

hollow cosmos
dusky ermine
#

I see, cheers

hollow cosmos
#

Well you shouldn't really use that API, you should be collecting payment details via Stripe.js

#

What exactly are you doing? How are you integrating?

dusky ermine
hollow cosmos
#

Using your own custom form, or Checkout?

#

Have you built out a front-end form with Stripe.js to facilitate payment details capturing?

dusky ermine
#

Yes we are using a custom form with stripe.js. It is successfully making payments.

hollow cosmos
#

Then what specific issue are you having adapting that working integration to this?

#

Reading that thread it sounds like you're trying to charge an already saved payment method?

dusky ermine
#

If it is required then I get back to my first problem - how do I create a card payment method when I don't have the card details?

edit Ill try the example using the customer.

#

to clarify, the problem is that the UI does not display a checkbox allowing us to save the payment details for later.

#

I think we are after this guide https://stripe.com/docs/payments/save-during-payment?platform=web rather than https://stripe.com/docs/payments/save-and-reuse?platform=web#charge-saved-payment-method
because we don't want to charge our customers later. We just want them to be able to have their details saved in the form for next time

Learn how to save payment details during a payment.

Learn how to save card details and charge your customers later.

hollow cosmos
#

how do I create a card payment method when I don't have the card details?
Well, you can't

#

to clarify, the problem is that the UI does not display a checkbox allowing us to save the payment details for later.
Which UI? The Element? Yep, it won't. You'll need to configure that yourself

dusky ermine
hollow cosmos
#

He's right, there isn't. But you're asking about a checkbox to I assume save the card? If you ant that, you'll need to build it

#

But it's not required