Cancel Payment Request
Last updated: 2026-03-25
POST
/in-store/api/v1/cancelCancel a pending or in-progress payment transaction
Request Body
terminalIdstringrequiredThe ID of the terminal where the transaction is in progress.
HTTP Status Code Summary
| Code | Description |
|---|---|
| 201 | Cancel request created and sent to terminal. |
| 400 | Bad request. Check that terminalId is provided and valid. |
| 401 | Unauthorized. Ensure your bearer token and subscription key are valid. |
| 409 | Conflict. The terminal is not in a cancellable state. |
| 422 | Unprocessable 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}