#mulo_best-practices
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.
- mulo_webhooks, 1 day ago, 5 messages
- mulo_checkout-metadata, 3 days ago, 29 messages
đ 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.
this is Paypal for example
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 ?
Have you had the chance to look at Stripe Express Checkout Buttons?
https://docs.stripe.com/elements/express-checkout-element/accept-a-payment
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?
Yes you can refer to this section of the guide:
https://docs.stripe.com/elements/express-checkout-element/accept-a-payment#submit-the-payment
It will be something like this when using React for example
const onConfirm = async (event) => {
// ...
}
<ExpressCheckoutElement onConfirm={onConfirm} />
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.
Yes Stripe Checkout Session is a hosted/low code integration
Actually, You can keep use a simular integration using Embedded Checkout:
https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=embedded-form
However this will embedded the Stripe Checkout into your page, not just a pay button.