#z_code
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1259697963597299806
📝 Have more to share? Add details, code, screenshots, videos, etc. below.
If you log paymentIntent before setting it in collectPaymentMethod, is it in the form of pi_xxx?
Did you connect to the reader first? https://docs.stripe.com/terminal/payments/connect-reader?terminal-sdk-platform=react-native&reader-type=tap-to-pay
Yes, I am connected to the reader (iPhone Tap to Pay) and once I create a payIntent, I am able to see all the specified values, including the pi_xxx
LOG Created PaymentIntent: {"amount": 50, "amountDetails": {"tip": {"amount": null}}, "amountTip": 0, "captureMethod": "manual", "charges": [], "created": "1720390320000", "currency": "usd", "id": "pi_3Pa3JMDjqaZIGrui2ufkrZ5G", "metadata": {}, "offlineDetails": null, "paymentMethod": null, "paymentMethodId": null, "sdkUuid": "60DB801F-5188-4950-9071-8C4FA3D5AEDF", "statementDescriptor": null, "statementDescriptorSuffix": null, "status": "requiresPaymentMethod"}
LOG [Stripe terminal]: didChangePaymentStatus waitingForInput
LOG [Stripe terminal]: didChangePaymentStatus waitingForInput
LOG [Stripe terminal]: didRequestReaderInput ["tapCard"]
LOG [Stripe terminal]: didRequestReaderInput ["tapCard"]
LOG [Stripe terminal]: didChangePaymentStatus ready
LOG [Stripe terminal]: didChangePaymentStatus ready
LOG Collecting payment method: undefined
LOG error undefined
No there is no error either
Both return undefined
In this pi_3Pa3JMDjqaZIGrui2ufkrZ5G, https://dashboard.stripe.com/logs/req_jo43KOyLILVbPT showed:
Your account cannot currently make live charges. If you are the site owner, please activate your account at https://dashboard.stripe.com/account/onboarding to remove this limitation. If you are a customer trying to make a purchase, please contact the owner of this site. Your transaction has not been processed
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Can you try test mode key secret and publishable key to check if the integration works?
Okay, let me try. I don't have a test card though so it was fail
For test mode, physical test card should work: https://docs.stripe.com/terminal/references/testing#physical-test-cards
For live mode, you'd need to ensure your account in live mode is activated by completing the onboarding
Yes, that is the current issue I am facing, I do not have a test card.
let me try in live mode, my account is already onboarded
okay... weird
Check out this paymentIntent id: pi_3Pa7ruIfr2dTjlGD2rGmLhEF
LOG [Stripe terminal]: didChangePaymentStatus waitingForInput
LOG [Stripe terminal]: didRequestReaderInput ["tapCard"]
LOG [Stripe terminal]: didRequestReaderInput ["tapCard"]
LOG [Stripe terminal]: didChangePaymentStatus ready
LOG [Stripe terminal]: didChangePaymentStatus ready
LOG Collecting payment method: undefined
LOG error undefined
LOG Payment method collected: undefined
LOG [Stripe terminal]: didChangePaymentStatus processing
LOG [Stripe terminal]: didChangePaymentStatus processing
LOG [Stripe terminal]: didChangePaymentStatus ready
LOG [Stripe terminal]: didChangePaymentStatus ready
LOG Payment intent confirmed: undefined
My logs however show something else.
In https://dashboard.stripe.com/payments/pi_3Pa7ruIfr2dTjlGD2rGmLhEF, it showed that the payment has been succeeded and refunded later
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Your integration is working, but the log trace you shared doesn't seem to log the information correctly
confirmPaymentIntent worked fine: https://dashboard.stripe.com/logs/req_wBlQxaOlnULnsm
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I'd recommend checking whether the variables are logged correctly
Sure, I’ll do that.
Thanks for your help @coarse reef. I’ll reopen a thread if I have more question.
No problem! Happy to help 😄
I'm afraid it's not possible to simulate decline payment in live mode
In test mode, physical test card can be used with setting the decimal of the charge amount to the decline scenarios: https://docs.stripe.com/terminal/references/testing#physical-test-cards
For example, to create a generic_decline payment, the amount can be set to $1.05 and pay with physical test card
Got it. Thanks.