PTS - Payment Adjustments
Complete documentation to install, configure and use the PTS - Payment Adjustments module in your PrestaShop store.
What is PTS - Payment Adjustments?
PTS - Payment Adjustments is a module for PrestaShop that lets you add surcharges or discounts based on the payment method the customer chooses at checkout. Each rule is configured per currency, so you decide which adjustment applies depending on the order currency.
As soon as the customer chooses the payment method, the surcharge or discount is added to the cart total, before payment. This way, the payment gateway charges the final amount directly. In the cart summary the surcharge appears as a "Payment fee" line and the discount as "Payment discount", translated into the customer's language. The "Payment fee" line has its own image, does not show the buttons to remove it or change its quantity and, on PrestaShop 8 and 9, does not count as one more item in the cart.
- If the customer changes the cart after choosing the payment method (adds or removes products, changes quantities), the adjustment is recalculated automatically.
- If the cart goes more than one hour without changes, the adjustment expires and is removed; it is applied again when the customer chooses the payment method again.
- The pay button waits until the adjustment has been applied. If something fails, the customer sees a notice with a link to try again.
Main Features
Adjustments per Payment Method
Configure surcharges or discounts based on the payment method the customer chooses. The adjustment is added to the cart total before payment, so the gateway charges the final amount.
Configuration per Currency
Each currency has its own amount. If you leave it empty, the rule does not apply in that currency (empty is not the same as zero).
Calculation Modes
Choose between fixed amount or percentage to calculate the payment adjustment.
Advanced Conditions
Optionally limit each rule to certain customer groups and certain delivery countries.
Compatibility with other Modules
- PrestaShop native checkout and One Page Checkout PS v5: the adjustment is applied as soon as the customer chooses the payment method, and the pay button waits until it has been applied.
- PTS Stripe v5.1.2: the surcharge or discount is included in the amount Stripe charges.
- PTS Redsys: the surcharge or discount is included in the amount Redsys charges.
- Payment modules with several options: the rule is created per payment module and applies to all the options that module shows at checkout.
Express payment: the surcharge or discount is included in the express payment buttons (Google Pay and Apple Pay) of
PTS Stripe and
PTS Redsys, both in the cart and on the product page: the adjustment goes into the amount the payment module calculates for the wallet sheet and for the charge, and the order carries the adjustment as one more line. With the express payment of other modules the adjustment is not applied; if you use one,
write to us and we will review the compatibility.
System Requirements
| Requirement |
Minimum |
Recommended |
| PrestaShop |
1.7.6 |
9.x |
| PHP |
7.2 |
8.1+ |
Installation
There are two methods to install the module in your PrestaShop store, depending on your server characteristics.
Method 1: Installation from Back Office
1
Access the Back Office
Log in to your PrestaShop store administration panel.
2
Navigate to Modules
Go to Modules → Module Manager in the side menu.
3
Upload the module
Click on "Upload a module" and select the downloaded ZIP file.
4
Install and activate
Once uploaded, the module will be installed automatically. Click "Configure" to get started.
Method 2: Installation via FTP
Use this method if the ZIP file is too large and your server does not allow uploading it from the Back Office due to upload size limitations.
1
Decompress the ZIP file
Extract the ZIP file contents on your local computer.
2
Connect via FTP
Use an FTP client (such as FileZilla) to connect to your server.
3
Upload the module folder
Upload the module folder to /modules/ in your PrestaShop installation.
4
Install from Back Office
Go to Modules → Module Manager, search for the module and click "Install".
Possible Installation Issues
Override Conflicts: During module installation or activation, issues related to override files may arise. This happens when another module has already modified the same PrestaShop core files.
If you experience override errors when installing or activating the module, do not try to resolve it on your own if you do not have technical experience. Contact our support team to receive personalized assistance and safely resolve the conflict.
Contact Support
Configuration
Configure the general module options to control its behavior in your store.
General Options
These options are in the module's "General" tab.
Payment discount name
Name the customer sees for the payment method discount in the cart, the email and the invoice. There is one field per language: choose the language with the selector next to it. If you leave it empty, the default name is used: "Descuento de pago" in Spanish and "Payment discount" in any other language. The change applies to the discounts created from that moment on.
Debug mode
Lets you test the module before your customers see it. While it is active, payment adjustments only apply to the IP addresses entered in the "IP" field.
IP
Appears when debug mode is enabled. Enter the IP addresses that will see the payment adjustments; you can add several, separated by commas.
There is no general switch to turn the module on or off: each adjustment is enabled or disabled with its own switch in the list of the "Adjustments" tab (see Enable or disable an adjustment).
Since version 5.0.1 the panel no longer shows the "Enable module", "Show in checkout", "Show in order detail", "Show in invoice" or "Show in email" options. The adjustment is already one more order line and always appears in the cart summary, the confirmation email, the invoice, the customer's order detail and the order in the back office. "Enable module" is replaced by each adjustment's own switch.
Adjustments Management
In the "Adjustments" tab you create and manage payment adjustment rules: surcharges or discounts based on the payment method the customer chooses. For each rule, the list shows the "Payment Module", the "Adjustment Type", the "Calculation Mode", the "Status" and the "Actions".
Create an Adjustment
To create a new payment adjustment, follow these steps:
1
Access the Adjustments section
From the module panel, click on the "Adjustments" tab.
2
Click "Add Adjustment"
The button is in the top right corner of the list.
3
Configure basic data
Complete the following fields:
- Payment Module: the payment module this adjustment applies to. If the module offers several payment options (for example, card and other methods within the same module), the rule applies to all of them.
- Adjustment Type: "Fee" (a surcharge added to the total) or "Discount" (subtracted from the total).
- Calculation Mode: "Fixed" (a fixed amount) or "Percentage" (a percentage of the cart total; see How the adjustment is chosen and calculated).
- Active: enables or disables the adjustment.
4
Define amounts per currency
In the "Amounts by Currency" block, enter the amount or percentage for each active currency in your store. If you leave a field empty, the rule does not apply in that currency: empty is not the same as zero.
5
Set conditions (optional)
In the "Conditions" block you can choose:
- Customer Groups: the groups the adjustment applies to. The customer's default group is taken into account. Leave it empty to apply it to everyone.
- Countries: the countries where the adjustment applies. The country of the delivery address is taken into account. Leave it empty to apply it to all.
6
Save the adjustment
Click "Save".
Edit an Adjustment
To edit an existing adjustment:
- Open the module's "Adjustments" tab.
- Find the adjustment you want to edit in the list.
- Click the pencil icon in the "Actions" column.
- Make the necessary changes in the "Edit Adjustment" form.
- Click "Save".
Enable or disable an Adjustment
Each rule has a switch in the "Status" column of the list. It is the way to turn an adjustment on or off without deleting it: a disabled rule is no longer applied to the cart, and you can enable it again whenever you want. The same switch appears as "Active" inside the rule form.
Delete an Adjustment
To delete an adjustment:
- Open the module's "Adjustments" tab.
- Find the adjustment you want to delete in the list.
- Click the trash icon in the "Actions" column.
- Confirm the action in the dialog that appears.
Warning: deleting an adjustment is irreversible. If you only want to stop applying it for a while, disable it instead of deleting it.
How the Adjustment is chosen and calculated
Which rule counts if there are several
For each payment method only one rule counts: the oldest active one, that is, the first one created among those that are active. The panel does not let you change that order.
If that rule does not apply to the cart (because it has no amount in the cart currency or because the customer does not meet its conditions), no adjustment is applied: the module does not move on to the next rule for that method. That is why the most practical setup is a single active rule per payment method.
How the amount is calculated
- Fixed: the amount entered for the cart currency is added or subtracted.
- Percentage: calculated on the cart total including tax, after discounts and without shipping costs.
- If the amount for a currency is empty, the rule does not apply in that currency. Empty is not the same as zero.
- The surcharge includes tax: the module splits it among the tax rates of the products in the cart, in proportion to each one's share of the total. If you have questions about how the surcharge should be taxed in your country, check with your tax advisor.
How the conditions are checked
- Customer Groups: the customer's default group counts.
- Countries: the country of the delivery address counts. While the customer has no delivery address yet, the country condition is not checked.
What you will see in your Catalog
To make the adjustment part of the cart total, the module uses standard PrestaShop elements. It is normal to find them in the back office:
- Hidden "Payment fee" products: used for surcharges. There is one per tax rate and store. They are not shown in the store and you do not need to touch them; if they are deleted, the module creates them again when it needs them.
- Cart rules with code
PAYA_FEE_…: used for discounts, they appear in Catalog > Discounts. The module creates one for each cart and deletes it when the adjustment stops applying; you do not need to touch them.
Employee Permissions
The "Adjustments" tab follows each employee's profile permissions on the module's tab:
- Viewing the list of adjustments requires view permission.
- Creating an adjustment requires add permission.
- Editing it, or enabling and disabling it, requires edit permission.
- Deleting it requires delete permission.
This way, an employee with a read-only profile can view the rules but cannot create, change or delete them.
Translations
The module includes an integrated translation editor that allows you to customize all visible texts in the frontend in any active language in your store.
Edit Translations
1
Access the translation editor
From the module panel, click on the "Translation" tab.
2
Select the language
Select the language you want to edit from the dropdown selector.
3
Edit the translations
Modify the texts you want to customize. Texts are grouped by translation file.
4
Save the changes
Click "Save" to save the changes in the selected language.
Note: Some expressions use the %s syntax to insert dynamic values. Do not replace or modify this syntax, or the functionality will stop working correctly.
Available Actions
The translation editor offers the following actions:
Save
Saves the changes in the selected language
Save and download
Saves and downloads the translation file
Share with Us
Send your translation to the PresTeamShop team
Code Editors
The module includes code editors to customize the CSS styles and JavaScript applied in the frontend. This allows you to adjust the appearance and behavior of the module without directly modifying the module files.
Caution: Changes to CSS and JavaScript can affect the module's operation. If you do not have technical knowledge, consult with your developer before making changes.
CSS Editor
The CSS editor allows you to override or add custom styles that will be loaded in the frontend. Changes are stored in the module configuration and applied automatically.
To edit CSS styles:
- Access the "Code Editors" tab in the module panel.
- Modify the CSS code in the corresponding editor.
- Click "Save" to save the changes.
- Styles will be applied immediately in the frontend.
JavaScript Editor
The JavaScript editor allows you to add custom JavaScript code that will be executed in the frontend. Useful for adding additional functionalities or modifying the module's behavior.
To edit JavaScript code:
- Access the "Code Editors" tab in the module panel.
- Modify the JavaScript code in the corresponding editor.
- Click "Save" to save the changes.
- The code will be executed automatically in the frontend.
Backups
The integrated backup system allows you to save and restore the complete module configuration, including:
- Configuration: All module configuration options.
- Database: All tables related to the module (adjustments, conditions, amounts).
- Files: Translation files and custom code (CSS/JS).
Generate Backup
To create a module backup:
- Access the "Backups" tab in the module panel.
- Click the "Generate new backup" button.
- The system will create a ZIP file with all module configuration and data.
- The backup will appear in the "Backups available" list.
It is recommended to create a backup before making significant changes to the module configuration or before updating to a new version.
Upload Backup
You can upload a previously downloaded backup to restore it in another installation:
- Access the "Backups" tab of the module.
- Click "Upload backup".
- Select the backup ZIP file.
- The system will upload the file and add it to the list of available backups.
Available Backups
In the "Backups available" section you will see all available backups with the following information:
- Date: Date and time the backup was created.
- MD5: MD5 hash of the file to verify its integrity.
- Filename: ZIP file name.
- Size: File size.
- Actions: Available actions (restore, download, delete).
Manage Backups
For each available backup, you can perform the following actions:
Restore backup
Restores the configuration and data
Download backup
Downloads the ZIP file
Delete backup
Deletes the backup
Caution: Restoring a backup will overwrite the current module configuration. This action cannot be undone.
To restore, click the "Restore Backup" button for the backup you want to recover and confirm the action in the dialog.
Support
If you need additional help or have any questions about the module, we are here to help you.