Selling with PayPal
Doki uses Stripe internally to handle payment processing and subscriptions. If you have a Stripe account, you can connect it to your Doki account for streamlined selling experience. Via Doki's invite system, you can handle your payments and subscriptions outside of Doki and invite in your students.
To handle the payments with PayPal, you'll need a PayPal Business or PayPal Premiere Account.
We recommend the following workflow for doing so:
- Create a PayPal button that does a single or multiple payment charge.
- Add the PayPal button to your own website, or link it from a Facebook or similar social media page.
- The PayPal button redirects to a special invite link with a code that grants the customer access to your program on Doki.
The guide below will assist you in setting up this workflow.
Creating an Invite Code/Link
Start by creating an invite code for your course. Invites grant access to a program via a package, so you'll need to have created your course content and created a package in the Doki admin system. Since you're not using our payment gateway, there won't be a checkout on your Doki site, so just enter the price of the package as the same as you're charging on the PayPal side.
Once your course is packaged and ready to sell, under the "Selling" tab in the course admin, click the "Invite Codes" menu item then click the "Add Code" to add a new one.
Select the package you want to associate with the PayPal button and leave "Can only be used one time" unselected. Click "Create" to generate a new code.
You can then click the "Copy Link" button to copy the link to your clipboard you so can paste it into PayPal later.
Great, so now you have an invite link that your customers can use to redeem access to your course. We're not going to share this link publicly, though, we're going to make it the end step of a PayPal checkout.
Creating a PayPal Button
You can follow along with the instructions on the PayPal documentation to create a PayPal button. You most likely want to create a "Buy Now" button or "Subscription" button.
When you get to "Step 3" in the button creator ("customize advanced features"), you're going to customize a few things.
Start by checking the box next to "Take customers to this URL when they finish checkout" and paste in the invite link you generated.
Check "Add advanced variables" and add a new variable for "return" in the text field pasting in the same invite link you pasted in the step above. A custom variable is just the name of the option followed by a equal sign and then the value of the option, for example:
We also recommend you add a "cbt" button (NOTE: this stands for Call Back Text) which will change the button on the receipt page from "Return to Merchant" to whatever you want the button to say, for example:
cbt=Access Your Course
Each variable should be on a new line in the text field, so it should look like:
cbt=Access Your Course return=<a href="https://your-doki-name.doki.io/system/invites/redeem?token=abc123">https://your-doki-name.doki.io/system/invites/redeem?token=abc123</a><br>
Now when the customer pays, they'll get a PayPal confirmation page with a button that says "Access Your Course" that will link to your invite code link so the customer can complete the purchase and start setting up their account and getting access to the program they purchased. In most cases the confirmation page will immediately redirect to the return URL so a click is not required by your customer.
Here's a sample setup so you know what you should be shooting for:
NOTE: it's important that you have the return link in both the "checkout" text field and the advanced variables field, otherwise this won't work. There's also one final PayPal setup step before all of this will work properly. Read on to learn how to configure.
Enable "return" links on your PayPal account.
Finally, you will need to enable return links for the button return links to work.
- From PayPal's main screen, click on the "My Account" tab.
- Click on "Profile" in the sub-navigation.
- From the sidebar, select "My Selling Tools"
- Under "Selling online", click "Update" next to "Website preferences"
- Next to "Auto-return", make sure this is set to "On".
You can enter a generic return url here as well. You should design a page on your website that you can redirect customers back to with a generic "Thank you" message. Note that our "return" setting on our button will override the default link.
Using the Buttons
Now you can paste link to your custom button in your own marketing website, Facebook, or other locations. This will direct users to the checkout page where they will pay for their product and then be redirected to the Doki invite link where they can create and access their program.