#geoff_sepadebit-mandate

1 messages ยท Page 1 of 1 (latest)

dire burrowBOT
#

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

mellow robin
#

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

night tide
#

when expanding this, the object always contains a null value

#

like in this request : req_zrV5NZjb8rWVF0

mellow robin
#

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

night tide
#

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

mellow robin
#

Ah okay but that PaymentMethod wasn't generated from anything right? Like you didn't use iDEAL first?

night tide
#

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

mellow robin
#

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

night tide
#

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 ?

mellow robin
#

I would store the Mandate in my database after the confirmation

night tide
#

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 !

mellow robin
#

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 ๐Ÿ˜ฆ

night tide
#

just out of curiosity. how can a paymentmethod get multiple mandate ?

mellow robin
#

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?

night tide
#

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 ๐Ÿ™‚

mellow robin
#

SEPA Debit is a lot easier