#mattmikemo_webhook-endpoint-potential-bug

1 messages Β· Page 1 of 1 (latest)

grand flareBOT
#

πŸ‘‹ 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/1427755163078230169

πŸ“ 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.

lost apex
#

πŸ‘‹ Hello again, were you able to get ahold of an example event ID so we can take a closer look?

half rose
#

evt_1SGKTWGbBQBPGh6Is4m3y8Nz

lost apex
#

Do you also have an example code snippet of your Webhook endpoint

#

When we send an event to your Servers endpoing, we are expecting a 200 response back within a few seconds. If we don't get that response we consider that a failed delivery.

half rose
#

Let me get an example code snippet for you. Maybe it's an issue with how the code is set up since it was originally coded for an older api version?

lost apex
#

It looks like you have 5 Webhook endpoints set up on the account. 3 of them show they received that event and acknowledged receipt. 2 did not

#

Do you know the url of the endpoint that is having issues?

half rose
grand flareBOT
half rose
#

Here is a code snippet:

#
// Configure Stripe with your API key
if($TestData == true)
{
    \Stripe\Stripe::setApiKey('sk_test_...'); // test account
}
else
{
    \Stripe\Stripe::setApiKey('sk_live_...'); // Live account
}


$input = @file_get_contents("php://input");
$event_json = json_decode($input);
$type = '';

if($event_json->id !== "account.external_00000000000000")
{
    try
    {
        $event = \Stripe\Event::retrieve($event_json->id);
        $type = $event->type;
    }
    catch (Exception $e)
    {
        Logger::writeLog("No such event: " . $event_json->id);
    }
}

$internalReportEmail = "info@ez-360.com";
$internalReportEmailName = "EZ360 Key Manager";

// failed payment email
$failedPaymentSubject = "%productname% payment failed";
$failedPaymentBody = file_get_contents('data/failedPaymentEmailTemplate.html');

// failed payment internal email
$failedPaymentInternalSubject = "%productname% payment failed";
$failedPaymentInternalBody = "&description& payment failed. Customer details: %customername% %customeremail%";

// Key email
$keyEmailSubject = "Your %productname% key";
$keyEmailBody = file_get_contents('data/keyEmailTemplate.html');

// sale internal email
$saleInternalEmailSubject = "New %productname% purchase";
$saleInternalEmailBody = "%customername% (%customeremail%) just purchased %description%. Key: %key%";

// general sale internal email
$generalSaleInternalEmailSubject = "New Invoice payment";
$generalSaleInternalEmailBody = "%customername% (%customeremail%): %description%.";

// No keys email
$noKeysEmailSubject = "Problem with your %productname% key";
$noKeysEmailBody = file_get_contents('data/nokeyEmailTemplate.html');

// No keys internal email
$noKeysInternalEmailSubject = "%productname% key could not be generated!";
$noKeysInternalEmailBody = "Oculus store key generation for an %description% purchase failed. Customer details: %customername% %customeremail%";

Logger::writeLog("Stripe webhook call received: " . $type);
lone inlet
#

Hi there,
taking over for my colleague who had to step away.
Give me just a sec to catch up.

half rose
#

Okay, sounds good. Thanks

lone inlet
#

Ok, I am looking at your webhook URL and see that you have two endpoints configured with that URL, but both are currenlty 'disbaled'

half rose
#

Yes, The one on the older api version was the original that was setup but it kept failing so I thought creating a new one with the most up to date api version might fix the problem. It didn't. They both got disabled automatically by Stripe because they kept failing so much.

lone inlet
#

So you disabled both on prupose? Just making sure I understand correctly.

half rose
#

No I didn't. They got disabled automatically and then I just left them off to contact support because I knew the probelm would persist and they would just keep failing and get switched off again.

lone inlet
#

I see. Just trying to make sense of this. I currenlty can't see why or when they got disabled.

#

I can see in the creation request for (both) webhook endpoints, that the API version is 2025-09-11-16.internal which is explicitly set. Is there a reason why you set the API version to this?

half rose
#

I am not sure what that is. The one that was originally setup is 2025-08-27.basil

#

and the new one is 2025-09-30.clover

lone inlet
#

Yes, but the API request that we receive is set explicitly set to 2025-09-11-16.internal using a endpoint starting with /internal-graph-ql-dispatch/ which is not even a Stripe API endpoint.

half rose
#

If I send the code from the webhookhandler, can you help me identify which part of the code needs to be updated to get the webhooks working again? Theoretically, the only thing that would have needed to change when we switched the Stripe accounts is the keys, correct?

#

Hello?

lone inlet
#

Still looking into it

#

Did you create the webhook endpoint through the API or through the dashboard?

half rose
#

Through the dashboard

lone inlet
#

Ok, then I think this is a bug but unfortunately one where we here can't help with immediately. But you will receive a DM in a second about creating a support ticket which goes directly to my team. I can send this ticket then to the team that can further investigate and hopefully resolve quickly. Does that sound good?

half rose
#

Yes, that sounds good.

grand flareBOT
#

Hello @half rose, we have sent you a direct message, please check it at https://discord.com/channels/@me/1427776143821504593

  • πŸ”—The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
lone inlet
#

Alright, got your ticket. I will connect with the product team and keep you in the loop via email.

half rose
#

Thank you

#

Do you need anything else from me in the meantime?

lone inlet
#

Not at the moment. If I need anything I will reach out to you via email.

half rose
#

Thank you

lone inlet
#

no problem. You ok with me closing this thread then or is there anything else I can do for you?

half rose
#

You can close it, yeah.

lone inlet
#

Alright. Thank you! You'll hear from me as soon as get more information from the product team.

half rose
#

Okay, sounds good.