#dusk-_docs
1 messages ยท Page 1 of 1 (latest)
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.
- dusk-_docs, 6 hours ago, 52 messages
- dusk-_docs, 6 days ago, 29 messages
- dusk-_api, 6 days ago, 64 messages
๐ 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/1240334950075727912
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi!
@hard cloud please refer to my previous thread here
I was suggested to use PaymentLink but those require pre-emptive price fields
We just want to generate a payment link for the stripe accounts we created through stripe connect (for a non profit)
Basically it should act as a donation page where the non profit organization can put it on their website as an embedded component (and if that's not possible, as a hyperlink which leads to stripe).
But the main goal is that if someone who wishes to donate to the organization, opens that page and is able to donate any amount they wish
Hello! What you're describing is possible and should work fine; can you tell me specifically where you're getting stuck?
https://docs.stripe.com/api/payment_links/payment_links/create
Line items are required and so is the price field
Aha, I think that's just the Price object id
and not a number
stripe.Price.create(
currency="usd",
custom_unit_amount={"enabled": True},
product='{{PRODUCT_ID}}',
)
Is the product field required?
And, could we just do something like, create a single Price object, and then for each non profit we onboard, we create a payment link for them and associate it with the same price object that allows any price to be inputted
No, Payment Links aren't embeddable. They're regular links that point to a Stripe-hosted payment page.
Is there any alternative that could allow the non-profit to embed a donations page / component?
Technically speaking, if it's a url, and you add use an iframe html tag and use that link as source, would it not behave or is there certain CORS policy blocking it from working properly
Yeah, you can use embedded Checkout instead.
Payment Links won't work in an iframe.
And would it allow for custom donation amounts?
Thank you
Is there a good way to continue from this Discord thread later? Or should I just create a new one in the future and paste the link
We close threads once they're idle. If you have a new question after that you can create a new thread. ๐
Okay
A little off-topic question haha. How do the Stripe mods here always find the doc links so quick?
We just know the docs really well because we use them a lot. ๐
Happy to help! ๐
@hard cloud
We are using the Stripe embeddable component for Stripe Connect Account Onboarding.
The implementation detail may not be relevant but mentioning it here just in case. Our Flutter frontend sends a GET req to the backend to get an HTML response for the embeddable component. Then the fetchClientSecret within the html fetches the client secret for their account session from our backend and finally renders the UI.
I mentioned this in my previous thread as well. What we'd like is that as soon as the user finishes the onboarding, we'd like to hide the iframed embeddable component and change the URL. The other moderator answered my question and said that Stripe has webhooks we would listen to, but the issue with that is it makes things difficult as now our server would have to ping our frontend to notify that the user finished onboarding. [Link to that message](#1240214874265747527 message)
My question is, can we listen to such an event within the iframe? I am able to listen to the html events through the Flutter app, so if the event is thrown within the embedded html as well, it should make it very very easy for us to change the frontend UI
Sorry, rewrite, does the html code for stripe connect throw any events?*
Note that embedded components aren't designed to be used inside a Flutter app, and may not work as expected.
That said, after you create the Account Onboarding embedded component you should be able to use .setOnExit() to add a handler for when the user exits the onboarding flow. You can do whatever you want in that handler. See here for details/example code: https://docs.stripe.com/connect/supported-embedded-components/account-onboarding#create-an-account-session
Got it. Then I can just throw an event manually and render the html
You can do whatever you want in the handler, yeah.
Regarding this
Note that embedded components aren't designed to be used inside a Flutter app, and may not work as expected.
Can I ask why? It's embeddable so it should behave the same way as it would in any other web app. Are there any known issues?
Okay,
They're designed to be embedded on web pages, not inside a Flutter app's web view.
Embedded components will sometimes try to open a new tab/window, especially during onboarding, and depend on features web browsers have to authenticate users and maintain sessions. They are unlikely to work as expected in a Flutter web view.
I remember seeing a config that allowed us to choose between dialog / drawer. I assumed that if we chose drawer, it wouldn't open pop ups
Sorry, I can't find the relevant doc atm
Onboarding can usually be handled entirely inside the embdedded component, but not always.
Okay. So far during development, it has worked fine
Can I ask you about the dialog / drawer field
Aha found it
const stripeConnectInstance = StripeConnect.init({
publishableKey: publicKey,
fetchClientSecret: fetchClientSecret,
appearance: {
overlays: "dialog",
variables: {
colorPrimary: "#bec0ff",
},
},
});
It doesn't specify what it does
It's a visual difference. One is a centered dialog, the other is a drawer that comes from the side. Give both a try to see the difference (although on mobile, with a small screen, I think the difference will be minimal).
Got it
Will Stripe always confirm the phone number through sms verification during accounting onboarding?
We did not face any issues but just that when the onboarding process began (clicking on the initial button), it always opens a new window for phone number verificaton. While it worked fine and updated the iframe in the Flutter app, I wanted to ask if we could override some config to show that verification ui within the iframe?
I can't speak to what Stripe will or will not always do during onboarding, that's something you would need to ask Stripe support: https://support.stripe.com/contact/email
As far as I know there's no way to show that verification UI inside the iframe.
Okay
Would it be 1. possible 2. if so, a bad idea to use a stack and just overlay the phone verification UI on top of the previous iframe as another iframe
I wouldn't recommend it.
Okay
To be clear, I would not recommend trying to do any of this inside your Flutter app at all. You should kick out to the web browser on the device for onboarding, then redirect back to your app at the end.