#op84_api

1 messages ยท Page 1 of 1 (latest)

neat sigilBOT
#

๐Ÿ‘‹ 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/1366310657825312840

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

grand slate
#

I think it should be recognized automatically. Do you see otherwise?

jovial flax
#

there are some payments which fail.. for example bank account closed.. but that wouldnt fix a mandate.. so probably its automatically.. when looking at this customer cus_QkAvZm6YltBvRm i have some incomplete .. there it says i should add the mandate_data.. how can i fix those payments like best practice for the user? add a new payment method and update the payment intent with the new payment method? or wire transfer and it automatically completes the payment intent? and when looking at the payment intent with the api - it has no error.. it says status requires_confirmation.. how to handle that smart?

grand slate
#

Okay looking at one example

neat sigilBOT
grand slate
#

So you created a SetupIntent seti_1QmtNoClnEzULH8azOno8uFO

#

On Jan

#

Then its has pm_1QmtPNClnEzULH8aUe81M1ls, with mandate_1QmtPNClnEzULH8awMGtQxkD, but this mandate was inactive from April 3

#

Later you try to confirm pi_3R8u7rClnEzULH8a1GCQCA3y using the same mandate, but it's inactive and that's why you received an error

#

The best practice would be asking the customer for another mandate when you catch this error

jovial flax
#

so the mandate was inactive because of a failed payment?

#

and i would then reuse the payment method and present the user with a message where he says i consent of using my bank account basically? or is there something you guys provide.. currently i use stripe elements to create the setup intent which saves the iban and stuff with the mandate message.....

#

also in some other cases.. the status also the mandate message is the same but the bank account is closed.. so a mandate wouldnt change a thing.. so i would like to create a simple solution for those problems

crude bronze
#

hi! I'm taking over this thread.

jovial flax
#

cool hi @crude bronze

crude bronze
#

so the mandate was inactive because of a failed payment?
no. we sent you a webhook event to notify you that the mandate became inactive on 2025-03-04

jovial flax
#

also i'm figuring out if i need to save browser and ip of the client when he's creating the setup intent..

crude bronze
#

so i would like to create a simple solution for those problems
when you get an error due to the mandate, the best option is to re-collect the payment method with a new mandate

#

also i'm figuring out if i need to save browser and ip of the client when he's creating the setup intent..
why? if you use PaymentElement to collect the payment information, then Stripe will save all the information needed for you.

jovial flax
crude bronze
#

need to update the payment method
you don't update anything. you create a brand new PaymentIntent (or SetupIntent), which will generate a brand new PaymentMethod and Mandate.

jovial flax
crude bronze
#

Hum... then I recommend to do some tests in test mode to double check if it's working or not.

jovial flax
crude bronze
#

I think it would be simpler to create a new one. otherwise yes, you would update the PaymentIntent with the new PaymentMethod.

jovial flax
#

but if you look for example at pi_3R8u7rClnEzULH8a1GCQCA3y and then pi_3QGBS7ClnEzULH8a1C8jJ47r.. using the same payment method.. one failed and was then paid with bank transfer.. which would be ok for me. and the other one before is in this mandate missing state.. i did not get a new mandate.. for the last payment so its strange

crude bronze
#

give me a few minutes to look into this

#

using the same payment method
the two PaymentIntent you just shared are using different Payment Method.
one is pm_1QmtPNClnEzULH8aUe81M1ls, the other pm_1RCzFjClnEzULH8a7CoMogvn.

jovial flax
#

are you sure one was paid by bank transfer after failing..

crude bronze
jovial flax
#

pm_1RCzFjClnEzULH8a7CoMogvn but is this the bank transfer?

#

could i update pi_3R8u7rClnEzULH8a1GCQCA3y this to use bank transfer too? how do i see on the payment intent object that this failed because of mandate missing?

#

sorry those are the last questions i swear ๐Ÿ˜„

crude bronze
#

pm_1RCzFjClnEzULH8a7CoMogvn but is this the bank transfer?
yes

#

could i update pi_3R8u7rClnEzULH8a1GCQCA3y this to use bank transfer too?
you can try, but not sure if it will work or not

#

how do i see on the payment intent object that this failed because of mandate missing?
I'm not sure I understand this question

jovial flax
crude bronze
#

which PaymentIntent are you talking about?

jovial flax
#

pi_3R8u7rClnEzULH8a1GCQCA3y for example

crude bronze
#

you can see it in this request: https://dashboard.stripe.com/logs/req_FzQxnu2X1byPaQ

This PaymentIntent requires a mandate, but no existing mandate was found. Collect mandate acceptance from the customer and try again, providing acceptance data in the mandate_data parameter.

jovial flax
#

yes i know but there is no error on the payment intent itself.. i would have to go through the requests?

crude bronze
#

yes, you made a request and Stripe returned a 400 error.

jovial flax
neat sigilBOT
tawdry wyvern