#luftjunkie
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- luftjunkie, 2 hours ago, 24 messages
- luftjunkie, 7 hours ago, 15 messages
- luftie-missing-apikey, 6 days ago, 55 messages
Hello! What's up?
Hi, as I just said when I am invoking the function of creating the backend function in my react project I get an error in my firebase cloud functions console (because I work with firebase) of StripeInvalidRequestError: Your account cannot currently make live charges.
That's an issue with your account, which you need to contact Stripe support about: https://support.stripe.com/contact/email
Here is the function code js exports.createStripeCheckout=functions.https.onCall(async (req)=>{ try { const {price, quantity, customerCurrency, destinationId} = req; const createdCustomer = await stripe.customers.create({ name: req.customer.id, metadata: {...req.customer, customerCurrency}, }); const session = await stripe.checkout.sessions.create({ ui_mode: "embedded", mode: "payment", line_items: [{price, quantity}], customer: createdCustomer.id, invoice_creation: { enabled: true, }, return_url: "https://bookfreak.org", payment_method_configuration: "pmc_1OJMbVL8z1e5mvb6Z20IXHkG", payment_intent_data: { transfer_data: { destination: destinationId, }, }, }); console.log("Created Session:", session); return { clientSecret: session.client_secret, sessioned: session, error: null, }; } catch (error) { console.log(error); console.error("Error creating checkout session:", error.message); return {clientSecret: null, sessioned: null, error: error}; } });
Oh, ok.