#sajomi-checkout-failure
1 messages · Page 1 of 1 (latest)
It could be a lot of things - have you checked your dashboard logs to see if there are any failing requests?
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
Can you give an example successful request ID from your logs so I can look closer?
like this is first run i dont have any succesfull data a just want to run it for the first time
I see - and you don't see anything in your server logs at all?
im using firebase so i dont have explicitly a server
Even with firebase you should still have access to logs
sorry dont see it
Okay how about this - can you share your account ID (acct_123)
You can find that here https://dashboard.stripe.com/settings/account
acct_1N8KkBH0KQjNf616
please dont close the thread if i dont write i just have a call i ll be back in 30 min
I took a look and I'm actually seeing successful Checkout Session creation happening on your account