#sajomi-checkout-failure

1 messages · Page 1 of 1 (latest)

lofty hamletBOT
graceful dragon
#

It could be a lot of things - have you checked your dashboard logs to see if there are any failing requests?

inland lava
#

dont have anything in dashboard logs maybe if i paste my code you will know where can be the problem it is very simple

export class StripeService {

private stripeAPIKey = 'XXXXXX';

constructor(private http: HttpClient) {}

createCheckoutSession(price: number): Observable<any> {
return this.http.post<any>('https://api.stripe.com/v1/checkout/sessions', {
payment_method_types: ['card'],
line_items: [
{
price_data: {
currency: 'usd',
product_data: {
name: 'My Product',
},
unit_amount: 4545,
},
quantity: 1,
},
],
mode: 'payment',
success_url: 'http://localhost:4200/dashboard',
cancel_url: 'http://localhost:4200/dashboard',
}, {
headers: {
'Content-Type': 'application/json',
'Authorization': Bearer ${this.stripeAPIKey},
},
});
}
}

#

and i go step by step by tutorial you have on page

graceful dragon
#

Can you give an example successful request ID from your logs so I can look closer?

inland lava
#

like this is first run i dont have any succesfull data a just want to run it for the first time

graceful dragon
#

I see - and you don't see anything in your server logs at all?

inland lava
#

im using firebase so i dont have explicitly a server

graceful dragon
#

Even with firebase you should still have access to logs

inland lava
#

sorry dont see it

graceful dragon
#

Okay how about this - can you share your account ID (acct_123)

inland lava
#

like in stripe ?

#

where can i find it

graceful dragon
inland lava
#

acct_1N8KkBH0KQjNf616

#

please dont close the thread if i dont write i just have a call i ll be back in 30 min

graceful dragon
#

I took a look and I'm actually seeing successful Checkout Session creation happening on your account

lofty hamletBOT