You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed the instructions on how to set up and intigrate the extension with my firebase instance. I was able to add the product and see it being created in the firebase database which tells me the integration was successful. However when I make a request to create a check out session I get the following error:
No such customer: 'cus_PaXYUcDLJWD3Lo
What's odd is that I dont see any customer created on the stripe dashboard so I'm not even sure how it knows about his customer id.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Below is my code, I've set up a controller that returns the url via a rest request:
import { Users } from '../firebase.js';
export const createCheckoutUrl = async ({ userId, priceId, successUrl, cancelUrl }) => {
return new Promise((resolve, reject) => {
Users.doc(userId) // Use the provided userId instead of currentUser.uid
.collection('checkout_sessions')
.add({
price: priceId,
success_url: successUrl,
cancel_url: cancelUrl,
})
.then((docRef) => {
// Wait for the CheckoutSession to get attached by the extension
const checkoutSessionListener = docRef.onSnapshot((snap) => {
const { error, url } = snap.data();
if (error) {
// Show an error to your customer and
// inspect your Cloud Function logs in the Firebase console.
console.log(`An error occurred: ${error.message}`);
reject(new Error(`An error occurred: ${error.message}`));
}
if (url) {
console.log('url ==>', url);
// Resolve the promise with the URL if available
resolve(url);
// Stop listening to further changes
checkoutSessionListener();
}
});
})
.catch((error) => {
// Handle any errors occurred during the process
console.log(error);
reject(error);
});
});
};
Expected behavior
I expect to get the url from the created session
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
I was successfully able to get sessions using the official stripe extension.
The text was updated successfully, but these errors were encountered:
Bug report
firestore-stripe-payments
Describe the bug
I followed the instructions on how to set up and intigrate the extension with my firebase instance. I was able to add the product and see it being created in the firebase database which tells me the integration was successful. However when I make a request to create a check out session I get the following error:
No such customer: 'cus_PaXYUcDLJWD3Lo
What's odd is that I dont see any customer created on the stripe dashboard so I'm not even sure how it knows about his customer id.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Below is my code, I've set up a controller that returns the url via a rest request:
Expected behavior
I expect to get the url from the created session
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
I was successfully able to get sessions using the official stripe extension.
The text was updated successfully, but these errors were encountered: