#geoff_sepadebit-mandate
1 messages ยท Page 1 of 1 (latest)
๐ 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/1281359720065663077
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- geoff_api, 23 hours ago, 23 messages
I have attempted to expand sepa_debit.generated_from.setup_attempt.
that should work. So what isn't working, what are you seeing exactly?
geoff_sepadebit-mandate
when expanding this, the object always contains a null value
like in this request : req_zrV5NZjb8rWVF0
what does "the object always contains a null value"? Can I ask you to be a lot more descriptive.
Sadly we don't store the raw JSON response for those requests so I can't see what you see
the doc says it should contain a id to the setup_attempt used to create the payment_method
i always get null instead
here is the payload of the response
{
"id": "pm_1PvP63EfR5bA8zIhI6rWay9u",
"object": "payment_method",
"allow_redisplay": "unspecified",
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": "quatorze@quatorze.fr",
"name": "aze",
"phone": null
},
"created": 1725478951,
"customer": "cus_PyKZBCk2OrCoD2",
"livemode": false,
"metadata": {},
"sepa_debit": {
"bank_code": "20041",
"branch_code": "01005",
"country": "FR",
"fingerprint": "N9sfUUXwX5phLID3",
"generated_from": {
"charge": null,
"setup_attempt": null
},
"last4": "2606"
},
"type": "sepa_debit"
}
Ah okay but that PaymentMethod wasn't generated from anything right? Like you didn't use iDEAL first?
i created it using stripe element
i just created a basic setup_intent, passed the iban value using element from stripe-js and confirmed the setup_intent
i'm still using this in test_mode by the way
yep it all works the same. Okay so when you create the SetupIntent and it was confirmed, after that step you can find the Mandate mandate_123 on the SetupAttempt associated with it.
You can't do this through the PaymentMethod itself
yea that's what i found out
there isn't any other way to get to the mandate using only the paymentmethod ?
i need to save the setup_attempt id used to create the paymentmethod in order to get to the mandate ?
I would store the Mandate in my database after the confirmation
it used to be easier to access the mandate using the source api, since it came with the source object ๐ฆ
anyway, i think ill need to update my database scheme then ๐
thank you for your time !
yeah the issue is that one PaymentMethod can have multiple separate Mandates which the Sources API didn't support at the time
But I agree it makes things clumsy ๐ฆ
just out of curiosity. how can a paymentmethod get multiple mandate ?
I just paid you for a 20โฌ/month subscription. Tomorrow I come back and I sign up for a $200โฌ/year Subscription. You use the same PaymentMethod object pm_12345 this time to avoid asking me to enter my bank account details again, but as you do you might want a separate Mandate proving/tracking what I agreed to in terms of debits.
For SEPA Debit it's less important but for example ACSS Debit in Canada comes with extremely strict debit rules/regulations where I can agree to be debited on the 1st of each month and it's forbidden to debit me on the 5th if you want. So for each Subscription/recurring payment set up you end up having to track a different Mandate that maps to the real underlying agreement
Does that make sense?
yes, very clear. i didn't even know you could have this level of setting for payment mean in canada
i guess you had to make an api that would fit different rules worldwide
its interesting
anyway, thank you for your time ๐
yeah if you are curious you can look at https://docs.stripe.com/api/setup_intents/create#create_setup_intent-payment_method_options-acss_debit-mandate_options which shows the parameters specific to ACSS Debit. And those are required when you create a new Mandate (which makes that payment method near impossible to integrate quickly lol)
SEPA Debit is a lot easier