#ebellotpu6_code
1 messages Ā· Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- ebellotpu6_api, 20 hours ago, 16 messages
- ebellotpu6_api, 1 day ago, 16 messages
- ebellotpu6_code, 6 days ago, 23 messages
š Welcome to your new thread!
ā²ļø We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
ā±ļø We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
š This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1257627548540469351
š Have more to share? Add details, code, screenshots, videos, etc. below.
Hi
What is the issue you are facing exactly ?
Please, let me 10 min
Yes sure, take your time!
I am looking the error code
Or you can search for the ID (req_xxx) of the failing API request:
https://support.stripe.com/questions/finding-the-id-for-an-api-request
okey
A payment method of type card was expected to be present, but this PaymentIntent does not have a payment method and none was provided. Try again providing either the payment_method or payment_method_data parameters.
this is the error I am getting when I try to pay again the subscription
req_4P1C9pOkK5l14S
Thanks, checking..
You are getting this error, when exactly ?
How are you collecting a new payment method from the customer ?
here you seem to confirm the payment without a new payment method.
First I create a subscription, then I decline the 3DS from my client. So the payment fails. Then I retry with another payment method and when I want to notify the client that a 3DS secure is required to complete the payment, I am getting this error
what does your code look like that does this?
and I'm not clear, are you collecting a new card and trying to pay with that? or you want to retry/handle 3DS on the existing card?
if it's the existing card, use https://docs.stripe.com/js/payment_intents/confirm_card_payment#stripe_confirm_card_payment-existing to confirm the Invoice's PaymentIntent and pass the ID of the customer's saved payment method.
and if it's a new card?
use PaymentElement to confirm the Invoice's PaymentIntent: https://docs.stripe.com/billing/subscriptions/build-subscriptions?platform=web&ui=elements#collect-payment
this.stripe.confirmCardPayment(response.clientSecret).then((result: any) => {
this is my client code to confirm
well that code assumes that there's an Element already present on the page and will collect a new card from the details typed into that Element and charge it.
hence why I mentioned the overloadded version of the function: https://docs.stripe.com/js/payment_intents/confirm_card_payment#stripe_confirm_card_payment-existing to charge an existing known card without using Elements and collecting a new one, if that's what you need.
this is what i am getting after this code line:
code: "payment_intent_incompatible_payment_method"
doc_url: "https://stripe.com/docs/error-codes/payment-intent-incompatible-payment-method"
message: "A payment method of type card was expected to be present, but this PaymentIntent does not have a payment method and none was provided. Try again providing either the payment_method or payment_method_data parameters."
payment_intent: {id: 'pi_3PY3JNId0VogbbwX277q3AXd', object: 'payment_intent', amount: 8198, amount_details: {ā¦}, automatic_payment_methods: null, ā¦}
request_log_url: "https://dashboard.stripe.com/test/logs/req_e8jyDElkFIiyIb?t=1719914598"
type: "invalid_request_error"
yeah , probably because you don't have Elements actually set up or a CardElement/PaymentElement mounted.
hard to say with just a single line of your frontend code really, but that's what it means to me.
In this page theres no payment element
then the error seems expected? you're saying "confirm the PaymentIntent" but not providing an Element or a PaymentMethod ID.
but I have been able to confirm subscriptions in the first try. The problem its when I decline the authentication, and retry the payment another time
can you review the links I shared?
it's a bit hard to help you right now as it's not clear what you're asking or what you've tried, I think I've given many possible solutions
thats it!
thanks!!