In this tutorial, you will create an automation that, after payment, will add all the necessary data to the “Orders” table and send an email confirming the order details.
Create Stripe Webhook
Create an endpoint with “checkout.session.completed” event
In airtable create new automation with “When webhook received” trigger and copy webhook url.
Paste this url as a “Endpoint URL” to stripe
Trigger webhook
Create a sample payment link and make a payment to test the trigger and provide sample values for airtable automation.
Use stripe test card - 4242 4242 4242 4242
Check body
Click “Test trigger” and you should see the content of the webhook response. You can review the data, you will need it in the next steps.
Find Line Items
Webhook returns the client_reference_id, which is the value of the session ID. This allows us to find Line Items records associated with a payment. Make sure the condition is: sessionId contains client_reference_id and Order is empty
Place an order
Connect to the “Orders” table and select the values you want to include in the order.
Send a confirmation email
This is the usual process, such as when using a dynamic email tool.
Example:
I paid for the order
Automation has placed an order in the table
It also sends an email with information about the order
Also using it added log record and synced products