Set up the Magento module
Install the Pay.com module in your Magento 2 or Adobe Commerce store, connect it to your Pay.com account, and take a test payment.
The Pay.com module for Magento 2 and Adobe Commerce adds Pay.com as a payment method at your store's checkout. Install it, connect it to your Pay.com account, and take a test payment in the sandbox. What the module does once it's running is in Magento module.
Requirements
The module works with Magento's Luma checkout. Storefronts on Magento's GraphQL, such as PWA Studio, also need its GraphQL module. See Headless storefronts.
| Requirement | Version |
|---|---|
| Magento Open Source or Adobe Commerce | 2.4.7 or later (tested on 2.4.7-p10 and 2.4.8-p5) |
| PHP | 8.2, 8.3, or 8.4 |
| Module | 0.1.0 |
Install and connect
You connect the module with an API key, created in the Pay.com dashboard, for each environment you use.
- 1
Install the module
The module comes as a Composer package,
pay-com-magento2-payments-0.1.0.zip. Put it in a folder of your Magento project, such aspackages/pay-com, add that folder to Composer as an artifact repository, then require the package and run Magento's setup:composer config repositories.pay-com artifact ./packages/pay-com composer require pay-com/magento2-payments:0.1.0 bin/magento module:enable PayCom_Payments bin/magento setup:upgrade bin/magento setup:di:compile bin/magento cache:flushFor a GraphQL storefront, put
pay-com-magento2-payments-graphql-0.1.0.zipin the same folder and requirepay-com/magento2-payments-graphql:0.1.0as well. - 2
Enter your API keys
Go to Stores → Configuration → Sales → Payment Methods → Pay.com, on the default scope or a website. Paste an
sk-pay-com-sandbox-key you created in the Pay.com dashboard into Sandbox API key, and ansk-pay-com-live-key into Live API key when you take live payments. Each key is checked with Pay.com when you save, and the store then reads the payment methods your account offers. Set Enabled to Yes. See Settings. - 3
Add the webhook
In the Pay.com dashboard, add a webhook that sends events to the Webhook URL shown in the account block, then paste its signing secret into Sandbox webhook signing secret or Live webhook signing secret. Do this for each environment you use, and subscribe to the 12 plugin webhook events.
- 4
Check that cron runs
On Magento's cron, the module checks open payments with Pay.com every 15 minutes, retries webhooks it couldn't process at first, and reads your account's payment methods once a day. Make sure the store's cron runs.
- 5
Take a test payment
Payments is set to Sandbox (test payments) by default, so the store takes payments in the sandbox. Place an order with a test card, then set Payments to Live to take live payments.
Next steps
- Apple Pay: Register your store's domain to show the Apple Pay button.
- Magento module: What the module supports, how orders stay in sync with Pay.com, and the data the module sends.
- Settings: Every setting with its default.