#sc0rp10npy_code

1 messages ¡ Page 1 of 1 (latest)

muted kiteBOT
plucky coyoteBOT
#

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.

muted kiteBOT
#

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

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

keen egret
#

its in reference to this

#

so i did this

the code is this

the output i get is this

{
    "id": "seti_1PpxRLJ8kO80VBO8xBNStkXc",
    "object": "setup_intent",
    "automatic_payment_methods": null,
    "cancellation_reason": null,
    "client_secret": "seti_1PpxRLJ8kO80VBO8xBNStkXc_secret_QhM91gKk97sCYNHYrb1hH6BVoB8v9vG",
    "created": 1724180999,
    "description": null,
    "last_setup_error": null,
    "livemode": false,
    "next_action": null,
    "payment_method": "pm_1PpxS6J8kO80VBO88LhYuTWh",
    "payment_method_configuration_details": null,
    "payment_method_types": [
        "card"
    ],
    "status": "succeeded",
    "usage": "off_session"
}
#

the api

wispy gorge
#

"payment_method": "pm_1PpxS6J8kO80VBO88LhYuTWh" is the tokenized payment method token

keen egret
#

so next time to charge user i have to use this id?

wispy gorge
#

Yes

keen egret
#

also how can I style the UI of card a little?

#

its all very blank

wispy gorge
keen egret
#

ahh

#

also

import Stripe from 'stripe';

const stripe = new Stripe(process.env.STRIPE_SECRET_KEY);

export default async function handler(req, res) {
    if (req.method === 'POST') {
        try {
            const setupIntent = await stripe.setupIntents.create({
                payment_method_types: ['card'],
                customer: '',
                usage: 'off_session',
                
            });

            res.status(200).json({ clientSecret: setupIntent.client_secret });
        } catch (err) {
            res.status(500).json({ error: err.message });
        }
    } else {
        res.status(405).end('Method Not Allowed');
    }
}

where can I get the list of parameter option i have in here?

wispy gorge
#

What do you mean by list of parameter option?

keen egret
#

for this part
const setupIntent = await stripe.setupIntents.create({
payment_method_types: ['card'],
customer: '',
usage: 'off_session',

        });
#

what all parameters/attributes are there in .create?

wispy gorge
keen egret
#

ah thanks

keen egret
wispy gorge
#

Not that I know of, no..

keen egret
#

is it possible to add borders to this? its not mentioned

wispy gorge
#

Border to what? If you mean around the card element, then you can add a border to the parent element where you're mounting the card element

keen egret
#

is it possible to make it look like this?

#

owner is not required from above image

#

because rn it doesn't look like a very legit type form

wispy gorge
keen egret
#

i am implementing using prebuilt page now, i just found the option in url