From downloading the plugin to requesting your first test payment, learn how to get started with the Checkout.com for Magento 2 plugin.
This guide assumes that you have Magento (the plugin is compatible with version 2.2.8 and above) installed. You will also need to be on a dedicated server, or have the enterprise version of Magento, to use this plugin.
Magento 2 storefront integration
If you're building a storefront on top of a headless Magento 2 backend, install our Magento 2 plugin as set out below, and then follow this guide.
- Manual capture, void, and refund from the Hub and the Magento Admin panel
- Saved cards (stored credit cards)
- Invoice generation
- 3D Secure 2.0
- MOTO payments
- Custom order statuses
- Webhook notifications for up-to-date payment statuses
- Dynamic descriptors
- Multi-store support
- Apple Pay fast checkout from the mini cart
Before you start
Create a test account
If you haven't already, create a test Checkout.com account.
Get your API keys
To set up our Magento 2 plugin, you'll need 3 API keys: a secret one, a public one, and a private shared one. The first 2 are generated automatically upon account creation. The last one is generated when you create a webhook for your business.
Webhooks are notifications that we send when an event occurs on your account (for example, when a payment is captured). These are used by the Magento plugin to update the status of an order. Read more about webhooks.
- Sign in to your test account on the Hub sandbox.
- In the left menu, go to Settings > Channels, and make a note of your secret and public API keys.
Create a webhook
- Scroll down to the Webhooks section of the page and select New webhook.
- Enter the following URL, replacing
example.comwith the URL of your shop:
example.com/checkout_com/webhook/callback. (A webhook URL specific to your installation is available in the Account Settings section of the plugin configuration panel.)
- Select API - v2.0.
- Select Select all, then select Create webhook.
- Select the webhook you just created, and make a note of the private shared API key.
You can configure a webhook with the default settings directly in the Magento Admin Panel account settings.
There are 2 ways to install the plugin:
We recommend this method, as it should install the latest version of the plugin.
- Go to the root directory of your Magento 2 server.
- Use one of the following commands:
composer require checkoutcom/magento2
composer require checkoutcom/magento2:<VERSION_NUMBER>
- You should get a success message confirming the installation of the Checkout.com PHP SDK and our plugin.
- The plugin is now installed, but you need to recompile your Magento 2 installation and clear the cache before configuring it. Type the following commands in order:
php bin/magento setup:upgrade
rm -rf var/cache var/generation/ var/di
php bin/magento setup:di:compile
php bin magento cache:clean
Using Magento Marketplace
- Install our free plugin from Magento Marketplace.
- Follow the installation instructions on the checkout page.
- Once you've installed the extension, sign in to your Magento Admin Panel and go to Stores > Configuration > Sales > Payment Methods. If successful, you should now see Checkout.com on the list.
You're now ready to configure the Magento 2 plugin.
Configure the plugin
- Sign in to your Magento Admin Panel and go to Stores > Configuration > Sales > Payment Methods.
- Find the Checkout.com plugin and select Configure.
- In the configuration panel, go to Configuration > Global Settings.
- Make sure Environment is set to Test so you can start testing card payments.
- Select the Payment Action:
- The Authorize and Capture option means that the charge is authorized and captured (that is, the money due from the customer's account is moved into your account) at the same time.
- The Authorize option will only authorize the charge. You'll have to capture the payment manually.
If you're unsure, Authorize and Capture is likely the right choice.
- In the configuration panel, go to Configuration > Account Settings.
- Set Service to ABC.
- Enter your Secret Key and Public Key. If you're testing, make sure you use the API keys from your sandbox Hub account.
- Select Set Webhooks to automatically register your webhooks in the Checkout.com Hub.
- Select Save Config.
That's it! You're ready to start testing card payments.
Test your integration
Go to your storefront and add a product to your cart.
Go to your cart and proceed to checkout.
Enter the required billing details. We recommend using a real email address so you can receive the order confirmation.
Select Pay by Card with Checkout.com.
Enter the following card details:
4242 4242 4242 4242
- Expiry date: any future date
Select Place order. You'll be redirected to the order confirmation page. If you entered a real email address in the billing details, you'll also receive an order confirmation email.
Sign in to your Magento Admin Panel.
Go to Sales > Orders. Your test order will be displayed there with a
Pending Paymentif you chose the Authorize payment action). This indicates that the payment has been successfully captured. The transaction will also appear in the Payments section of your sandbox Hub account.
If the test payment does not work, first check you have configured your webhooks correctly. If you have configured them properly, check your server. If the server is password-protected or it restricts unfamiliar IP addresses, it may be blocking webhook notifications. Contact our Support team at email@example.com if you need help.
You'll find more test cards and a range of scenarios to trigger in our testing guide.
If you're happy with the outcome of your testing and want to start taking payments right away, please contact our Sales team in order to move to a live account.
Before you go live, remember to:
- Switch the Environment to Production in the plugin's settings.
- Update your public, secret and private shared API keys in the plugin's settings with the keys from your live Hub account.
- Configure the webhook URLs in your live Hub account.