Hi Max,
I've got my form "talking" to Stripe but the info is not getting back to the database from Stripe. Checkout.session.completed has a response of HTTP status code 200. But underneath that is "no data".
I've included 2 attachments
Let me know if there are other things I may provide to help.
Thanks!
Hi PVMA
Enable all the events in the Stripe Listener and add an Email action under each one with a different email content, check which one you get
Also add an Email above the listener and check if you get this one when Stripe sends the notification ?
Hi Max,
Attached is a screenshot showing my added emails. I received none when I tested.
Stripe Event Deliveries shows:
Response HTTP status code 200 No data
Request:
{ "id": "evt_3Sc7RqEsL1VfepCq0GbWuQND", "object": "event", "api_version": "2024-06-20", "created": 1765211888, "data": { "object": { "id": "pi_3Sc7RqEsL1VfepCq06YNHzsU", "object": "payment_intent", "amount": 15000, "amount_capturable": 0, "amount_details": { "shipping": { "amount": 0, "from_postal_code": null, "to_postal_code": null }, "tax": { "total_tax_amount": 0 }, "tip": {} }, "amount_received": 15000, "application": null, "application_fee_amount": null, "automatic_payment_methods": null, "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic_async", "client_secret": "pi_3Sc7RqEsL1VfepCq06YNHzsU_secret_ZMq2SWIspam5rcyuDiyrSNHy9", "confirmation_method": "automatic", "created": 1765211886, "currency": "usd", "customer": null, "customer_account": null, "description": "Show Payments", "excluded_payment_method_types": null, "invoice": null, "last_payment_error": null, "latest_charge": "py_3Sc7RqEsL1VfepCq0ufu8sQJ", "livemode": false, "metadata": { "custom_id": "392f8cea-619f-42e5-8174-6b36636ebc6b" }, "next_action": null, "on_behalf_of": null, "payment_details": { "customer_reference": null, "order_reference": "prod_TY8AnKFty4NPUK" }, "payment_method": "pm_1Sc7RqEsL1VfepCqCPxMkzd0", "payment_method_configuration_details": null, "payment_method_options": { "link": { "persistent_token": null } }, "payment_method_types": [ "link" ], "processing": null, "receipt_email": null, "review": null, "setup_future_usage": null, "shipping": null, "source": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "succeeded", "transfer_data": null, "transfer_group": null } }, "livemode": false, "pending_webhooks": 0, "request": { "id": null, "idempotency_key": "9a2cea5f-674a-44d3-85b5-feaef46d06e9" }, "type": "payment_intent.succeeded"}
Can you access this web page directly in your browser's address bar ? try that and make sure you get the first email
I did not get any email via the web hook url.
In fact now I find I'm not getting any emails from other, known good forms. This is a new staging site, recently moved to a new server on Digital Ocean. I've set up email to send via SMTP through a gmail account. I tested this in the backend and emails are being sent from the website. But just not from any Chronoforms. The old server was sending emails via PHP. Not sure if that makes any difference.
So now I have two issues. Email is not sending, and Stripe information is not getting received. Are they inter-related?
I also am wondering about the "Save Data" action, specifically the table to use. I created a table called "dcf_payments". Maybe this is not correct?
In your documentation, I would like to see a screenshot of all the elements of the web hooks submit page. I want to see the ordering of them.
I created a copy of my form that I'm working off. I put the email action at the top of the submit tab of page 2, and I received the email with the form data. So emails are being sent from chronoforms. Just not getting the data back from stripe.
I discovered that I had put the Stripe Listener on the wrong tab. I've got it on the Load Tab Now. Whoopsie. But it's still not receiving data from Stripe. I'm focusing now on "Custom Id Variable" in the Stripe listener configuration. In your documentation you said: "Under the Load event of the webhook page, add the Stripe Listener action and configure the secret words and choose a name for the Custom ID we sent to Stripe earlier." I'm unclear on what "choose a name" means in this circumstance, so I've entered "order_id" in the Custom ID Variable field.
I want to note that I am sure that I'm adding the where statement before modify data source, but after saving, the positions are reversed. Not sure if this also makes a difference.
Hi PVMA
Yes, having the Stripe Listener under Submit is wrong, I did not notice that earlier.
What happens when you access the Stripe page now ? do you get the email above the Listener or not ?
The Custom ID variable is one that you sent in the Stripe Redirect and receive back from Stripe through the listener, usually the internal order id, so you can call it that in both actions.
When I use the webhook URL I supplied to Stripe, I don't get an email.
For Stripe Redirect I am using {var:order_id}
For the Where statement in the Listener I use order_id={var.quote:order_id}
I attached screenshots of my settings.
Please note the reversed order of Modify Data Source and Where Statement. This happens after saving every time. I have changed it back several times but when I save, it reverses order.
I think you actions settings are correct, but if you are not getting an email placed ABOVE the listener when you access the listener page directly using the browser, then Stripe can not trigger the listener and this will not work.
What URL did you give to Stripe ? based on your earlier screenshot this should be:
http://domain.com/index.php?option=com_chronoforms8&action=view&chronoform=form-alias&chronopage=page26
You need to replace the form-alias and domain.com with your info
Thats a little bit different from the FAQ documentation. It's missing the AJAX bit. When I use that url, it drops me on a page that just displays the form debug data. I get an email for when the information is submitted to Stripe, but not when it comes back to the Stripe Listener.
And what about Modify data source and the Where statement being reversed?
Hi PVMA
You can try with and without the "&output=ajax" part, do you get the email before the listener or not ?
Test it in the browser first, if it works then add it to Stripe and do a Stripe test and wait for the email before the listener and another one inside the listener events
Ok, I added the new url and added the "&output=ajax" part. Now the email from the webhooks page is being sent. So there is more progress. But data is still not being captured to my database. I looked at the "stripe_transaction_id" field and there is no data.
Does it work when you omit the &output=ajax or not ?
You can test the order_id value received in the Email, add {var:order_id} in the Email action under Payment Success
You may also try {data:} in the Email before Stripe Listener, maybe this will send you the whole data load sent by Stripe
