#sam-taylor_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฑ๏ธ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime!
๐ 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/1212122824836120659
๐ Have more to share? You can add more detail below, including code, screenshots, videos, etc.
โฒ๏ธ 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. Thank you for your patience!
Hello! Creating the Checkout Session on behalf of the connected account is the correct approach when it comes to getting their branding to appear. It looks like the error you're getting indicates SEPA isn't enabled for the connected account in question. Do you have SEPA enabled in your settings here? https://dashboard.stripe.com/settings/payment_methods/connected_accounts
Hi Rubeus, I do have SEPA enabled. The weird thing is that the SEPA setup and payments work fine until I try to add the custom branding that's added to the connect account.
example of my current successful request:
stripe.checkout.Session.create(customer='cus_***', payment_method_types=['sepa_debit'], mode='setup', success_url='https://success.com/', cancel_url='https://cancel.com/')
๐ taking over as Rubeus needs to step away
Give me a couple minutes to look
Do you have a request ID for the successful request? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Yep: req_4DraQTlSaN0NJp
Thanks, also how are you verifying that SEPA is enabled on the connected account?
The Checkout Session request you shared, creates SEPA payment on the platform account where platform's payment method configuration is used.
When you use on_behalf_of parameter, it checks SEPA capability on the connected account
The account I am testing with is one of our own accounts so I've logged into the dashboard dashboard.stripe.com/connect/accounts/<account id>/settings/payment_methods to confirm. In this case I have SEPA on, Card on and other payment methods off
Interesting..
Can you try retrieving the account with the API and share the response?
https://docs.stripe.com/api/accounts/retrieve
Sure
thanks. going to try and see if I can reproduce this
Typically, if SEPA is enabled then you'd see it under capabilities parameter
like
{
card_payments: "active",
sepa_debit_payments: "active",
transfers:"active"
}
Am I able to enable it through the API? I might enable them via the API to see if the behaviour is the same
Yes you can request a new capability using the API
https://docs.stripe.com/api/capabilities/update
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
For my test, I requested it when I created a test account
card_payments: { requested: true },
transfers: { requested: true },
sepa_debit_payments: { requested: true }
}```
And yeah I tested it with a checkout session too.
It does show connected account branding information on the checkout page
Nice that worked! Weird that we had been able to take SEPA payments and that they were shown as enabled in the dashboard but from now on we can just programatically update / create the capabilities.
I was also wondering if it's possible to remove custom branding from a connect account and revert to the default platform branding? Any combination of empty or null values when sending the request seem to be filtered out by the SDK and no changes are made
I was going to suggest sending "" (empty quotes)
have you tried that out?
Unfortunately I get an error: stripe.error.InvalidRequestError: Request req_SwzsHgbR8GsBBW: You passed an empty string for 'settings[branding][primary_color]'. We assume empty values are an attempt to unset a parameter; however 'settings[branding][primary_color]' cannot be unset. You should remove 'settings[branding][primary_color]' from your request or supply a non-empty value. This is not really a problem right now since it is very unlikely that one of our customers would want to revert to our branding after applying their own so not to worry!
Thanks you for the help ๐