#mauliks_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1232929201947148342
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- mauliks_code, 16 hours ago, 56 messages
- mauliks_code, 2 days ago, 20 messages
- mauliks_api, 5 days ago, 37 messages
request ID is : req_6JnmGvdvedokpi
This is a terminal payment that the terminal has confirm the Payment Intent previously with succeeded status: https://dashboard.stripe.com/test/logs/req_Ju2F1YlJ4YJoKu
Once the Payment Intent status is succeeded, you can't confirm it again
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
wait how?
every time got error from the app how it got sccuess ?
my app prints this :
capture failed: Error Domain=com.stripe-terminal-ios.example Code=2000 "Missing secret in ConnectionToken JSON response" UserInfo={NSLocalizedDescription=Missing secret in ConnectionToken JSON response}
I just did another transaction and same error
Can you share the code and the line that threw this error?
ok
https://api.stripe.com/v1/payment_intents/%@/confirm here it gives error
[[StripeAPIClient shared] capturePaymentIntent:confirmResult.stripeId completion:^(NSError *captureError)
Where did you see capturing the Payment Intent in iOS from?
With reference to https://docs.stripe.com/terminal/payments/collect-payment?terminal-sdk-platform=ios#capture-payment, capturing a Payment Intent should be done at server side
yes server side only this will call server end point
just let me know my capture method is set automatically
SCPPaymentIntentParametersBuilder * builder = [[SCPPaymentIntentParametersBuilder alloc] initWithAmount:111 currency:@"usd"];
[builder setCaptureMethod:SCPCaptureMethodAutomatic];
so still I need to call to confirm end point? or Stripe will do it automatic ?
๐ jumping in and catching up
Your code looks fine and yes that will capture the PaymentIntent for you. Could you share the full stack trace of the error?
You should set the capture method to manual
SCPPaymentIntentParametersBuilder * builder = [[SCPPaymentIntentParametersBuilder alloc] initWithAmount:100 currency:@"usd"];
[builder setCaptureMethod:SCPCaptureMethodAutomatic];
You should set this to SCPCaptureMethodManual instead
Then you can call Capture upon the confirmed PI
ok but what if I set automatically?
thing is I want to make as automatically as possible so I need to call less APIs
[[SCPTerminal shared] confirmPaymentIntent:collectResult completion:^(SCPPaymentIntent *confirmResult, SCPConfirmPaymentIntentError *confirmError)
so I need to stop after this?
createPaymentIntent succeeded
collectPaymentMethod succeeded
confirmPaymentIntent succeeded
and done right?
yes!
it's a PaymentIntent Id. It's up to you if you want to consider as a transaction ID
got it
every time app will create a new PaymentIntent and stripe will provide new PaymentIntent ID
after success, correct?
Mostly. You will have the ID right when the app created a new PaymentIntent. But only after the app called ConfirmPaymentIntent, then the PI is actually becoming to a successful transaction
yes