#stan-trees_code

1 messages ¡ Page 1 of 1 (latest)

sullen prawnBOT
sudden sageBOT
#

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.

sullen prawnBOT
#

👋 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/1239989494397010041

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

winter nexus
#

Hello! Can you provide more information? Which docs did you look at? Which Stripe product(s) are you using? What are you trying to build?

dull iris
#

im looking at this right now but im not sure if this is the right part

#
const product = await stripe.products.create({
        name: 'My Product',
    });

    const price = await stripe.prices.create({
        product: product.id,
        unit_amount: amount*100, // $50.00
        currency: 'usd',
    });

    const session = await stripe.checkout.sessions.create({
        line_items: [
            {
                price: price.id,
                quantity: 1,
            },
        ],
        mode: 'payment',
        success_url: 'https://discord.gg/DphWdkkUcm',
        cancel_url: 'https://discord.gg/DphWdkkUcm',
        payment_method_types: ['card']
    })

    return session;``` heres my code currently and i want to be able to track when someone goes through with this session, then i want to save it
winter nexus
#

I think that's what you're looking for.

dull iris
#

i see

#

is it mandatory to run an express server? and use the stripe cli

winter nexus
#

The Stripe CLI is only for testing and development, but a web server is required to receive the Events, like checkout.session.completed, yes.

#

Can you tell me more about what you're trying to do?

dull iris
#

im trying to create a automated middleman system. essentially the buyer will go through with this link, and then afterwards i can send the seller the money (based on some details the seller provides) but i want there to be a period in between the buyer and seller that way the buyer can confirm receiving the product

#

and then the seller will be able to receive his payment

#

otherwise i'd refund the payment

#

right now im trying to figure out how to save the data from the buyer going through checkout, that way i can in the future send the payment to the seller

winter nexus
#

Yeah, you would need a server of some kind (doesn't need to be Express specifically though) to make that work. You would also need to use Connect: https://docs.stripe.com/connect

dull iris
#

what is connect?

winter nexus
#

Connect is how you route payments between multiple parties with Stripe, which is what you're describing.