PrestaShop module settings
Every setting of the Pay.com module for PrestaShop, with its default.
The settings are under Payment → Pay.com in the back office, which Configure on the module also opens. In multistore, pick All shops in the shop selector to set the defaults, or one shop to give it settings and a Pay.com account of its own. The page shows which one it's saving for.
Pay.com account
The Pay.com account card lists the shop's two environments, Live and Sandbox, with the key's last four characters and the webhook's signing secret for each. It also shows the Webhook URL to send events to.
| Setting | Description |
|---|---|
| API key | Under API keys and webhook secrets, paste an sk-pay-com-sandbox- key on the Sandbox row and an sk-pay-com-live- key on the Live row from the Pay.com dashboard, then click Save. The key is checked with Pay.com before it's saved, stored encrypted, and never shown again. An empty field keeps the saved key. |
| Webhook signing secret | On the same row, enter the signing secret of the webhook you added in the Pay.com dashboard for the environment, which sends events to the Webhook URL. When you replace it, the secret it replaces keeps verifying events for 24 hours. |
| Disconnect | Removes the environment's key from the shop. The key still works at Pay.com until you delete it in the Pay.com dashboard. |
When the environment Mode picks has no key, the top of the page, Your payment methods, and the Apple Pay domain card say which key to enter under API keys and webhook secrets, for example "Mode is set to Sandbox, but only a live API key is saved. Enter your sandbox API key under API keys and webhook secrets, or set Mode to Live." With no key saved at all, they say "Enter your Pay.com API key under API keys and webhook secrets first."
Settings
These settings pick the environment and control capture, saved cards, the order reference, and logging:
| Setting | Type | Default | Description |
|---|---|---|---|
| Mode | Select | Sandbox (test payments) | Sandbox (test payments) takes payments in your Pay.com sandbox with the sandbox key, through https://api.sandbox.pay.com/v1. Live takes live payments with the live key, through https://api.pay.com/v1. Live needs a live key and the shop on HTTPS. |
| Capture | Select | Capture the payment when the order is placed | Capture the payment when the order is placed charges at checkout. Authorize only: capture from the order page or when it ships places an authorization. Capture it with Capture in the order page's Pay.com block before it expires. |
| Capture an authorized order when it is marked shipped | Checkbox | Off | With Authorize only, moving an authorized order to a shipped state captures the authorization first. See Capture when the order ships. |
| Signed-in customers can save cards | Checkbox | On | Signed-in customers pay with their saved cards at checkout, and add or delete cards under My account → Saved cards, where adding a card charges nothing. With Pay.com's form, customers can also choose to save the card when they pay. Card fields don't ask, so they never save a card at checkout. Saved cards tells a customer who has none how to add one with the payment form you picked. Guests never save cards. Cards saved in the sandbox are offered only in the sandbox. |
| Reference prefix (for a Pay.com account shared by several shops) | Text | Empty | Shown in the Pay.com dashboard before PrestaShop's order reference. Use a different prefix on each shop that shares a Pay.com account. Up to 16 letters, digits, hyphens, and underscores. |
| Debug log | Checkbox | Off | Also logs what the module does to var/logs/pay_com_payments-*.log. Card data and secrets are never logged. |
Checkout
These settings control the payment form and how payment methods show at checkout:
| Setting | Type | Default | Description |
|---|---|---|---|
| Payment form | Select | Card fields in the checkout's own style, with your payment methods listed | Card fields in the checkout's own style, with your payment methods listed, the default, takes the card in secure Pay.com fields that look like your checkout's own inputs, next to your shop's list of payment methods. Pay.com's form (cards, wallets and local methods) shows Pay.com's own form, with every payment method in it. |
| Payment methods at checkout | Select | Each payment method is its own option | With card fields. Each payment method is its own option shows the card's option, an option for each payment method of your Pay.com account, and Other payment methods for the methods without an option of their own. Apart from the card's, an option shows only when Pay.com offers its method for the order. One option, with the payment methods listed inside it shows a single option that lists them. |
| Options at checkout | Checkboxes | All on | When each payment method is its own option, displays a checkbox for Apple Pay, Google Pay, each payment method on your Pay.com account, and Other payment methods. An unchecked method never shows at checkout, not even under Other payment methods. The card's option can't be turned off. |
| Offer Apple Pay and Google Pay as payment methods | Checkbox | On | With card fields. Lists Apple Pay and Google Pay among the payment methods, as options of their own or in the one option's list. A wallet shows only when the customer's browser can pay with it. When a customer selects one, its button takes the place of Place order and pays with the details they entered at checkout. When it's off, card fields show no wallets. |
| Card option title | Text | Credit or debit card | The name of the card's option when each payment method is its own option. Up to 128 characters. |
| Payment option title | Text | Pay by card or wallet | The payment option's name when the payment methods are listed in one option, or with Pay.com's form. Up to 128 characters. |
The checkout falls back to Pay.com's form if card fields aren't available or don't support any of the order's payment methods. With card fields, a payment method that requires additional details (such as a bank or code) shows inputs for them. Payment methods that require unsupported custom fields are omitted from checkout.
To disable a payment method across your store, turn it off in the Pay.com dashboard, then click Refresh under Your payment methods. The names of generic methods, such as Other payment methods, are the module's translations. Change them under International → Translations.
Your payment methods
Your payment methods lists the payment methods your Pay.com account offers, in the environment Mode picks, and when they were read. When each payment method is its own option, each one gets an option at checkout, shown when Pay.com offers it for the order. Apple Pay and Google Pay show when your account has them set up.
After you change your methods in the Pay.com dashboard, click Refresh. The list is also read when you save a key or switch Mode to an environment it wasn't read for, and again once a day. If a read fails, the page says why and keeps the last list. Until the list is first read, the methods other than the card, Apple Pay, and Google Pay show under Other payment methods.
Express checkout
These settings place Apple Pay and Google Pay buttons that pay without the checkout's steps. The wallets that show are the ones your Pay.com account offers.
| Setting | Default | Description |
|---|---|---|
| Apple Pay and Google Pay on product pages | On | Customers buy one product without leaving its page. Their cart stays as it was. |
| Apple Pay and Google Pay on the cart page | On | Pays for the whole cart. |
| Apple Pay and Google Pay in the added-to-cart window | On | Pays for the whole cart, from the window that opens when a product is added to it. |
| Apple Pay and Google Pay buttons at the top of the checkout page | On | Pays for the whole cart, from the checkout's first step, above the customer's details. The wallet gives the customer's email, addresses, and, when you made it required, phone number, and the order is placed from them. A signed-in customer starts past this step, so they see the buttons only when they go back to it. |
The buttons hide when a wallet can't supply information the order requires, such as for visitors who aren't signed in when guest checkout is off, when required fields aren't provided by wallets (company, VAT number, identification number, or birthday), in catalog mode, or for products that can't be ordered or need customization. With terms of service turned on, the customer selects a checkbox next to the buttons first.
Apple Pay domain
The Apple Pay domain card shows the shop's domain and, for each environment with a key, whether it's registered with Pay.com. If it isn't, the Apple Pay button doesn't show on that domain. Click Register domain. Apple checks the domain association file the module serves, so the shop must be on HTTPS at the root of its domain. The card warns you when it isn't, or when something else is served at the file's address.
Cron
The Cron card shows when the module's cron last ran, with its URL and token. The cron processes webhooks that wait or need a retry, checks unpaid and authorized orders with Pay.com every 15 minutes, and reads your payment methods again once a day. Run it every minute, or every few minutes, in one of these ways:
- Use PrestaShop's Cron tasks manager module to run the module's task.
- Add a crontab line that posts to the cron URL with the token in the
X-Pay-Com-Cron-Tokenheader, as shown on the card. - Run
php modules/pay_com_payments/bin/cron.phpdirectly on the server.
Without one, storefront visits run it at most every five minutes. The token goes in a header or the POST body, never in the URL.