#ilyeselb
1 messages · Page 1 of 1 (latest)
Hello
Do you have a request ID that you can share?
Overall that sounds like you aren't passing a PaymentMethod ID and confirm: true to your PaymentIntent
nope but i have cus i
When you are attempting to charge later
payment id
Sure that works
Hmm that PaymentIntent you provided me is from an Invoice
However in your code you are creating a PaymentIntent directly
Are you trying to use Invoices here?
i just create invoice before every thing in case user pay directly with the form
and use that invoice to get the amount
in the createintent
You are creating an Invoice with no intention of paying it?
no i im otherwise if the user is selecting the saved card to pay i will delete it
Hmm okay. Why not just pay that Invoice via a saved card?
There are a couple ways. But the easiest is simply to pass the PaymentMethod to the /pay endpoint: https://stripe.com/docs/api/invoices/pay#pay_invoice-payment_method
sounds good for me
i will check that
option
payment method only
or i should have the offSession param
asweel
well
okay and there is not confirm opption like on the createIntent
where it confirm the card ?
This confirms the PaymentIntent for you.
The other option is to pass the client secret to the frontend and use confirmPayment() and pass the saved PaymentMethod ID to that method
Both options work fine here
And it more depends on whether your customer is on or off-session
i see thank you