You can use Zapier to automatically unenroll students who you've refunded from your Stripe dashboard.
Before setting up your Zap, you will need to have a Stripe account with your products created inside Stripe that correspond to your courses in Thinkific.
Your product names in Stripe must match your Thinkific course names exactly (including cases).
Make sure you have at least one recent refund created, as Zapier will fetch an existing refund for testing purposes.
Please note that the Zapier Starter plan or higher will be required due to the number of steps required for the Zap.
To Expire Enrollments After a Stripe Refund
Stripe Trigger
- Let's go into Zapier and set up a Zap!
- Choose Stripe as your Trigger App.
- Select New Event as your Trigger. Save and Continue.
- Select your Stripe account. Then Save and Continue.
- Select Charge.Refunded from the drop down menu for type of Stripe event.
- Test your Stripe trigger by fetching an existing event. Fetch and Continue.
- Once your test is successful, choose Continue.
Split Text Formatter Action
- Choose Formatter as your Action App.
- Select Text as your Action.
- From the Transform drop down, select Split Text.
- For the input, select Data Object Description from Stripe.
- Enter ':[ :space: ]' (minus the quotation marks) for the Separator.
- Under Segment Index, select Second. Save and Continue.
- Double check the information in the test formatter. Create and Continue.
- Ensure the test was successful. Select Add a step.
Split Text Formatter Action
- Choose Formatter as your Action App.
- Select Text as your Action.
- From the Transform drop down, select Split Text.
- For the Input, select Data Object Description from Formatter. It is important that you select the Data Object Description that has been stripped using Formatter (in the second step) rather than the Stripe (from the first step).
- Within Separator, enter '[:space:]-' (minus the quotation marks).
- Select First as your Segment Index.
- Continue.
- Review the Test Formatter information. Create and Continue.
- Once the test returns successful, add a step.
Lookup Table Formatter Action
- Choose Formatter as your Action App.
- Select Utilities as your Action. Save and Continue.
- Under Transform, select Lookup Table.
- Within Lookup Key, select Product Name. There should be preview fields for you to be able to see examples of what different fields you could select. The Product Name will be the course name as you entered it into Stripe when you set up your account.
- Under Lookup Table, enter the course name in the first field and course ID in the second. Select '+' to enter in the Stripe product names and course IDs for all of your courses if you have more than one.
- Leave the Fallback Value field empty.
- Select Continue.
- Verify the information for the test. Create and Continue.
- If the test returns as successful, add a step.
Unenroll Student in Thinkific
- Choose Thinkific as your Action App.
- Continue.
- Select Unenroll User. Save and Continue.
- Select your Thinkific Account. Save and Continue.
- Under Products, select Use a Custom Value (advanced).
- From that drop down, select the Output from Step 4.
- Enter in the Stripe email that corresponds to the student account in Stripe to cross reference with the student's Thinkific account.
- Leave the expiry date blank if you want the refunds and unenrollment to take effect immediately. Or you could use a dynamic date field if you wanted to set the unenrollment to take effect at any other time (e.g. in a day, or in two hours). Continue.
- Verify the information for testing.
- Confirm the test preview information is correct, then choose Create and Continue to test through Zapier. Then select Finish and turn your Zap on.
You will want to test this process out with a test student in Stripe and confirm that both your student was refunded then unenrolled in Thinkific.
There you have it! You now have your Stripe set up to refund and expire student enrollments in your courses.