Refund Request

Last updated: 2026-03-25

POST
/in-store/api/v1/refund

Refund a completed transaction

Request Body

amountnumberrequired

Refund amount as a decimal number. Must be less than or equal to the original transaction amount.

currencyCodeintegerrequired

ISO 4217 numeric currency code. Must match the currency of the original transaction (e.g. 752 for SEK, 978 for EUR).

terminalIdstringrequired

The ID of the terminal to process the refund on.

transactionIdstringoptional

The transaction ID of the original purchase to refund.

paymentMethodstringrequired

Payment method could be either Swish,Klarna,Vipps or null (null , If its a card payment)

HTTP Status Code Summary

CodeDescription
201Refund request created and sent to terminal.
400Bad request. Check all required fields are present and valid.
401Unauthorized. Ensure your bearer token and subscription key are valid.
409Conflict. A transaction with the provided reference already exists.
422Unprocessable 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}