#bhargav-gollamudi_best-practices
1 messages · Page 1 of 1 (latest)
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.
- bhargav-gollamudi_code, 19 hours ago, 37 messages
đź‘‹ 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. Thank you for your patience!
⏱️ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime! If this thread is closed and you have another question you'll need to start a new thread.
đź”— 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/1213011393335263232
📝 Have more to share? You can add more detail below, including code, screenshots, videos, etc.
hello! Can you share the corresponding PaymentIntent id? it'll have the prefix pi_
Yeah. can i share that of staging environment ?
sure
Please check pi_3OpAMDHTVPoQ23vN0uSK1c0Y
looking at the request : https://dashboard.stripe.com/test/logs/req_ny4pPZK6cpX6cc, a payment_method was not defined. Also, off_session=true should be passed in if you're collecting payments off-session : https://docs.stripe.com/api/payment_intents/create#create_payment_intent-off_session. You should not be using setup_future_usage=off_session
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
We are already passing "payment_method" as "pm_1OpAJaHTVPoQ23vNxNlwWH8u"
When should we use "setup_future_usage=off_session" ?
i suggest you login to the Dashboard to view the request that was received. There is no payment_method being provided
https://docs.stripe.com/api/payment_intents/create#create_payment_intent-setup_future_usage
Providing this parameter will attach the payment method to the PaymentIntent’s Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be attached to a Customer after the transaction completes.```
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
setup_future_usage is used to collect the payment method and set it up for future usage
Can you guide on how to do the offline payments ?
We have a payment method pm_XXXX which is assigned to a customer cus_XXXX.
When you create a PaymentIntent, pass in pm_xxx in payment_method, off_session=true and do not use setup_future_usage=off_session
We are creating a payment intent with below params
{
"setup_future_usage": "off_session",
"currency": "EUR",
"application_fee_amount": "0",
"amount": "59500",
"customer": "cus_xxxxx",
"payment_method" : "pm_xxxx"
}
like i've mentioned before, the request that we've received for creating pi_3OpAMDHTVPoQ23vN0uSK1c0Y doesn't have payment_method being passed in
Will test again by printing the params. Will get back to you in few minutes
Now working fine. When should we use "setup_future_usage": "off_session" param ?
setup_future_usage is used to collect the payment method and set it up for future usage
https://docs.stripe.com/api/payment_intents/create#create_payment_intent-off_session
if we use off_session then we do not need to confirm the payment intent. Is that correct ?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
you need to pass in confirm=true still if you want to confirm and create in the same request
I mean separate confirm() request ion payment intent is not required, right ?
it's not required
Ok. Thanks for the help.
We got different responses from dev-help yesterday. One suggested solution was to use the "radius" rules. Another one said as we are adding cards to the customer from India the 3D secure authentication is required
are you accepting cards from India? i.e. India issued cards
But we are testing with the stripe suggested test cards
yes, but does your business accept payments from India issued cards? i.e. are you likely to receive payments from India customers?
Yes. Some customers are from Europe based
I'm confused, I asked if you will likely receive payments from Customers based in India, but you mentioned that some Customers are from Europe
to clarify again, will you receive payments from Customers based in India?
Yes. Both India and Europe based customers are there.
okay, for India issued cards, you'll want to make sure that you also handle e-mandates. You can go through this guide : https://docs.stripe.com/india-recurring-payments?integration=paymentIntents-setupIntents. In summary, you need to pass in the parameters to create a mandate when creating a SetupIntent. When you create a PaymentIntent, you will pass in the mandate id.
Ok. Can we use same procedure for Europe based cards too ?
You can pass the payment_method_options[card][mandate_options] parameter for all requests. Stripe ignores these parameters if your customer is using a non-India issued card because the regulation doesn’t apply to them.
Ok. Just now tested again with the test card '4000000000003220'. Got error as "Your card was declined. This transaction requires authentication."
what are you trying to test for with this test card?
the 3220 test card always requires authentication, so that decline saying that it requires authentication is expected behaviour
So, we could not anything for those type of cards. Is that correct ?
it's rare but if you encounter the authentication_required error, you'll need to get your customer back on-session to make payment since authentication is required
I am just checking 3d secure authentication required in the offline with the new coding change you suggested