#dudu-connection-issue
1 messages · Page 1 of 1 (latest)
Hi, can you share the request id where you're seeing this error? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
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
How often does this happen? When did you start seeing this?
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!
Sure, glad it's resolved!