Checkout and payments
What your customers see when they pay with Swish, how a payment moves through its states, and how to follow and reconcile payments in the back office.
What the customer sees
- At checkout the customer chooses Swish. Depending on Checkout method, a phone number field is shown, optional or required.
- The customer places the order. The module creates the order in your Pending order state and sends the payment request to Swish.
- The payment page shows the amount in SEK and the payment status:
- with a phone number, the customer approves the payment in the Swish app on that phone;
- without a phone number, the page shows a QR code to scan with the Swish app, and an Open Swish app button for customers who are already on their phone.
- The page checks the status by itself. The customer can also press Check payment, or Cancel payment to stop.
- When Swish confirms the payment, the order moves to your Paid order state and the page shows View order.
Phone numbers can be typed with or without the country code. For an invoice address in Sweden, a number starting with 0, such as 0701234567, is converted to the international format. Registered customers and guest checkout are both supported.
The customer may close the page: the order is confirmed only when Swish verifies the payment, whether the page is open or not. In the test environment the checkout and payment page show Official Swish test environment — no real payment.
How a payment is confirmed
The module never trusts the browser or the update message from Swish on its own. When Swish reports a payment, the module asks Swish directly for the payment and checks the merchant number, reference, amount and currency against the original request before marking the order paid. Repeated updates for the same payment never record it twice.
The payment reference sent to Swish is PS- followed by the shop ID and the cart ID, so you can find the order in your bank statements.
Payment states
| State | Meaning |
|---|---|
creating | The module is sending the request to Swish. |
pending | Swish has the request and is waiting for the customer. |
paid | Swish confirmed the payment and the order is in your paid status. |
failed | Swish reported an error. The order gets the cancelled status, or the status chosen for that error code in Bank error statuses. |
cancelled | The payment was cancelled. The order gets your cancelled status. |
review | Something does not match and the module stopped to let you check it, for example a different amount, or an order whose status was changed by hand in the meantime. |
Payments in review
A payment in review is not confirmed or rejected automatically. Do not change the order or ask the customer to pay again before you have checked the payment with your bank. Then use Reconcile with bank, described below, to update it.
The Payments and reconciliation tab
Buttons
| Control | What it does |
|---|---|
| Refresh payments | Shows the latest payments. |
| View audit log | Shows the log of payment events, such as requests, bank responses and status changes. |
| Instruction UUID and Reconcile with bank | Type the payment instruction of a payment and press the button to ask Swish for its current state and update the order. |
Filters and export
| Filter | What it does |
|---|---|
| Payment state | All states or one of the states above. |
| From date / To date | Date range of the payments. |
| Cart or transaction reference | A cart ID, payment instruction or the transaction reference from your bank. |
Press Apply filters. Above the list, a summary shows the number of payments and the total amount in SEK for each state. Previous page and Next page move through the results.
Export filtered CSV downloads the payments that match the filters. An export holds at most 1000 payments; if there are more, the module asks you to narrow the dates.
Columns
| Column | What it shows |
|---|---|
| Payment instruction | The module's identifier of the payment request. |
| Cart | The PrestaShop cart ID. |
| Amount / Currency | The amount and currency of the request. |
| Environment | Test or production. |
| State / Bank state | The module's state and the last state reported by Swish. |
| Transaction reference | The bank's reference of the payment. |
| Refunded / Available to refund | Amounts already refunded and still refundable. |
| Native orders | The PrestaShop order IDs. View order opens the order. |
| Error code | The Swish error code, if any. |
| Created / Updated | Dates. |
On paid payments with a balance, Prepare refund opens the Refunds tab with the payment and its balance filled in. See Refunds.
Reconciling from the command line
Swish sends payment updates to your shop at an address of the module. While new payments are disabled in the settings, that address keeps working. If the module itself is disabled in PrestaShop, or Swish cannot reach your shop, run the reconciliation task from the command line. It checks up to 100 open payments and refunds each time:
php /path/to/your/shop/modules/swishforhandle/cron.php --shop=1 --reconcileReplace /path/to/your/shop with your shop folder and 1 with your shop ID. Run it as the shop's PHP user, with the PHP version your shop uses. You can add it as a cron job in your hosting control panel, with one line per shop.
Still need help?
Open a support ticket from your account and our team will look at your store with you.