#hendr1x
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
That is the guide I am using
I finished all steps already and got the response already
just writing this last part and I will be done ๐
you can either ask the customer for another payment method and go back to step 4
or you can simply restart the process for the start
can you tell the commands?
what do you mean?
I assume the first is to cancel the current order?
I don't think you understood...this is after a payment was already confirmPayment()
on the return_url
I want to do a final check of inventory levels
when you say this test fails, you mean if you don't have any more products in your inventory?
yes. If an order was processed during the redirect to stripe
ok then you need to cancel the Payment Intent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
and let the customer know the payment wasn't processed due to insufficient quantities of the item they ordered
ok...so basically start from scratch right...after cancel payment intent. Then generate new payment method, then new payment intent
Finally confirm again
My hope would be that they would adjust the quantity and still place the new order that I can fulfill.
Hi! I'm taking over my colleague. Please, give me a moment to catch up.
Haha, no!
ok...well its not worth wasting you time trying to get up to speed
I'll just try and figure it out
it just was the weirdest thing to say before just disappearing
and he did the exact same thing to be me last week
pretty sure he doesn't like me
Sometimes we need to take a break, and other colleagues are taking over the conversation.
No worries, I will try to catch up quickly
It's not about this. We have a schedule and it was my time to take over.
That's correct, you don't need to create a new PI. If you update the amount on the PI, the status will go back to requires_payment_method and you can repeat the process.
To be honest, I think an even easier solution would be to use manual capture, meaning you put a hold on the funds, and after you check your inventory you capture the funds youself: https://stripe.com/docs/payments/place-a-hold-on-a-payment-method
Anyway. Please, let me know if you have any other questions.
I need to cancel a paymentIntent. I'm just learning about this but I'm 99% sure my status is not in the "allowed" status list. What do I do when a payment has been successfully captured and needs to be canceled?
thank you for your prior response as well
What do you mean by
my status is not in the "allowed" status list
Do you mean the status of PI?
What's the "allowed status list"?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, in rare cases, processing.
If the PI is successfully captured you can't do anything with it.
You can only refund it.
ok. how do I refund it?
Ok..so if I do a refund I assume I have to start from scratch if I want to take another payment correct?
Yes.
I would say, if you can automatically check the inventory, refunding is too much movement.
That's why I suggested placing a hold on the Payment Method, and capture when you are sure have enough in stock. This way no money is moved before you are sure you can proceed with the transaction.
Another way I see, is reserving the selected items in your database when the customer goes to checkout. However, I understand this won't work if you need to manually verify the inventory.
I'm interested in using the manual capture method...however I am using paymentMethods
do you have any idea compability?
this is the guide I followed : https://stripe.com/docs/payments/build-a-two-step-confirmation
It is 100% coded
I just am handling the confirmPayment() redirect
return_url
I want to do a final inventory check before completing process
just in case any orders processed while in stripe redirect
It feels like an overkill for your case. A standard integration with manual capture should be good enough for your case: https://stripe.com/docs/payments/place-a-hold-on-a-payment-method
its already coded...I'm not recoding everything
Exactly, this way the two-step solution is not 100% guarantee that 2 customers won't buy the same last remaining item at teh same time.
Its not the 2 steps that cause the issue
But with manual capture you are in control of making the last call.
it is present in 1 step
What do you mean by this?
There are other requirements on this project you are not aware of
I can not get rid of 2 step checkout
what are my options? Is it only to do a refund?
No problem. You can still add capture_method: manual when you create a PaymentIntent in step 5: https://stripe.com/docs/payments/build-a-two-step-confirmation#show-details
https://stripe.com/docs/api/payment_intents/create#create_payment_intent-capture_method
No worries, that's why we're here ๐
I am creating my paymentIntent server side. Do you know when confirmating/validation occurs? Is this going to be an issue communicating issues with customers?
What do you mean by "communicating issues with customers"?
If it fails validation
By "validation" you mean realising you don't have enough inventory?
No...I mean stuff on your side of things
Payment Elements will take care of that.
Ok
Last question I think...I see capture_method = manual DOC says " (Not all payment methods support this.)"
how do I handle this?
What PM types are you planning to use?
That's not my decision. Sorry I cant provide an answer
You can see here what PMs are supported: https://stripe.com/docs/payments/place-a-hold-on-a-payment-method#auth-capture-limitations
Ok. I think that is limitation I can not allow. So are we back to only being able to do a refund?
I think at this point you would be better off building a reservation mechanism in your app. As soon as the customers goes to checkout you can lock a specific number of items for a few minutes to give them time to complete the transaction.
Refunds is bad user experience.
Thank you for the suggestion. It's still a race condition. It's all caused by the redirect_url required by your system.
I'm just trying to handle that as best as I can.
Maybe that's not right actually. I get what your suggesting now
I also get that I should avoid refunds at all costs.
Ok. Let me explore your idea more. I really appreciate your time and creativity
To add more, we don't refund Stripe fee.
Happy to help. Please, let me know if you have any other questions.