In this tutorial, Rimantas explains step-by-step how to connect Signal Magician with your Checkout.com account and make a test purchase. It allows you to sell products and Forex signals through Checkout.com. The SM system will create usernames automatically and renew their subscriptions every time the customer gets billed through Checkout.com monthly, weekly, or annually.
Last updated: 2019-11-26.
Turning ON Checkout.com Webhook listener
Signal Magician (SM) integration with Checkout.com (CKO) is done through Webhooks. You setup CKO to send Webhook to SM when someone makes a purchase or refund. This way, SM knows when to create, renew, or disable a specific username.
Before we begin, it is essential to understand that there are two types of CKO accounts, Sandbox, and Live account, and you can create both accounts at www.checkout.com.
CKO Sandbox is a test account you can use for testing purposes.
CKO Hub is a Live account where real purchases happen.
I recommend you to have both accounts. It is wise to do some testing in your CKO Sandbox account before you go live.
Open Payment Processors page
In the Payments Processors page, you’ll find all the payment processors that you can connect with Signal Magician. You’ll see connection status next to each payment processor’s name.
If the status says “Connected” or “On” it means Signal Magician is waiting for payment notifications from these services. Status “Off” or “Not Connected” means Signal Magician is not listening for any messages from these services.
In this tutorial, we’re connecting Signal Magician with Checkout.com. Click on “Checkout.com” to get to the next settings page.
Turn on Checkout.com Webhook listener
To enable CKO plug-in in Signal Magician, we need to input six API keys provided by your CKO account.
CKO named them “Publishable key”, “Secret key”, and “Webhook Signing secret”.
Each of these codes has a “Test” and a “Live” version. You will get “Test” keys from your CKO Sandbox account and “Live” keys from your CKO Hub account.
For this tutorial, I will use only “Test” API Keys for test purchases. You can input “Live” API keys from your CKO Hub account following the same steps.
I recommend connecting CKO in Test Mode with Signal Magician Sandbox. It will allow you to make test purchases any time without affecting your Signal Magician Live environment. But it is wise to try CKO Test Mode first with your SM Live account too.
Get Checkout.com Test API Keys
You need to create CKO API Keys, and for that, you first need to create a so-called Channel.
Login to your CKO Sandbox account: https://sandbox.checkout.com (for “Test” API Keys”).
Or login to your CKO Hub account: https://hub.checkout.com (for “Live” API Keys).
From the left menu, choose “Settings”.
Then, click on “Channels”, and then “New Channel”.
When creating a new channel, you will have to input a few values into corresponding fields.
Channel name can be something like “Website” or “SM Panel”.
Channel URL is your sales website where you send your customers to purchase your services.
Payment success URL – a link to your Thank You page where people get to after successful payment. If you do not have such a page, you can use this link: https://YOUR-SM-PANEL-URL/?action=message&msg=23
Payment error URL – a link to an Error page where people get to in case of an error or if they cancel the payment. If you do not have such a page, you can use this link: https://YOUR-SM-PANEL-URL/?action=message&err=58
Click on Save channel, and once CKO creates this Channel, you’ll find two API keys: “Secret key” and “Public key”. Notice they begin with “sk_test_” and “pk_test_“, which indicates they are used for testing purposes only.
Now Copy & Paste those keys to the Signal Magician and make sure you input them into corresponding fields.
In the image above, “CKO Operational mode” is set to “Test mode”. It means Signal Magician will use Test API keys to connect with CKO where required.
Once we finish testing, we can switch to a Live mode. Then, Signal Magician will use CKO Live API keys where required.
Signal Magician uses CKO API Keys only to get additional information about payments when a CKO Webhook arrives. If Webhook comes from the CKO Sandbox account, then SM will use “Test” API Keys. If Webhook arrives from CKO Hub, then SM will use “Live” API Keys.
When we click on “Save Changes”, Signal Magician will save these parameters and enable a CKO Webhook listener. It allows Signal Magician to receive information from CKO about purchases and refunds.
But to make Webhook work, we need to add it to Checkout.com.
Also, important to note that CKO does not offer subscriptions, and there are no Webhooks about renewals or cancelations. In some cases, subscription information can be retrieved from another platform you are using to make sales through Checkout.com, for example, www.learnybox.com, but this requires custom coding from our team.
Add a Webhook URL on Checkout.com
Copy CKO Webhook listener URL
When CKO Operational mode is set to “Test mode” or “Live mode”, you’ll see CKO Webhook listener URL displayed. It is your unique URL for Checkout.com.
You can learn more about CKO Webhooks in this article: Checkout.com Webhooks.
Triple-click the Webhook URL to select it all, then right-click on it and choose Copy.
Adding Webhook for Checkout.com Sandbox Account
To add a Webhook URL on CKO, follow these steps:
- Open the “Settings -> Channels” page from the left menu.
- Choose your preferred channel.
- Click on “New webhook” on the right bottom.
- Paste the Webhook URL from Signal Magician.
- Choose API v2.0.
- Choose “Select all” to send all event types.
- Click on the “Create webhook” button.
Note that you can have multiple Webhook URLs added to your CKO account should you need to.
Copy Webhook Private Shared Key to Signal Magician
We click on the Webhook URL to open its properties.
You will find a Private shared key after you click on the Webhook. A list of Webhooks is on the same Channel page (Settings -> Channel).
Copy “Private shared key”, then switch to Signal Magician and paste it into the corresponding field (CKO Webhook Signing secret).
Input Webhook Private Shared Key (Signing secret)
It is crucial not to make a mistake when copy-pasting API keys and Signing secret codes to Signal Magician and input them in appropriate fields.
Now we have CKO Sandbox fully activated with Signal Magician and ready to proceed to the next step – creating Plans and Offers.
Creating products and subscription plans
Unfortunately, Checkout.com lacks the functionality to offer subscription plans, and this is possible only with the help of additional platforms that also have integration with Checkout.com, like www.learnybox.com.
It means you need to run all your sales through an additional platform that allows creating subscriptions and pricing plans. And because it must be done outside Checkout.com and Signal Magician, I won’t cover this part in this tutorial.
What’s important to understand is that when you create a product or a subscription pricing plan, it will have its own “Product name”. You will have to use this product name to link it with an Offer on Signal Magician.
For demonstration purposes, let’s pretend that I have created a product on my a 3rd party sales platform and named it “Forex Signals“.
Creating Signal Magician Offers
Now, I’ll create an Offer on Signal Magician and link it with Checkout.com.
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 “Product name” created on a 3rd party sales platform connected with your Checkout.com account. That 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 Product Name/Subscription/Plan ID (i.e., three plans at different prices activate the same Offer). But each Product Name/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 Product Name/Subscription/Plan ID, make sure the Interval (weekly, monthly, one-time) match with the platform where you created the product.
Note Signal Provider IDs before creating Offers
Go back to the Signal Magician and open the Users page from the left menu.
Select “Signal Provider” from the top search bar and click on the “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 the “Create new Offer” button at the top.
We need to create an Offer and connect it with the product name we’ve created on our sales platform. As agreed earlier, I’ll use a fictitious product name “Forex Signals” for the demonstration purposes of this tutorial and connect it with this new Offer “Forex Signals via CKO (no Trial)“.
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 CKO.
Interval – set the billing cycle interval for this Offer. It should match the billing interval of a product you are selling through CKO.
Trial access – set the number of days for the trial period, which should match with the trial length of a product you are selling through CKO. If you do not offer a trial period for this Offer, then set this value to 0 (zero).
In this example, I do not use a trial 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.
CKO List of product names – list all product names you are selling through CKO that should activate this particular Offer and separate them with commas. In this example, this Offer will get triggered by a product name “Forex Signals“.
Click on the “Create new Offer” button.
When the Offer is created, click on the “Back to offer list”.
Now we have an Offer created, and we can see it on the Offers page. Pay attention to the “Last Webhook call” column. It says “Never” for the new Offer because it was never triggered yet by CKO Webhook.
Making a Test Purchase of Forex Signals
We do not have a 3rd party sales platform connected with CKO, so I’ll make a test purchase through CKO Sandbox. For this to work, I’ll have to use a custom code when submitting a test payment through CKO.
Before making a test purchase, make sure you have “CKO Operational mode” set to “Test mode”.
Next, to make a test purchase, we need to have a Test Credit Card Number.
CKO provides several of those, and you can read more detailed information about it here: Checkout.com testing card numbers
But for a simple, successful test purchase we are going to use the following information:
- Valid email address (username will be created by that email)
- CKO test card number 4242424242424242
- 100 as a CVC code
- Any expiration date in the future
To make a test purchase, I go to my CKO Sandbox Account and open the Payments page from the left menu.
Then, I click on Create payment button.
A window appears where I have to enter information to make a test purchase.
1) Enter the email address where Signal Magician should deliver login details.
2) Enter the payment amount. Because it is a test purchase, it can be anything you like. I’ll use $49 for this test purchase.
3) A cardholder name can be anything, as well.
4) Enter test card details provided by Checkout.com. I mention them above in this tutorial.
Next, click on the “More options” link below the card details to show another important field we need to fill in.
5) Custom field – this is very important. I must enter a product name here, which is associated with the Signal Magician Offer, that this purchase should trigger. The format is product=XXX where XXX is the exact product name associated with the SM Offer. In this tutorial, we use Forex Signals as product name, which is I linked with the Offer #11 earlier.
6) Billing address. This part is optional.
7) Click on Create payment button.
When a test payment is completed, you’ll see it on the Payment list.
Usually, it appears as two transactions. One as “Capture” and another as “Authorization”.
Because it was a test purchase submitted through the CKO Sandbox Account, I wasn’t redirected to a “Thank You” page.
After a successful purchase, CKO sends a Webhook notification to Signal Magician, which in our case, triggers Offer #11.
Look at the “Last Webhook call” column. Now it says that a Webhook called this particular Offer.
A triggered Offer sends a Welcome email message and additional emails with License Keys (if you have any included in the Offer and if your Signal Magician has EA Licensing module).
We can see those email messages in the “Email History” menu on the left.
Also, notice the “Send again?” link in the column on the right side of the page. Using this link, you can re-send any email from the list.
The same Welcome email is sent to the inbox of the email address I used during the test purchase.
The Welcome email message from the Signal Magician system contains URL and login information to the member’s area so that the user can access his purchases.
It also includes information for the Client EA which is necessary for copying trades to MT4 account because this particular Offer triggered by product name Forex Signals included subscriptions for three Signal Providers.
If an Offer does not include subscriptions for Signal Providers, then Client EA information would not be included in the Welcome email.
Log in as a new customer to see the member’s area
We use the login information of the newly created username to access the member area.
It is to show you how customers will see it.
You might need to logout from your Signal Magician account first.
On the Welcome page, we see some important information and the next steps to take to start receiving trading signals from Signal Providers.
Also, there’s a download link to the Client EA software, which also includes installation instructions.
On top of the page, there’s a notice that the Client EA is not yet activated. It is recommended to leave the activation task to the customer so that they take action before receiving trading signals to their MT4.
To activate the Client EA, the user must open the “Profile” page and navigate to the “Connect Your MT4 Account” section. Then, the user must agree with the Terms and Conditions and click the “Activate EA” button.
Once EA is activated, it can be attached to the MT4 account and start receiving trading signals.
Log in back as admin
Now let’s log in again as “admin” to find this new username.
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.
The expiry date is 1-month + 3 days in the future.
Your 3rd party sales platform should charge the user’s account after 1-month through Checkout.com. If it’s a success, then CKO will send a Webhook to Signal Magician, and the expiry date will be extended. This way, the user will continue using services without interruption.
If the next payment doesn’t happen for any reason after one month, then after an additional three days, the customer will lose access to the service.
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).
Refunding purchases on Checkout.com and how it affects user services on Signal Magician
Let’s experiment before we process the refund on Checkout.com.
It will help you to understand better how Offers work.
As you already know, Offers can have multiple services, and numerous product names (Plan ID) assigned. It is how Signal Magician knows which Offer each Plan ID triggers and what services must be created for the user.
For this experiment, we’ll edit the Offer with the product name Forex Signals and then process a refund for this particular subscription.
I open the Offers page and click on the “Edit” icon next to the Offer #11 which has a Forex Signals product assigned.
Change the list of Signal Providers.
For this experiment, I’ve removed SPID 12.
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 Offers or even new products/pricing plans on your sales platform if required instead of modifying existing Offers when there are already products and services activated through those Offers.
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 from the Offer. It means the Offer will not touch this service as well as those created manually (if any).
Go to “Payments” from the left menu in your CKO account and locate my recent test purchase. I click on that transaction and then click on the Refund button.
When the CKO process refund, it will also send a Webhook notification to Signal Magician, which will trigger Offer #11 and do the necessary.
Open the “Signal Providers” section to see that after the refund, the Offer #11 disabled Signal Providers by ID 7 and 2. It is because these particular SPIDs are still added to the Offer.
We’ve removed SPID 12 from the Offer before the refund, so it was not disabled.
Have you learned how to connect Checkout.com with Signal Magician and make a test purchase already?
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.