Post-purchase redirects
Trolley's redirect feature lets you push your customer to a page of your choice after their payment completes.
Redirects
Redirects are the simplest Trolley integration mechanism.
After a customer completes a purchase (and Stripe verifies the charge as complete), Trolley displays the Thank-You page.
When a customer clicks on Close
, Trolley will fire any redirect that you've set, sending the browser to the new URL.
(Notably, if the charge fails then the webhook is not executed and the customer remains on the Payment screen in Trolley)
Setting it up
Redirects are easy to configure.
Simply go to the Trolley dashboard and edit your Product.
Scroll down, and enter a valid URL into the Redirect to this URL when paid field.
What happens next
When the customer hits the Close
button, the redirect fires, and the customer's browser is redirected to the new URL.
Trolley appends a parameter to the URL containing the customer's email address, so that if you wish, code on the target page can check for the value and do something useful with it.
This parameter will be URL encoded.
e.g.
https://exammple.com/my-page?email=customer@paytheman.org