One instance of Stripe Checkout works, the other gives a Preflight response code of 403

Advertisements I am implementing another instance of the Checkout Session in my app. In my donations controller, the following create action works fine: def create @donation = Donation.create(create_params) if @donation.save if Rails.env.development? success_url = "http://localhost:3000/donations_success?session_id={CHECKOUT_SESSION_ID}" cancel_url = "http://localhost:3000/" elsif Rails.env.production? success_url = "https://www.dbsan.org/donations_success?session_id={CHECKOUT_SESSION_ID}" cancel_url = "https://www.dbsan.org/" end data = { line_items: [{ price_data: { currency:… Read More One instance of Stripe Checkout works, the other gives a Preflight response code of 403

Can I add a custom Id to Session::create so I can retrieve it in a webhook?

Advertisements Basically, following the stripe docs, you create a checkout session $checkout_session = \Stripe\Checkout\Session::create([ ‘line_items’ => [[ ‘price’ => $prices->data[0]->id, ‘quantity’ => 1, ]], ‘mode’ => ‘subscription’, ‘success_url’ => $YOUR_DOMAIN . ‘/success.html?session_id={CHECKOUT_SESSION_ID}’, ‘cancel_url’ => $YOUR_DOMAIN . ‘/cancel.html’, ]); The user gets redirected to stripe, completes the transaction, gets redirected back to the website, and the… Read More Can I add a custom Id to Session::create so I can retrieve it in a webhook?

In Stripe, best practice for re-activating a canceled subscription

Advertisements Stripe subscription best practice for cancel and reactivate model – my question is similar to this question from 6 years ago that unfortunately went unanswered. Stripe makes it pretty clear in their docs that cancelled subscriptions cannot be restarted. However, we’d like users to be able to cancel and renew their subscription. Is the… Read More In Stripe, best practice for re-activating a canceled subscription

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?