#binod-react-pe
1 messages · Page 1 of 1 (latest)
everytime I submit, I get this error
it was working yesterday
btw, it's a subscription payment
hello?
Hey sorry
Channel is busy
So helping several people at once
Looking now
Can you provide the request ID that is associated with that error?
Or even the PaymentIntent ID would work fine
paymentIntent ID : pi_3L0T8iHsW9ET26Jg1kbbVMB2
Thanks, looking
Okay so yeah that PaymentIntent has already been successfully confirmed/paid: https://dashboard.stripe.com/test/logs/req_7nIoZMwUqaGgvd
What is your goal when you hit Submit?
Do you expect to be paying for a different Subscription?
Are you creating a Subscription on page load?
Yes I create subscription before submitting
subscription dashboard show incomplete
after submiting, it shoulld pay subscription fee and make it active right?
Yes and that did happen for that subscription
You are likely looking at the wrong subscription
So you need to check which client secret you are passing client side
And ensure it is the client secret associated with the latest_invoice of the new Subscription you are trying to pay.
It looks like you have the client_secret hardcoded in this case and you are just trying to confirm the same PaymentIntent over and over instead of creating a new Subscription and using the PaymentIntent associated with that new Subscription
hmm..let me try sometimes it works, sometimes it doesnt
message: "This PaymentIntent's payment_method could not be updated because it has a status of canceled. You may only update the payment_method of a PaymentIntent with one of the following statuses: requires_payment_method, requires_confirmation, requires_action."
what causes this error?
When you are using a PaymentIntent that has been canceled.
I'd start from the beginning and trigger a new Subscription
Then check to ensure that Sub's latest_invoice.payment_intent.client_secret is getting passed to your client-side code.
Add logging to ensure all of that is the case
Then actually try to pay client-side
How do I remove the text above that submit button?
You can customize the appearance of Payment Element in a variety of ways. See: https://stripe.com/docs/stripe-js/appearance-api
Sounds like you want your labels to be floating in this case
If you don't want the text to be above the field.
No no, I don't want to display those labels
You can't remove the labels completely
But, there was a documentation to hide terms somewhere
Here it is. There is a option to put terms:'never'
@void flower I already shared how to hide those terms yesterday - this is what I sent yesterday:
`const OPTIONS = {
terms: {
card: 'never'
},
};
return (
<PaymentElement options={OPTIONS} />
);`