#corwin_best-practices
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/1422309617249292490
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello, can you tell me a bit more about what specifically you are trying to figure out here? Are you running into issues setting up recurring payments with iDEAL SEPA? Or are you mostly looking for info on that PMs support subscriptions?
Currently using this:
$latestAttempt = $setupIntent->latest_attempt;
// Check if the payment method was converted to another type
if ($latestAttempt && isset($latestAttempt->payment_method_details)) {
$details = $latestAttempt->payment_method_details;
// Handle iDEAL -> SEPA conversion
if (isset($details->ideal->generated_sepa_debit)) {
return $this->request('get', '/payment_methods/' . $details->ideal->generated_sepa_debit);
}
// Handle Bancontact -> SEPA conversion
if (isset($details->bancontact->generated_sepa_debit)) {
return $this->request('get', '/payment_methods/' . $details->bancontact->generated_sepa_debit);
}
// Handle SOFORT -> SEPA conversion
if (isset($details->sofort->generated_sepa_debit)) {
return $this->request('get', '/payment_methods/' . $details->sofort->generated_sepa_debit);
}
// Handle Giropay -> SEPA conversion
if (isset($details->giropay->generated_sepa_debit)) {
return $this->request('get', '/payment_methods/' . $details->giropay->generated_sepa_debit);
}
// Handle EPS -> SEPA conversion
if (isset($details->eps->generated_sepa_debit)) {
return $this->request('get', '/payment_methods/' . $details->eps->generated_sepa_debit);
}
}
// If no conversion, use the original payment method
return $this->request('get', '/payment_methods/' . $setupIntent->payment_method);
}
So this is my current setup, is this the correct way/
In short, wondering how to handle payment methods that transition into a different one
It looks like iDEAL, Bancontact, and Sofort can generate a SEPA debit payment method like that, but Giropay and EPS can't. We document what fields exist here in our API reference and we document whether PMs support subscriptions in this section of our docs:
https://docs.stripe.com/payments/bank-redirects
But yes that code overall makes sense if you are using PM types that might generate a sepa PM for recurring payments.
Okay, are iDeal, BanContact and Sofort the only ones that transition into a different type?
I'm not immediately aware of others that do, I think here you will want to check the Stripe doc page for each PM before you enable it for subscriptions.
Problem is that its opensource software ๐
Different question, how can I get a display name from stripe? Or do I need to smash it together myself
Talking about these names
The PaymentMethod object that represents the PM has a type proprety that has the PM type and then a sub-object named after the type with info on the specific PM. So card PMs will have display_brand and last4
https://docs.stripe.com/api/payment_methods/object?api-version=2025-05-28.basil#payment_method_object-card-display_brand
https://docs.stripe.com/api/payment_methods/object?api-version=2025-05-28.basil#payment_method_object-card-last4
And SEPA has last4 as well
https://docs.stripe.com/api/payment_methods/object?api-version=2025-05-28.basil#payment_method_object-sepa_debit-last4