Refund Request
Last updated: 2026-03-25
POST
/in-store/api/v1/refundRefund a completed transaction
Request Body
amountnumberrequiredRefund amount as a decimal number. Must be less than or equal to the original transaction amount.
currencyCodeintegerrequiredISO 4217 numeric currency code. Must match the currency of the original transaction (e.g. 752 for SEK, 978 for EUR).
terminalIdstringrequiredThe ID of the terminal to process the refund on.
transactionIdstringoptionalThe transaction ID of the original purchase to refund.
paymentMethodstringrequiredPayment method could be either Swish,Klarna,Vipps or null (null , If its a card payment)
HTTP Status Code Summary
| Code | Description |
|---|---|
| 201 | Refund request created and sent to terminal. |
| 400 | Bad request. Check all required fields are present and valid. |
| 401 | Unauthorized. Ensure your bearer token and subscription key are valid. |
| 409 | Conflict. A transaction with the provided reference already exists. |
| 422 | Unprocessable entity. The terminal may be busy or the transaction is not eligible for refund. |
Request
cURL
1curl -X 'POST' \
2 'https://demo-api.westpay.se/in-store/api/v1/refund' \
3 -H 'accept: application/json' \
4 -H 'Ocp-Apim-Subscription-Key: <merchant-subscription-key>' \
5 -H 'Authorization: Bearer <access-token>' \
6 -H 'Content-Type: application/json' \
7 -d '{
8 "amount": 50.00,
9 "currencyCode": 752,
10 "terminalId": "<your-terminal-id>",
11 "transactionId": "800040000262",
12 "paymentMethod": ""
13}'Response
Response
1{
2 "onlineAPIRefId": "23179040000954"
3}