#Asp-apple_pay
1 messages · Page 1 of 1 (latest)
pi_3K4NF8HGEu8wlVR00Y2JAkPD_secret_YOmWA61btqhC8gxppMGl5riiZ
Payment intent id not recived for only i sent client secret to confirm payment intent
STPPaymentHandler.shared().confirmPayment(withParams: paymentIntentParams, authenticationContext: self as! STPAuthenticationContext)
@covert crown
Your PaymentIntent was created with confirm: true. It means it will be confirmed automatically, so you don't need to confirm it on the frontend.
That's why you are getting an error message saying "You cannot confirm this PaymentIntent because it has already succeeded after being previously confirmed"
When you create the PayemntIntent, you can check the Stripe response that should contain status: "succeeded".
How i confirm to front end side i change front endside anything? in swift ios
When you create the PaymentIntent with confirm: true, it is automatically confirmed. So there's nothing to do on the frontend on iOS. The payment is already successful.
how will change it confirm: true or confirm: false in. backend
If you set confirm: false (that's the default value) when creating the PaymentIntent, then you need to confirm the payment on the frontend.
Okay thank you so much i will check it @covert crown
You'll need to pass the return_url during client-side confirmation
I gave return_url but only got same error
@tepid dawn
I passed returnurl as same error coming
Can you share the actual error? Or the request ID?
error Optional(Error Domain=com.stripe.lib Code=50 "There was an unexpected error -- try again in a few seconds" UserInfo={com.stripe.lib:StripeErrorTypeKey=invalid_request_error, com.stripe.lib:ErrorMessageKey=You cannot confirm this PaymentIntent because it has already succeeded after being previously confirmed., NSLocalizedDescription=There was an unexpected error -- try again in a few seconds, com.stripe.lib:StripeErrorCodeKey=payment_intent_unexpected_state})
You're trying to confirm a Payment Intent that has already been confirmed. You need to create a new PI object
This error came that time i changed confirm : false in backend side
This PaymentIntent pi_3K4QB..... cannot be confirmed using your publishable key because its confirmation_method is set to manual. Please use your secret key instead, or create a PaymentIntent with confirmation_method set to automatic
I found this error
👋 hopping in since @tepid dawn and @covert crown had to head out