Retrieve Payment Request

Last updated: 2026-10-20

Transaction status values

ValueStatusFinal?
0APPROVEDYes
1ABORTED_BY_CARDHOLDERYes
2ABORTED_BY_CASHIERYes
3TERMINAL_IS_BUSYYes
4CARD_HAS_EXPIREDYes
5INVALID_CARDYes
6CARD_IS_BLOCKEDYes
7OFFLINE_QUEUE_IS_FULLYes
8TECHNICAL_ERRORYes
9TERMINAL_IS_OFFLINEYes for the current polling cycle; reconciliation may later find the terminal's actual financial result.
10TERMINAL_MUST_UPDATEYes
11TRANSACTION_DECLINEDYes
12WRONG_PINYes
13REVERSEDYes
14PENDINGNo

Polling and rate-limit guidance

  • Store the onlineAPIRefId before the first status request.
  • Use one polling loop per reference and wait 2 seconds between normal polls.
  • Continue only for PENDING (14). Stop polling and process any status from 0 to 13 once.
  • A UI timeout or network failure is an unknown outcome, not a declined transaction. Keep the reference for recovery.
  • If the API returns HTTP 429, honor Retry-After when present. Otherwise use exponential backoff with jitter. Apply bounded backoff to retryable 5xx responses and network failures as well.
  • Do not retry non-throttling 4xx responses without correcting the request or ECR state.

No single numeric request quota is published for every customer. The 2-second interval is recommended ECR behavior, not a guaranteed service limit. Confirm any customer-specific quota with Westpay and never use multiple concurrent pollers to accelerate a transaction.

If status 9 is returned after a terminal connectivity failure, keep the sale unresolved. After the terminal reconnects, use the Last Transaction flow to obtain its reference, then retrieve the status again and reconcile the actual result.

See Getting Started for a complete implementation example and the Integration Checklist for production acceptance requirements.

GET
/in-store/api/v1/transaction/{onlineAPIRefId}/status

Retrieve the status of a submitted transaction

Path Parameters

onlineAPIRefIdstringrequired

The onlineAPIRefId returned when the purchase, refund, or reversal request was created.

HTTP Status Code Summary

CodeDescription
200Transaction status retrieved successfully.
400Bad request. Check that the onlineAPIRefId is provided and valid.
401Unauthorized. Ensure your bearer token and subscription key are valid.
409Conflict.
422Unprocessable entity. The transaction reference could not be resolved.
Request
cURL
1curl -X 'GET' \
2  'https://demo-api.westpay.se/in-store/api/v1/transaction/23179040000954/status' \
3  -H 'accept: application/json' \
4  -H 'Ocp-Apim-Subscription-Key: <merchant-subscription-key>' \
5  -H 'Authorization: Bearer <access-token>'
Response
Response
1{
2  "transactionStatus": 0,
3  "transactionType": 1,
4  "onlineAPIRefId": "23179040000954",
5  "receiptData": {
6    "error": null,
7    "saleId": "SALE-001",
8    "transactionId": "23179040000954",
9    "terminalId": "60001001",
10    "terminalIdObscured": "6000****",
11    "currencyId": 752,
12    "totalAmount": 100.00,
13    "denialReason": null,
14    "transactionTime": "2023-06-30T10:05:00Z",
15    "cashBackAmount": null,
16    "tipAmount": null,
17    "surchargeAmount": 0,
18    "cardPaymentData": {
19      "approvalCode": "ABC123",
20      "authorisationMethod": "CHIP",
21      "authorisingEntity": null,
22      "responseCode": "00",
23      "financialInstitution": "Swedbank",
24      "cardName": "Visa",
25      "cardExpiryDate": "12/26",
26      "isContactless": false,
27      "cardholderObscuredPan": "************1234",
28      "merchantObscuredPan": "************1234",
29      "verificationMethod": "PIN",
30      "acquirerName": "Swedbank",
31      "acquirerReference": null,
32      "acquirerRefObscured": null,
33      "posEntryMode": "CHIP",
34      "debitCreditSelection": null,
35      "cardNumberAlias": null,
36      "loyaltyId": null,
37      "cardHolderString": null,
38      "paymentAccountReference": null,
39      "emvData": {
40        "aid": "A0000000031010",
41        "tvr": "0000000000",
42        "tsi": "E800",
43        "authResponseCode": "00",
44        "panSequenceNumber": 1
45      },
46      "dccData": null
47    },
48    "alternativePaymentData": null
49  },
50  "merchantData": {
51    "name": "Example Store",
52    "address": "123 Main St",
53    "city": "Stockholm",
54    "zipCode": "111 22",
55    "phoneNumber": "08-123456",
56    "helplineNumber": "020-123456",
57    "organisationNumber": "556123-4567"
58  }
59}