#fabulousray_webhooks
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1276166480781639752
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- fabulousray_code, 4 hours ago, 50 messages
- fabulousray_webhooks, 2 days ago, 12 messages
Hello!
Hi, can you say more please? Which customer id were you expecting and what customer id are you getting? Also, have you been able to reproduce this issue reliably?
When did the issue start?
the issue started just then
i tested on cli
it works on cli
this is on deployment
how does payment link associate the customer id?
i was expecting the payment link to reference to the customer id of the logged in user of my application
however it is cus_Qi0dWouM93A30Z (im getting)
expecting:cus_QhxUlO9jJbZ7Is
i dont know how to test reliably other than manual testing
here is a function that updates usersubscriptionstatus in my application that leads to user not found since stripe customer id is not the same:
const updateUserSubscriptionStatus = async function (stripeCustomerId, newStatus) {
if (!stripeCustomerId || !newStatus) {
return { success: false, error: 'stripeCustomerId and newStatus are required' };
}
try {
const user = await User.findOneAndUpdate(
{ stripeCustomerId },
{ subscriptionStatus: newStatus },
{ new: true, runValidators: true },
).lean();
if (!user) {
return { success: false, error: 'User not found' };
}
return { success: true };
} catch (error) {
console.error('Error updating subscription status:', error);
return { success: false, error: error.message || 'An unknown error occurred' };
}
};
Taking a look
https://stackoverflow.com/questions/74117183/stripe-payment-links-with-customer-id i took a look at this thread, is it true that payment links would not associated to specific customer id
such in my case thereby causing the perceived non-association?
That is correct. PaymentLinks allows you to share one link to accept a payment so there is not a way to pass a customer. If you need to pass a customer, https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-customer when creating a payment, you would want to use Checkout Instead.
in terms of my integration what would would be best would you say?
if it were to minimise code to nearly as much as payment link for checkout
I would recommend this, https://docs.stripe.com/checkout/quickstart.
oomph seems like extra work for me...
is there any other less complicated methods ?
That is our low code method
That is correct. The only no-code solution is PaymentLinks. However, you're wanting to pass a customer id which does not work like that.
ooh
do you mind hanging in here if problems arise for the checkout session integration
Sure!
thanks!