#ebellotpu6
1 messages · Page 1 of 1 (latest)
hello! did you create the PaymentIntent with off_session=true? https://stripe.com/docs/api/payment_intents/create#create_payment_intent-off_session
yes
var paymentIntent = paymentIntentService.Create(new PaymentIntentCreateOptions { Amount = request.Amount, Currency = "EUR", Customer = request.CustomerId, PaymentMethod = request.PaymentMethodId, Confirm = true, OffSession = true, Description = request.Description, Metadata = new Dictionary<string, string> { { "storageId", request.StorageId }, { "centerId", request.CenterId }, { "invoiceType", "deposit" } }, });
can you share the PaymentIntent id?
pi_3Mh6x5Ad02IkV8oW1tht9oqr
umm, so that PaymentIntent id which you provided is created as part of a Subscription. Not as a "standalone" PaymentIntent from your code
are you sure you've provided the correct PaymentIntent id?
pi_3Mh6xJAd02IkV8oW15OTGLEN
how did you create that PaymentMethod? was it via a SetupIntent? if yes, can you share the corresponding SetupIntent?
yes
ah, okay i see the problem now
seti_1Mh6tyAd02IkV8oWRLFFTJap
https://stripe.com/docs/testing#three-ds-cards - the test card ending with 3220 always requires authentication
so if you try and charge it off_session, then it'll fail with the error authentication_required
that's normal
if you want to test the off_session flow with a card successfully setup for off_session usage, this is the card you would want to use instead : 4000002500003155
So how can authenticate the card before make the payment and then create a subscription?
because, in my case, I want to charge a deposit and then create a subscription for that card
in essence, you're using the wrong card to test - you should use the 3155 card. When you create the PaymentIntent for the deposit - you're essentially performing this scenario : https://stripe.com/docs/payments/save-during-payment
I recommend you set the PaymentMethod on the Customer as the invoice_settings.default_payment_method [0]
[0] https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
then create the Subscription for the Customer server side with off_session=true : https://stripe.com/docs/api/subscriptions/create#create_subscription-off_session
but really though, an easier way for this is to just create a Subscription with a one off item for the deposit : https://stripe.com/docs/api/subscriptions/create#create_subscription-add_invoice_items so that the customer only has to make one payment.
So, I can create a subscription with an item for the deposit and this will be only charge one time, and then the subscription will continue until it is cancelled?
yes, that's right
Sorry, for invoice reasons, I can do what you say of join the to payments inone subscription
that's fine, then you can always follow the steps i mentioned before that suggestion
So if I pay with a 3155 card and set payment_method to default, would it successfully pay both, deposit + subscription?
i'd suggest you try it out and reach out if you're running into trouble
I have two more questions, in my account I have established that failed subscriptions are tried again after 1 day, in the case of a card that requires authentication, such as 3155, will it fail again? And in the case of a failed deposit, will it be tried again?
in my account I have established that failed subscriptions are tried again after 1 day, in the case of a card that requires authentication, such as 3155, will it fail again
Yes, as it's an off-session payment. Any off-session payment that requires auth automatically fails/declines. You need to bring your customer back on-session and re-confirm the PI.
And in the case of a failed deposit, will it be tried again?
What's a 'failed deposit'? Payout?
yes, a failed payout
Sorry, I am refering to a failed payment with card.
I'm confused, you said a failed deposit
Anyway, I answered your failed card payment Q:
Yes, as it's an off-session payment. Any off-session payment that requires auth automatically fails/declines. You need to bring your customer back on-session and re-confirm the PI.
Okey, and if the failed payment is with a card does not require auth, it will it be tried again next day, like subscription?
I don't understand the question
We'll attempt retries for payment failures on subscriptions as per the schedule you configure in the Dashboard
I am asking if it's possible to retry a failed payment with a card, if I configure a retry schedule of 1 day?
Sure
but it will be done automatically?
Yes, that's what the Smart Retries feature is. Did you read the doc?
I'd recommend testing this yourself with clocks: https://stripe.com/docs/billing/testing/test-clocks
