Skip to content
PrestaShop · User manual

Swish för handel for PrestaShop

Version 2.5.0 Product page
Chapter 7

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

  1. At checkout the customer chooses Swish. Depending on Checkout method, a phone number field is shown, optional or required.
  2. The customer places the order. The module creates the order in your Pending order state and sends the payment request to Swish.
  3. 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.
  4. The page checks the status by itself. The customer can also press Check payment, or Cancel payment to stop.
  5. 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

StateMeaning
creatingThe module is sending the request to Swish.
pendingSwish has the request and is waiting for the customer.
paidSwish confirmed the payment and the order is in your paid status.
failedSwish reported an error. The order gets the cancelled status, or the status chosen for that error code in Bank error statuses.
cancelledThe payment was cancelled. The order gets your cancelled status.
reviewSomething 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

ControlWhat it does
Refresh paymentsShows the latest payments.
View audit logShows the log of payment events, such as requests, bank responses and status changes.
Instruction UUID and Reconcile with bankType the payment instruction of a payment and press the button to ask Swish for its current state and update the order.

Filters and export

FilterWhat it does
Payment stateAll states or one of the states above.
From date / To dateDate range of the payments.
Cart or transaction referenceA 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

ColumnWhat it shows
Payment instructionThe module's identifier of the payment request.
CartThe PrestaShop cart ID.
Amount / CurrencyThe amount and currency of the request.
EnvironmentTest or production.
State / Bank stateThe module's state and the last state reported by Swish.
Transaction referenceThe bank's reference of the payment.
Refunded / Available to refundAmounts already refunded and still refundable.
Native ordersThe PrestaShop order IDs. View order opens the order.
Error codeThe Swish error code, if any.
Created / UpdatedDates.

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 --reconcile

Replace /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.