In this tutorial, we explain step-by-step how to connect Signal Magician with your PayPal account and make a test purchase. It allows you to sell forex signals through PayPal. The system will create usernames automatically and renew their subscriptions everytime customer gets billed through PayPal monthly, weekly, or annually.
Last updated: 2019-11-26.
Turning ON PayPal Webhook listener
Open Payment Processors page
In the Payments Processors page, you’ll find all the services that you can connect with Signal Magician. You’ll see connection status next to each payment processor name.
If the status says “Connected” or “On” it means Signal Magician is waiting for payment notifications from these services. Status “No” means Signal Magician is not listening for any messages from these services.
In this tutorial, we’re connecting Signal Magician with PayPal. Click on “PayPal” to get to the next settings page.
Turn on PayPal Webhook listener
Set the Paypal Operational mode to “On” and click “Save Changes”. It will turn on PayPal Webhook listener.
Copy PayPal IPN URL
When PayPal Webhook listener is on, you’ll see Instant Payment Notification URL displayed. It is your unique IPN URL for PayPal.
Triple-click the IPN URL to select it all, then right-click on it and choose Copy.
Creating PayPal hosted buttons
You will need a PayPal Business account to create PayPal hosted buttons and charge recurring fees for your services.
Log In to your real PayPal Business account
Open PayPal buttons page
Click on “Tools” in the top menu and choose “All Tools”.
Next, click on “PayPal buttons” on the list of available tools.
Your PayPal account control panel might look a bit different but you can find PayPal buttons somewhere on your PayPal account one way or another.
Create PayPal hosted button
Now we’ll create a new PayPal hosted button. You’ll have to add it to your website or, you can also use it as a link in emails, Telegram chats, Whatsapp, Facebook Messenger, etc. People will be able to subscribe to your trading signal services through this button.
Inside My Saved Buttons page click on “Create new button” in the right-side menu.
Choose a button type
Choose “Subscriptions” for button type. It means this button will create recurring payments for your customers and bill them automatically every month, week, or whatever interval you’ll choose.
It is possible to create one-time payment buttons too. For that, you need to create a “Buy Now” type of button.
But in this example, we’ll create a button for recurring payments. It is the most popular way of charging customers for trading signals.
Enter payment details
Button type – this is where you decide if this particular button is for collecting one-time payments (Buy Now) or collecting recurring payments (Subscriptions). In this example, we choose “Subscriptions” as a button type, and you’ll also need to enter these other payment details.
Item name – this is the name of the subscription plan in your service. For example, “Forex Signals (with one month Trial)”.
Another example to the “Item name” could be “My Super Signals (Bronze plan)” or something like “Trading Signals (Premium package)”. Well, you get the point.
It can be anything you want. Remember that this is how your clients will see it in their PayPal account before and after the payment.
Subscription ID – this is a required field. PayPal says it is optional, but for Signal Magician it is required to identify the connection between the Offer and PayPal button. Make sure you enter a unique ID number.
Ideally, each button you’ll create should have a unique Subscription ID. But it’s also possible to have the same ID for more than one button. For example, two different buttons with different price tags (but same Subscription ID) enable the same Offer on Signal Magician.
How to know what number you can use there? Any number will do if you have not used it before when creating PayPal buttons. Just come up with any number to start with and increase it every time you create a new button.
In this example, we use 5001 as a Subscription ID for the first button. For other buttons, I will use 5002, 5003, and so on.
Currency – this is where you choose in which currency people have to pay you for the service. In this example, we are using EUR.
Billing amount each cycle – set what amount PayPal should bill your customers each period. In this example, we enter 50 EUR.
Billing cycle – set how often PayPal should bill your customers. In other words, will this be a monthly, weekly, or annual payment plan? In this example, we use a 1-month billing cycle, and it means customers will be billed 50 EUR each month. Note that Signal Magician will add extra few days for each subscription to avoid service interruption in case there are some temporary payment issues.
I want to offer a trial period – choose if you wish to provide a trial period or not. In this example, we’ll enable trial period.
Amount to bill for the trial period – Because of some limitations, Signal Magician cannot have free trial periods through PayPal. Always add a price tag to your trial periods if you’ll use them. In this example, we’ll use 1 EUR trial period or 1 month. It also helps us to avoid duplicate trial periods and people who do not even have a PayPal account and cannot even pay for your service.
Define the trial period – choose how long the trial period should be.
Next, switch to Step 3 by clicking on the blue section at the bottom.
Do you need your customer’s shipping address? – I always choose “Yes” here to have customer’s physical address for the accounting purposes.
URL when checkout is canceled – create a page on your website where you want customers to be taken in case they cancel their checkout. An example would be, a simple web-page saying something like “If you have any issues with your payment, please contact our support team here”.
URL when checkout is finished – create a page on your website where you want customers to be taken in case they complete their checkout. It is usually called “Thank You” page. An example would be, a simple web-page saying something like “Thank you for subscribing to our trading signals. We’ve sent your login information to your PayPal email address. Do not forget your Spam folder too. Contact our support team here if you don’t receive your login information within 15 minutes”.
Advanced variables – this is where you need to put your PayPal IPN URL from Signal Magician. You should have it in the clipboard because we copied it a few minutes ago. If not, go back to “Payment Processors->PayPal” and copy the IPN URL. Then, paste the URL in the advanced variables text area and add notify_url= in front of that URL.
You can see an example in the image.
Click on the “Create Button” button.
Copy HTML code for the web-site
When PayPal creates your new button, you’ll be taken to the page with its HTML code.
Copy this HTML code to your website and the Subscribe button will appear giving your visitors the ability to subscribe to your services.
Create similar button
Click on the “Create similar button” link to create another button with similar settings.
But before you do so, save this URL from the “Email” tab to your computer for future use.
PayPal will create URL for your new button too. It is a direct payment URL. When the customer visits this URL, he will see the payment page on PayPal.
You can use this URL in emails, Viber, Telegram, Facebook Messenger, Website, or wherever URLs can be used.
However, my advice would be to add this URL or button HTML code on your web-site’s Pricing page where you can also have F.A.Q. section, all pricing and plans, list of features, etc.
It’s always better to direct people to the Pricing page so they can choose from all the available plans than just giving them direct payment URL.
Creating similar button
When you choose to create a similar button, PayPal will use all the same parameters and have them pre-filled for you.
Now you only need to make a few small changes.
In this example, we’ll change the “Item name” to “Forex Signals” and Subscription ID to 5002.
We’ll use this second button to create monthly subscriptions without a trial period. It will be handy for those who have finished their trial, canceled, but now still wants to signup. They cannot have the second trial, so we need another button/link without trial.
We leave everything the same as for the first button except we disable the trial period.
Switch to Step 3.
Everything stays the same in Step 3, but make sure you have all three URLs in place.
Click on “Create Button”.
When the second button is created, save its HTML code and URL to your computer for future use.
Click on “Go to My saved buttons”.
Create a third button
Click on Action menu for the second button and then click on “Create similar button” link.
We’ll create a third button for the same Forex Signals plan but now at a discounted price. We can use this button/link to get back some customers who cancel the service. We can also use it in our exclusive promotions like Christmas or Black Friday, etc.
We’ll have all the same parameters as for the second button, but here we will add “50% OFF” to the item name, create a new Subscription ID (5003) and change to the discounted price of 25 EUR.
Make sure we have all three URLs in Step 3 and then click on “Create Button”.
Creating Signal Magician Offers
What is Offer in Signal Magician?
Offers tell the Signal Magician which Signal Providers, Services, and Products it should enable when a Webhook from the payment processor triggers the Offer.
Each Offer must link to a specific PayPal Subscription ID, Stripe Plan ID, or ClickBank Subscription ID. This is how the system knows which Offer it needs to trigger when Signal Magician receives a Webhook call from the payment processor.
Each Offer can be activated by more than one Subscription/Plan ID (i.e., three plans at different prices activate the same Offer). But each Subscription/Plan ID can be linked to only one Offer which means you cannot assign the same plan to multiple Offers.
When you link an Offer to the Subscription/Plan ID make sure the Interval and Trial period match these parameters on the payment processor system.
Note Signal Provider IDs before creating Offers
Go back to the Signal Magician and open Users page from the left menu.
Select “Signal Provider” from the top search bar and click on “Search” button.
Each Signal Provider has a unique ID number. Note these numbers as we’ll need them when creating an Offer.
Create a new Offer
Open the Offers page from the left menu and then click on “Create new Offer” button at the top.
We need to create an Offer and connect it with PayPal buttons we’ve just created.
Before creating the Offer, you need to know which PayPal buttons you’ll connect it with. We’ll connect this particular Offer “Forex Signals (with Trial)” to the PayPal button with Subscription ID 5001. We’ll set the ID in step #6.
Offer name – give a name for your Offers. Customers will see this on the Subscriptions page so name it accordingly.
Enabled – this is where you can enable or disable offers. When the offer is disabled, it won’t listen to any messages from PayPal.
Interval – set the billing cycle interval for this Offer. It should match with the PayPal button billing cycle.
Trial access – set the number of days for the trial period. When set to 0 (zero) the trial period is disabled for this Offer. If you have a trial period enabled for the PayPal button then enable it here too. The number of days may or may not match. If the trial period is disabled for the PayPal button, then set this value to 0 (zero).
In this example, I use 1-month trial, but I set a trial period to 40 days to allow some extra days in case of payment problems. Think of it as a grace period.
Web Panel – tells the Offer whether it should enable Web Panel access for the customer or not.
Trade Copier – tells the Offer whether it should enable Trade Copier service for the customer or not. You should set this to Yes if this Offer is subscribing customers to Signal Providers.
Email Alerts – tells the Offer whether it should enable Email Alerts for the customer or not. Email Alerts are sent by Signal Providers when a trade is opened or closed.
SMS Alerts – tells the Offer whether it should enable SMS Alerts for the customer or not. SMS Alerts are sent by Signal Providers when a trade is opened or closed.
Follow these Signal Providers – enter the list of Signal Provider IDs and separate them with commas. We’ll use all three ID numbers we’ve collected in the previous step from the Users page.
Create access to these products – select which products to include in this Offer. The EA Licensing module will create License Keys for each selected product.
PayPal Subscription ID list – enter the list of PayPal Subscription IDs and separate them with commas. It tells which PayPal buttons must trigger this particular Offer. In this example, this Offer will get triggered by a PayPal button with the Subscription ID 5001.
Click on “Create new Offer” button.
When the button is created click on “Back to offer list”.
Create a second Offer
Click on “Create new Offer” button to create a second Offer. This time for the buttons without a trial period.
You already know what to input in each field.
We use the same parameters for most of the fields except these three:
Offer name is different. This Offer is without a trial period, so we name it accordingly.
Trial access set to 0 (zero).
PayPal Subscription ID list is set to 5002,5003. It means this Offer will get triggered by two buttons (with and without discount).
Click on “Create new Offer” button.
Now we have two Offers created, and we can see them on the Offers page. Pay attention to the “Last Webhook call” column. It says “Never” for both new Offers because they were never triggered yet by PayPal IPN service.
Creating PayPal Sandbox Accounts for Test Purchases
Log into PayPal Developer Dashboard
To test how PayPal buttons work and how they trigger Offers we’ll need a PayPal Developer account.
Go to https://developer.paypal.com and log into the dashboard with your PayPal login credentials. You might need to create a new PayPal Developer account.
Also, make sure that you have a PayPal Business account. It might not work with a personal PayPal account.
Create PayPal Sandbox Accounts
Inside PayPal Developer account you’ll need to create at least two PayPal Sandbox accounts.
Sandbox accounts used for testing purposes without involving real money.
When I logged into the PayPal Developer account, I saw that two PayPal Sandbox accounts created automatically. So I used them for testing. But in case you don’t have Sandbox accounts create them by clicking on “Create Account” button in the Sandbox->Accounts section.
Create one PayPal Sandbox account of Business type. It will act as a Forex signal service account. In other words, imagine that this is your account where you’ll receive the payments from your customers.
Create another PayPal Sandbox account of Personal type. It will act as a customer account. In other words, we’ll make test purchases with this account to see how the process works.
Creating PayPal Sandbox Hosted Buttons for Test Purchases
Login to PayPal Sandbox Business Account
Now we need to login to PayPal Sandbox Business account and create the same PayPal buttons we’ve just created in the real PayPal account.
It should have the same password as your PayPal Developer account. If not, you can set its password in the PayPal Developer account under the Sandbox->Accounts section.
You already know how to create buttons, but I’ll go through the process very quickly again to show that we use identical settings for each button. This way we don’t need to create new Offers or add additional Subscription ID number to the Offer.
Open Payment buttons page
Click on “Create new button”
Create new PayPal button in Sandbox Account
To make a quick test, we’ll create a button without a trial period and use the same Subscription ID 5002 like in the real PayPal account.
This way we’ll have a PayPal button in the Sandbox account with the same parameters which will trigger the same Offer.
Set other parameters like illustrated in the image.
Set billing amount and cycle then switch to Step 3 to add required URLs.
Add required URLs to make sure that this button calls the Signal Magician PayPal Webhook.
Make sure you add URL with the appropriate parameter name like displayed on PayPal web-page.
Here’s an example below:
Save button HTML code future use.
Copy test button URL from the Email tab and then click on “Go To My saved buttons”.
You can always view the HTML code and URL of any PayPal button by clicking the “View code” from the Action menu.
Log out from PayPal Sandbox Business Account
We need to log out from PayPal Sandbox Business Account because now we’ll make a test purchase and we’ll have to log in to PayPal Sandbox PERSONAL Account.
Making a Test Purchase of Forex Signals or Products
Open the test button URL
Paste the URL of the test button in the address bar of your web-browser.
Notice the www.sandbox.paypal.com domain. It means this URL is for testing purposes.
Click on the “Login” button to continue.
We login as a buyer using the second PayPal Sandbox Account which is of type Personal.
It should have the same password as your PayPal Developer account. If not, you can set its password in the PayPal Developer account under the Sandbox->Accounts section.
Click “Agree and Pay” or follow other instructions on the page to continue with this test purchase.
Test purchase was a success. You can see the text “Test Site” at the bottom and also the domain name is still www.sandbox.paypal.com which means this was a test purchase.
Don’t close this page yet. We’ll get back to it soon.
Now wait 10-20 seconds for the PayPal IPN to trigger and call the Offer, then switch to Signal Magician.
PayPal IPN operates in the background, and we don’t see it. So nothing will happen on the screen.
If we switch to the Signal Magician and open Offer page, we’ll see that 2 IPN calls were received already by the Offer which has PayPal Subscription ID 5002 assigned. It means our test purchase triggered this Offer and it should have created a new username and assigned the right services.
Open Users page and find the new username created after the test purchase. Click on that username to open its Profile.
We switch to the Signal Providers section to see that all three Signal Providers were enabled.
We see only two providers on this page because the screen was too small to fit all three.
The expiry date is 1-month + 3 days in the future.
PayPal will charge the user’s account after 1-month. If it’s a success, then the expiry date will be extended, and the user will continue using services without interruption.
If PayPal isn’t able to charge user’s account after 1-month then after an additional three days the customer will lose access to these services.
Why the system sets expiry date to have a few extra days?
When the system creates a new username or extends a subscription for an existing customer, it adds a few extra days to the expiry date. For example, for monthly subscriptions, an expiry date is one month + 3 days.
The reason for this is simple. Those extra days are like a grace period to allow for timezone differences or failed payment attempts. It is always a question if the payment provider will charge the customer after 30 days or 31 days. Moreover, different payment providers do that differently.
Another example would be if the payment provider must charge the next payment on the 22nd of December, and the expiry date is also 22nd. The system does not know the exact hour at which the payment provider charges the customer on 22nd, and it might be 23rd already on the web-server because of the timezone difference. In such a case, the customer access would expire before the payment and interrupt the service.
Adding three extra days always solves these small problems. In this example, when auto payments happen on 22nd, and the expiry date is 25th, there will be a much lower chance for auto-renewal problems.
Note that these extra days are just for the expiry date, and the user will get those additional three days in case of payment problems or if he cancels the subscription with the payment provider. But if the subscription is active, then the payments will still happen on the right day according to your payment provider (in this example on 22nd).
Now let’s check the newly created License Keys of this new customer.
Go to the “EA Licensing” on the left menu and open “License Keys” page.
Here are two License Keys created for those particular products that are added in the Offer which is triggered by the PayPal Subscription ID 5002.
Canceling PayPal subscription and how it affects user services on Signal Magician
Let’s cancel this PayPal subscription
Now go back to PayPal “after payment” page and click on PayPal Account Overview.
Clicking on “Return To Test Store” button will take you to the URL you’ve set for the PayPal button in Step 3 (finished payment URL).
Open PayPal pre-approved payments page
Click on the gear icon in the right-top corner, then choose Payments from the top menu (2nd row) and click on “Manage pre-approved payment” button.
Your PayPal account might look different. If this is the case, then look for pre-approved payments page in the settings section or something similar.
We do this inside the PayPal Sandbox Personal Account.
Choose the pre-approved payment (subscription)
Inside the preapproved payments page, you’ll see all the subscriptions listed. Choose the latest one that you’ve just created.
Cancel PayPal subscription
At the top, you’ll find a “Cancel” link. Click on it.
You’ll be asked if you really want to cancel the subscription. Click on “Cancel” to confirm.
It will immediately cancel this subscription and won’t renew it. After 1-month this subscription will expire on Signal Magician and stop working.
Customer will still have this product/service working until the date paid.
Refunding PayPal payment and how it affects user services on Signal Magician
Let’s do an experiment before we process the refund on PayPal Sandbox account.
It will help you to understand better how Offers work.
As you already know, Offers can have multiple services and PayPal Subscription ID numbers assigned. It is how Signal Magician knows which Offer each PayPal Subscription ID (button) triggers and what services must be created for the user.
For this experiment, we’ll edit the Offer with the PayPal Subscription ID 5002 and then process a refund for this particular subscription.
Open Offers page and click on the “Edit” icon next to the Offer which has PayPal Subscription ID 5002 assigned.
Change the list of Signal Providers and Products.
For this experiment, we’ve removed SPID 12.
We’ve also removed “Moving Average Standard” from the Products list. Only “Accelerator PRO” left on the Products list.
To make the experiment more interesting we’ll create an additional License Key manually for the new user.
Open the EA Licensing” page and then click on “License Keys”.
Click on “Keys” icon next to the new username to create a new License Key manually.
Let’s choose to create “Lanai EA Pro” License Key.
Click on “Create a new License Key” button.
When License Key is created click on “Back to License Keys list”.
Here it is. A new License Key for a new product for a new user. You can see in the “Created” column it says created by Admin, but PayPal created other two License Keys for the same user.
So why we are doing this and how it makes this experiment more interesting?
Well, we want to illustrate how modifying the Offer affects the refunds that happen from time to time in any business. We want to show that it is not a good idea to modify Offers when you already have customers created through these Offers. And if you do need to change the Offer, then you should be aware of the consequences. We always recommend creating new Offer and new PayPal button instead of modifying existing Offer when there are already products and services created from that Offer.
Now, we will process a refund for the payment of this new user, and it will trigger the same Offer. But because it will be a refund request, it will revoke the access to all the services added to the Offer for that particular user.
But we’ve already removed SPID 12 and “Moving Average Standard” from the Offer. It means the Offer will not touch these services as well as those created manually.
Login to the PayPal Sandbox Business Account (seller) because we cannot process refunds from the PayPal buyer account.
Open “Activity” page from the top menu and locate the payment you want to refund. You can use the search bar if you need to.
Click the “Refund” button next to the specific payment. It should take you to the Transaction details page.
On the Transaction details page, click on “Issue a refund” link.
On the next page, click on “Continue”.
Then finally, click on “Issue Refund” for a final confirmation.
When you get to the “Refund Complete” page wait about 10-20 seconds for the PayPal IPN to trigger and call the Offer, then go back to Signal Magician.
PayPal IPN operates in the background, and we don’t see it. So keep in mind that nothing will happen on the screen.
Open “License Keys” page to see that after the refund process the Offer disabled only “Accelerator PRO” License Key. It is because this particular Product is added to the Offer.
We’ve removed “Moving Average Standard” from the Offer so it did not disable its License Key, and the Lanai EA Pro was created manually. Offer cannot touch manually created License Keys.
Open “Signal Providers” section to see that after the refund process the Offer disabled Signal Providers by ID 7 and 2. It is because these particular SPIDs are added to the Offer.
We’ve removed SPID 12 from the Offer, so it was not disabled.
Have you learned how to connect PayPal with Signal Magician and make a test purchase through PayPal Sandbox?
No?! Then please reread this tutorial.
We understand it is a long one, but to learn this well you need to follow this tutorial at least a few times. Then it will be an easy task for you.