Retrieve Payment Request
Last updated: 2026-10-20
Transaction status values
| Value | Status | Final? |
|---|---|---|
0 | APPROVED | Yes |
1 | ABORTED_BY_CARDHOLDER | Yes |
2 | ABORTED_BY_CASHIER | Yes |
3 | TERMINAL_IS_BUSY | Yes |
4 | CARD_HAS_EXPIRED | Yes |
5 | INVALID_CARD | Yes |
6 | CARD_IS_BLOCKED | Yes |
7 | OFFLINE_QUEUE_IS_FULL | Yes |
8 | TECHNICAL_ERROR | Yes |
9 | TERMINAL_IS_OFFLINE | Yes for the current polling cycle; reconciliation may later find the terminal's actual financial result. |
10 | TERMINAL_MUST_UPDATE | Yes |
11 | TRANSACTION_DECLINED | Yes |
12 | WRONG_PIN | Yes |
13 | REVERSED | Yes |
14 | PENDING | No |
Polling and rate-limit guidance
- Store the
onlineAPIRefIdbefore 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 from0to13once. - 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, honorRetry-Afterwhen present. Otherwise use exponential backoff with jitter. Apply bounded backoff to retryable5xxresponses and network failures as well. - Do not retry non-throttling
4xxresponses 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.
/in-store/api/v1/transaction/{onlineAPIRefId}/statusRetrieve the status of a submitted transaction
Path Parameters
onlineAPIRefIdstringrequiredThe onlineAPIRefId returned when the purchase, refund, or reversal request was created.
HTTP Status Code Summary
| Code | Description |
|---|---|
| 200 | Transaction status retrieved successfully. |
| 400 | Bad request. Check that the onlineAPIRefId is provided and valid. |
| 401 | Unauthorized. Ensure your bearer token and subscription key are valid. |
| 409 | Conflict. |
| 422 | Unprocessable entity. The transaction reference could not be resolved. |
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>'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}