Selling

Redirect Students from a 3rd Party Payment System into Xperiencify After a Successful Purchase


Murray Gray in Selling

Dec 27, 2023 - 5 min read. Available on all plans.

Table of Contents

Why Bother Redirecting Your Buyers Into Xperiencify After their Purchase

Simple, most post-purchase experiences are pretty terrible. At best, you might send folks to a "Success" or "Congratulations" page that welcomes them and then asks them to check their inbox.

The problem with this is two-fold.

First, you're relying on your new student or customer to find your confirmation email, click on the link inside it to get to the login page, and then type in a hard-to-type password to gain access to your course, membership or program.

The fact is that this process easily loses 10-20% of your students and customers immediately because of any combination of the following factors:

  • They can't find the confirmation email (or it went to spam). Most of them will give up at that point.
  • Some will write to you to find their email, but most will usually give up before you respond
  • You tell them to check their spam folder, but they don't know how, and give up (abandon or request a refund)
  • Or if they DO find the confirmation email, they get to the login page and mis-type the password you gave them and give up, thinking they'll come back to it later (but most never do)
  • Or perhaps they don't even understand how to use a login page, can't copy/paste and in general can't figure out one of the steps

The process I just described is what most courses put their students and customers through, and they unintentially LOSE between 10-20% of their new customers thanks to these very first challenges.

The better process is to have your shopping cart platform redirect your new students and customers DIRECTLY into your course, cutting out the need for a confirmation page, and the need to immediately find an email.

We've written a PHP script for you to do exactly that, and we've included it below. To use it, just fill in your API key and course ID.

Custom PHP Redirect Script

To use this script you'll need 2 things:

  • A shopping cart that allows you to embed your customer info (firstname, lastname, email address) into the post-purchase redirect URL
  • Your Xperiencify API key (find this on your Account > Advanced page)
  • The course ID you want to do students to (find this in in the page URL when you edit a course -- it will be in the "https://app.xperiencify.io/course/123456/" format. The number is your course ID)

Finally, here's the PHP script:

if(is_array($_REQUEST)) {
   $email=$_REQUEST['email']; // adjust based on how the info is sent
   $firstname=$_REQUEST['firstname']; // adjust based on how the info is sent
   $lastname=$_REQUEST['lastname']; // adjust based on how the info is sent
   $key="YOUR_API_KEY_HERE";
   $api_url="https://api.xperiencify.io/api/public/student/create/?api_key=".$key;

   $ch = curl_init();
   curl_setopt($ch, CURLOPT_URL, $api_url);
   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
   curl_setopt($ch, CURLOPT_POST, true);
   $data = array(
     'student_email' => $email,
     'course_id' => 'COURSE_ID_HERE', // It will be numeric format
     'first_name' => $firstname,
     'last_name' => $lastname,
     'password' => '' // Optional. If not provided we'll auto-generate one and return it to you
   );
  
   curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
   $output = curl_exec($ch);
   $output_array = json_decode($output, true);
   $magic_link=$output_array['magic_link']; // this is the redirect link to take students to their course
   header("location: ".$magic_link); // Redirect student to the course membership site home page
}

Redirecting from ThriveCart to a Custom Page After Purchase

Here's how to redirect to a success page after a successful purchase.

Next, here's how to get the customer's data OUT of Thrivecart using the query string:

And now, in the PHP script you set up, here's how to extract the your customer's personal information from the ThriveCart redirect:

  $email=$_REQUEST['thrivecart']['customer']['email'];
  $firstname=$_REQUEST['thrivecart']['customer']['firstname'];
  $lastname=$_REQUEST['thrivecart']['customer']['lastname'];

Be sure to send that info to us using the code in the previous section.

If your customer's still aren't automatically redirected, then you may not have set your cart to redirect to your custom page. To solve that, go to your cart editor and go into the 'Success page' section and in the side bar, there is an option to redirect to your custom success page.

NOTE: We offer a "done for you" service for this if you'd like us to handle the setup for you. It's just $100 to set up the script, test it, and host it each year for you. Plus $100 for each year after that for us to keep hosting it. If you're interested in this, then you can make your payment here.

Here's a walkthrough of me setting this up:


10