#bhargav-gollamudi_best-practices

1 messages · Page 1 of 1 (latest)

errant lodgeBOT
remote cloudBOT
#

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.

errant lodgeBOT
#

đź‘‹ 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.

native mango
#

hello! Can you share the corresponding PaymentIntent id? it'll have the prefix pi_

fickle quest
#

Yeah. can i share that of staging environment ?

native mango
#

sure

fickle quest
#

Please check pi_3OpAMDHTVPoQ23vN0uSK1c0Y

native mango
#

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

fickle quest
#

We are already passing "payment_method" as "pm_1OpAJaHTVPoQ23vNxNlwWH8u"

#

When should we use "setup_future_usage=off_session" ?

native mango
#

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.```
#

setup_future_usage is used to collect the payment method and set it up for future usage

fickle quest
#

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.

native mango
#

When you create a PaymentIntent, pass in pm_xxx in payment_method, off_session=true and do not use setup_future_usage=off_session

fickle quest
#

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"
}

native mango
#

like i've mentioned before, the request that we've received for creating pi_3OpAMDHTVPoQ23vN0uSK1c0Y doesn't have payment_method being passed in

fickle quest
#

Will test again by printing the params. Will get back to you in few minutes

fickle quest
#

Now working fine. When should we use "setup_future_usage": "off_session" param ?

native mango
#

setup_future_usage is used to collect the payment method and set it up for future usage

fickle quest
native mango
#

you need to pass in confirm=true still if you want to confirm and create in the same request

fickle quest
#

I mean separate confirm() request ion payment intent is not required, right ?

native mango
#

it's not required

fickle quest
#

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

native mango
#

are you accepting cards from India? i.e. India issued cards

fickle quest
#

But we are testing with the stripe suggested test cards

native mango
#

yes, but does your business accept payments from India issued cards? i.e. are you likely to receive payments from India customers?

fickle quest
#

Yes. Some customers are from Europe based

native mango
#

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?

fickle quest
#

Yes. Both India and Europe based customers are there.

native mango
fickle quest
#

Ok. Can we use same procedure for Europe based cards too ?

native mango
#

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.

fickle quest
#

Ok. Just now tested again with the test card '4000000000003220'. Got error as "Your card was declined. This transaction requires authentication."

native mango
#

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

fickle quest
#

So, we could not anything for those type of cards. Is that correct ?

native mango
#

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

fickle quest
#

I am just checking 3d secure authentication required in the offline with the new coding change you suggested