Forum Academy Marketplace Showcase Pricing Features

Scheduled custom event doesn't run after Stripe Charge

I’ve seen some cases now where a scheduled custom event doesn’t run after a Stripe charge.
It doesn’t happen every time, but I have a feeling it happens after the Stripe charge has been completed on mobile devices.
The workflow is like this:
A) Charge a user
B) Make changes to a thing
C) Schedule custom event (0 sec after)
D) Go to page

Step A,B,D works like normal, but the custom event doesn’t trigger.
There are no conditional statements on the workflow or actions.

@emmanuel have you had other reports about this ?

I already had several not-runned actions after a Stripe’s charge. To be sure you don’t miss any one, I’d advice anyone to create a “Stripe_Charge” object from yan API endpoint triggered by charge.created (webhook) so you’re sure every Stripe_Charge is linked to a Transaction you created before the charge action.

Interesting. Do you know if it has only occured on mobile devices?

Yeah that’s what we do as well for our own app.

@pnodseth did you check Stripe’s logs? They can show the response from the webhooks

I think this is actually a bug, filing a bug report now.

I created a workflow with the following:

  1. Stripe charge
  2. Send email
  3. Schedule a custom event (0 sec after) - The custom event also sends an email
    4)Send email

When running the workflow on a laptop, I recieve all 3 emails.
When running it from mobile, I recieve only the email before and after the triggered custom event.

Sounds like a good idea. I may be way out in left field on how to implement that, but I’ll take a random shot.

I would create an API Endpoint in my app, called “Stripe_Charge”
This endpoint would have an Action “Make Changes to My App Receipt”, and the change would be something that acknowledges the API workflow ran

Then in the workflow with the Transaction, in the last Action, I Schedule the Workflow “Stripe_charge” to run Only When Result of Step 1’s (the Stripe charge) charge_id is not empty?

I am probably off somewhere, as I am unsure how to take a charge.created (webhook) and trigger an action based off it?

And then to track these and know when to take action, do you have a List of Transactions that have processed without that last API workflow having run?

Hi,
From your webhook you get the Charge ID. You create a unique StripeCharge object for each Charge ID.
Then you make a Do a search for Transaction which get the Charge ID as a Result of the charge action.
If you have one Transaction for each StripeCharge, you’re good.
Does it help ?

Got it, thanks!

So if I’m understanding you correctly;
All the things you want updated after a successful charge, you trigger from the charge.created webhook?
Let’s say I have a customer paying for a booking. When the charge is successful, the charge.created webhook triggers an API endpoint which searches for the booking with the same charge ID, and then updates the necessary fields?

Perfectly, this is what I do.
If the original transaction is not found I send myself an alert

Clever! I’ve set it up this way now, so that the endpoint is triggered from the charge.successful webhook.
But, something really weird is happening :slight_smile:
Seems like the endpoint is being triggered several times every minute, and has been for the last 16 hours or so.Wish that was all successful transactions :stuck_out_tongue:
There’s something triggering the endpoint, and I have no idea what it is.
So I now have an INSANE amount of scheduled workflows waiting to be deleted, haha.
I cannot see anything about it in the stripe logs. Do you know what might make it behave this way?

Update: I deleted the endpoint URL from Stripe, and it has stopped, it seems.
Trying to re-add it, let’s see what happens…

This topic was automatically closed after 14 days. New replies are no longer allowed.