Payments and refunds
This chapter shows what your customers see at checkout in each payment mode, how orders are confirmed, and how to send a Swish refund from the order list.
Paying in QR mode
- The customer chooses Swish in the checkout. The payment step shows a Swish QR code next to the Scan QR Code Message text.
- On a computer, the customer opens the Swish app on the phone and scans the code. On a phone, the customer taps the code, which opens the Swish app with the payment ready.
- The customer approves the payment in the Swish app.
- The checkout page checks the payment every two seconds. As soon as Swish reports it as paid, the customer is taken to the order success page.
If the customer declines the payment, a new QR code is generated so the customer can try again. The payment request sent to Swish carries the name of your store's domain and the order number.
Paying in phone number mode
- The customer chooses Swish in the checkout. The payment step shows a phone number field, filled in with the phone number of guest customers.
- The customer checks the number and presses the confirm button.
- A waiting window opens with the Instructions title text and a link to open the Swish app. The payment request appears in the Swish app on that phone.
- The customer approves the payment in the app. When Swish reports it as paid, the customer is taken to the order success page.
The phone number may be typed with spaces, hyphens or a plus sign. A Swedish mobile number starting with 0, such as 0701234567, or the same number with the country code 46, is accepted. Any other format shows the Phone error in format message.
If the customer declines the payment, the window closes and the Error message in denied payment text is shown. Other answers from Swish, such as a timeout, are shown with the Swish error code and message.
How the order is confirmed
When the payment is paid, Swish sends a notification to your store. The extension then:
- moves the order to the Order status completed you chose, which adds it to the order history and sends the usual OpenCart order e-mail;
- saves the Swish payment reference, which is needed later for refunds;
- replaces the telephone of the order with the Swish number that paid it.
If the notification does not come from the Swish server address, for example because it passes through a proxy, the extension asks Swish for the payment before confirming the order. Swish sends its notifications only to HTTPS addresses, which is why your store needs a valid HTTPS certificate.
Sending a refund
The order list in Sales > Orders shows a Swish Refund button for orders that were paid with Swish and whose status allows a refund (see the Refunds section of Settings).
On OpenCart 2.x and 3.x:
- In the order list, press Swish Refund for the order. On OpenCart 3.x the button is in the drop-down menu of the order's action buttons.
- A window titled Swish refund for order #… opens. The field Amount to refund: is filled in with the amount the customer paid, in SEK. Change it if you refund only part of the order.
- Press Accept.
When Swish accepts the request, the page reloads with a message confirming that the refund was initiated, with the Swish transaction link and ID, and the order moves to the Initial order status. On OpenCart 2.1 and 2.2 the page reloads without this message; the order status shows that the refund started.
On OpenCart 1.5:
- In the order list, press Swish Refund for the order.
- A box asks for the Amount to refund (SEK), filled in with the amount the customer paid. Change it if you refund only part of the order, and press OK.
- Confirm the refund in the next box. Nothing is sent to Swish if you press Cancel in either box.
When Swish accepts the request, the order moves to the Initial order status.
Refund statuses
After the refund starts, Swish sends notifications to your store, and the order status follows them:
| Swish reports | The order moves to |
|---|---|
| The amount has been debited from your Swish account | DEBITED order status |
| The refund has been paid to the customer | PAID order status |
| The refund could not be completed | ERROR order status |
An order with the ERROR order status shows the Swish Refund button again, so you can retry once the cause is fixed.
Before your first refund
- Swish refunds are made only in Swedish krona (SEK). If an order was placed in another currency, the refund is refused with the message Order #… was placed in … Swish refunds can only be made in Swedish krona (SEK)…; refund that order through your bank.
- The refund is made from your Swish number, so refunds must be possible on your Swish agreement. Ask your bank if you are not sure.
- The extension records the order status changes itself, in the order history with the comment Swish refund and without notifying the customer. No OpenCart API user or IP setting is needed.
- An order can be refunded from OpenCart only if its Swish payment reference was saved when the payment was confirmed. Otherwise the message Payment reference not found appears; refund that order with the tools of your bank or Swish.
Still need help?
Open a support ticket from your account and our team will look at your store with you.