Cancel Payment Request

Last updated: 2026-03-25

POST
/in-store/api/v1/cancel

Cancel a pending or in-progress payment transaction

Request Body

terminalIdstringrequired

The ID of the terminal where the transaction is in progress.

HTTP Status Code Summary

CodeDescription
201Cancel request created and sent to terminal.
400Bad request. Check that terminalId is provided and valid.
401Unauthorized. Ensure your bearer token and subscription key are valid.
409Conflict. The terminal is not in a cancellable state.
422Unprocessable entity. The transaction may already be completed or cancelled.
Request
cURL
1curl -X 'POST' \
2  'https://demo-api.westpay.se/in-store/api/v1/cancel' \
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  "terminalId": "<your-terminal-id>"
9}'
Response
Response
1{
2  "onlineAPIRefId": "23179040000954"
3}