#dudu-connection-issue

1 messages · Page 1 of 1 (latest)

brittle vectorBOT
ionic warren
indigo gyro
#

req_i3RbUVfh3RUrNu

#
import { NextResponse } from 'next/server'

const stripe = require('stripe')(process.env.STRIPE_SECRET)

export async function GET() {
  try {
    const session = await stripe.checkout.sessions.create({
      payment_method_types: ['card'],
      line_items: [
        {
          price: process.env.STRIPE_PRICE, // Substitua 'your_price_id' pelo ID real do plano de preços
          quantity: 1,
        },
      ],
      mode: 'subscription',
      subscription_data: {
        trial_period_days: 3, // Adicione esta linha para definir um período de avaliação gratuito de 3 dias
      },
      success_url: `https://rapidochat.com.br/`,
      cancel_url: `https://rapidochat.com.br/`,
    })

    return NextResponse.json({ url: session.url }, { status: 200 })
  } catch (error) {
    console.error('Error:', error)
  }
}

#

If you need my code

ionic warren
#

How often does this happen? When did you start seeing this?

indigo gyro
#

today

#

And the keys and the signature ID are right, I already checked

#

I updated the library and am redeploying it to check

#

Now it was just updating the library, thanks anyway!

brittle vectorBOT
ionic warren
#

Sure, glad it's resolved!

keen citrus
#

Looks like a network issue on your end/server/provider, likely worth chatting with their support team

#

dudu-connection-issue