I've already installed micro-cors, and when I attempted to build, I got the following result

Advertisements I encountered the following issue while constructing the Next.js Stripe project and I apologize. ./src/pages/api/webhooks.ts:3:18 Type error: Could not find a declaration file for module ‘micro-cors’. ‘E:/Project/longlifecoin/node_modules/micro-cors/lib/index.js’ implicitly has an ‘any’ type. 1 | import Stripe from ‘stripe’; 2 | import { buffer } from ‘micro’; > 3 | import Cors from ‘micro-cors’; I… Read More I've already installed micro-cors, and when I attempted to build, I got the following result

Setting browser cookies after triggering a stripe webhook handler

Advertisements I’ve no backend experience background and I wanted to know if it’s possible to set the browser cookies of the customer after he/she fulfills a payment procedure and stripe triggers the checkout session completed event. I’m using NextJs framework and I implemented an API webhook endpoint to listen to that event for some other… Read More Setting browser cookies after triggering a stripe webhook handler

Stripe API documentation commands returning errors

Advertisements I am reading Stripe’s api documentation and trying out the curl commands (https://stripe.com/docs/api/customers/update). I created an account with Stripe and am running the commands in the test mode using my secret_key. I get the error below when I run the command. `curl https://api.stripe.com/v1/customers/cus_NC2tFwyzx3A4mM \ -u sk_test_my_test_key: \ -d "metadata[order_id]"=6735 ` { "error": { "code":… Read More Stripe API documentation commands returning errors

How to make the Stripe payment sheet for iOS in Flutter barrierDismissible: false?

Advertisements I am using Stripe for iOS in my Flutter app and I want to disable the ability for the user to dismiss the payment sheet by tapping outside of it. Currently, when the user taps outside of the payment sheet, I am receiving an error from Stripe. I know that the barrierDismissible option is… Read More How to make the Stripe payment sheet for iOS in Flutter barrierDismissible: false?

How to make the Stripe payment sheet for iOS in Flutter barrierDismissible: false?

Advertisements I am using Stripe for iOS in my Flutter app and I want to disable the ability for the user to dismiss the payment sheet by tapping outside of it. Currently, when the user taps outside of the payment sheet, I am receiving an error from Stripe. I know that the barrierDismissible option is… Read More How to make the Stripe payment sheet for iOS in Flutter barrierDismissible: false?

How to add payment description during stripe checkout

Advertisements I was wondering how to add the payment description at the stripe checkout session, so that when I export the payment details into an excel file at the stripe dashboard, it will be easier for me to filter the payment data. Code for stripe checkout session <?php session_start(); require ‘vendor/autoload.php’; include("conn_db.php"); $total_amount = $_POST["total-amount"];… Read More How to add payment description during stripe checkout

Is it important to hide Stripe secret key in Javascript?

Advertisements I would like to know if it’s important to hide my stripe key in my javascript. In fact, in my Symfony website, I put this key in my javascript to allow users to pay their orders. And this is how I made that: </footer> </body> <script src="https://kit.fontawesome.com/47f28c9d14.js&quot; crossorigin="anonymous"></script> <script type="text/javascript"> var stripe = Stripe("pk_live_….");… Read More Is it important to hide Stripe secret key in Javascript?

How can I send user data to stripe checkout

Advertisements I’m currently creating a checkout page for my users. The users click on a button on the frontend whilst logged into their account. The checkout session. let stripe = null onMounted(async () => { stripe = await loadStripe(import.meta.env.VITE_STRIPE_KEY) }) function buyTrialLesson() { stripe.redirectToCheckout({ successUrl: "xxxx", cancelUrl: "xxx", lineItems: [{ price: "price_xxxxxxxxxxxxxx", quantity: 1, }],… Read More How can I send user data to stripe checkout

API router doesn't read Stripe API key stored in .env file

Advertisements I made an .env file and put my stripe key in there. then in backend API/router, i simply imported that key to work with it. I made a checkout request but i’m still getting this error in console.dev tab: POST http://localhost:5000/api/checkout/payment 500 (Internal Server Error) Also, in network tab, the payment responses with header… Read More API router doesn't read Stripe API key stored in .env file