#mulo_best-practices

1 messages ¡ Page 1 of 1 (latest)

hoary yachtBOT
cedar irisBOT
#

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.

hoary yachtBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1251113348926410832

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

opal musk
hoary yachtBOT
opal musk
#

this is Paypal for example

hoary yachtBOT
radiant vector
#

Hi

I am using just webhooks calls, so is there a template button I can copy?
What kind of button your looking for exactly ?

#

You are looking for implementing a Payment Form ?

opal musk
# radiant vector Have you had the chance to look at Stripe Express Checkout Buttons? <https://doc...

Yes these kind of pre-made uis, tho in my code I simply have:

    return (
        <div >

            <button  onClick={e => {
                fetch("https://my backend endpoint", {
                    method: "POST",
                    headers: {
                        "Content-Type": "application/json"
                      },
                      body: JSON.stringify({ guildId})
                })
                    .then(res => res.json())
                    .then(({ url }) => {
                        window.location = url
                    })
                    .catch(e => {
                        console.error(e.error)
                    })
            }}> Pay with Stripe </button>
        </div>

    );

Can I still use this simple fetch logic from the link you posted?

radiant vector
#

It will be something like this when using React for example

const onConfirm = async (event) => {
 // ...
}


<ExpressCheckoutElement onConfirm={onConfirm} />
opal musk
#

With all of this I'd need to recreate the whole logic with backend as well. So far I just make a call to the backend which returns the session/subscription page url, which is really straightforward.

radiant vector
#

Yes Stripe Checkout Session is a hosted/low code integration

opal musk
#

So I'd jsut need to copy a css stripe button

#

if there are any templates already made?

radiant vector
#

However this will embedded the Stripe Checkout into your page, not just a pay button.

hoary yachtBOT