#Sam Stripe-pi-confirmation
1 messages · Page 1 of 1 (latest)
Hey! you're attempting to confirm a PI (via confirm: 'true') without a payment method attached
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
)
That determines the payment method types that are offered. You still need to provide an actual payment method
I see, cheers
When I create a payment method the example here https://stripe.com/docs/api/payment_methods/create
suggests that I put in the card details. But they are passed to stripe via the intent, so how can I add them to the payment method?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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?
taking a step back I am trying to follow this example -> https://stripe.com/docs/payments/save-during-payment
I am creating a customer and passing through the details but am not able to save the payment details on the form
Using your own custom form, or Checkout?
Have you built out a front-end form with Stripe.js to facilitate payment details capturing?
Yes we are using a custom form with stripe.js. It is successfully making payments.
I'm also going off this earlier, archived question/answer. #989100636140351498 message
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?
If so, you're missing the customer and payment_method parameters in your request: https://stripe.com/docs/payments/save-and-reuse?platform=web#charge-saved-payment-method
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
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
I asked your colleague about this here: #989100636140351498 message
He said there would be no frontend changes needed