One-time message to new Stripe customers

So I’m trying to send an automated one-time welcome message (i.e. not each month when a customer pays) with Zapier… Stripe customer service said ‘ask Zapier’, and I couldn’t spot a Zapier livechat (a forum post has provided no respondses).

The challenge I’m having is that using a field like ‘new customer’ includes customers who have, say, entered their email address in but haven’t completely checkout.

Does anyone know:

  • Which field to use
  • How to send the email one-time only (vs repeatedly)

A non-techy Zapier solution would be ideal…

It’s also possible to redirect paid-members to a custom welcome page in Ghost when they first subscribe / signup :slight_smile:

The benefits of using a welcome page instead of an automated email is that it removes an extra step from the flow, and prevents the user from hopping back and forth between your site, and emails. Plus — you can also use protected content for your welcome pages, so only logged in members can view it.

This can either be done using a code injection redirect as follows - which would redirect the member to a public page immediately after checkout:

<script>
    function getParameterByName(name, url) {
        if (!url) url = window.location.href;
        name = name.replace(/[\[\]]/g, "\\$&");
        var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
            results = regex.exec(url);
        if (!results) return null;
        if (!results[2]) return '';
        return decodeURIComponent(results[2].replace(/\+/g, " "));
    }
    var action = getParameterByName('stripe');
    if (stripe == 'success') {
        window.location = '/welcome/';
    }
</script>

Or alternatively, you can build this behaviour into your theme and redirect paid-members to a protected welcome page in Ghost when they click the signup confirmation email!

6 Likes

For me the provided code did not work, but this one did (by Chat GPT ;):

// check if “?stripe=success” is in URL address
if (window.location.search.includes(“?stripe=success”)) {
// Wait 1 second (1000 miliseconds) before redirect
setTimeout(function () {
// Pointing URL for redirection
const redirectTo = “adres-strony-X.html”; // Change to correct address
// Redirect
window.location.href = redirectTo;
}, 1000);
}

Ghost has a built-in welcome pages features now, too, which makes setting this up a snap:

1 Like

Hi Ryan,
You are totally right! With one exception though - when the subscriber was already subscribed to free plan and then switches to paid one, then the welcome page redirection does not work (I confirmed that with Ghost helpdesk, apparently this is “feature, not a bug”). Thus when You want to communicate something to all paid user (e.g. invoicing rules) then such script is helpful