#fabulousray_webhooks

1 messages ยท Page 1 of 1 (latest)

haughty kestrelBOT
#

๐Ÿ‘‹ 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.

primal steppeBOT
#

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.

hardy coyote
#

Hello!

lusty gulch
#

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?

hardy coyote
#

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' };
}
};

lusty gulch
#

Taking a look

hardy coyote
#

such in my case thereby causing the perceived non-association?

lusty gulch
hardy coyote
#

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

lusty gulch
hardy coyote
#

oomph seems like extra work for me...

#

is there any other less complicated methods ?

lusty gulch
#

That is our low code method

hardy coyote
#

okay

#

is there a no code method?

lusty gulch
#

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.

hardy coyote
#

ooh

#

do you mind hanging in here if problems arise for the checkout session integration

lusty gulch
#

Sure!

hardy coyote
#

thanks!