#Marcin-terminal-testing
1 messages · Page 1 of 1 (latest)
Hi there
Can you provide the PaymentIntent ID so I can take a look?
And which Terminal SDK are you using?
pi_3LfQmyFEAPOEt4jT1gsQJcze
<script src="https://js.stripe.com/terminal/v1/"></script>
We were also using real device not the simulated one.
Thanks
Ah okay
So here's what is going on
With in-person payments, you can't cancel between the collectPaymentMethod and processPayment steps server-side. You would use the JS SDK cancelCollectPaymentMethod during this step if you want to cancel. See: https://stripe.com/docs/terminal/payments/collect-payment?terminal-sdk-platform=js#collect-payment. However, once the PaymentIntent moves to requires_capture, after you do processPayment, then you can cancel server-side. However, in your case, you replayed your previous cancellation request using the same idempotency key from when you attempted to cancel between the collectPaymentMethod and processPayment steps, which is why you saw the same response (payment_intent_unexpected_state)
Thank you for the explanation.
So basically when in-person payment is in the status processing we can only cancel it by frontend SDK.
That is correct. It has to stay client-side until after the processPayment step