as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
AWS
Documentation
Support
Contact Us
My Cases
Docs
Resources
Ecommerce Plug-ins
Publish
Connect

Get Transactional Data Testing

Summary

While the test cases below outline key testing scenarios, it should be supplemented with your organization's established testing best practices to ensure comprehensive coverage of any use cases not explicitly included in this test plan.

1. Test Case: Successful Data Retrieval (200 Response)

Objective: Trigger successful EMV transactional data retrieval

{
  "storeId": "VALID_STORE_ID",
  "shoppingTripId": "valid-shopping-trip-uuid"
}

Expected Response:

{
  "brand": "VISA",
  "posEntryMode": "EMV_9F39_05",
  "currency": "USD",
  "authorizationResponseCode": "00",
  "cryptogramInformationData": "80",
  "tail": "1234",
  "panSequenceNumber": "01",
  "applicationId": "A0000000031010",
  "expirationDate": {
    "expirationYear": "2025",
    "expirationMonth": "12"
  },
  "cardholderVerificationMethodResult": "420300",
  "terminalId": "12345678",
  "reconciliationId": "ABC123456789",
  "cardStatementTransactionId": "TXN987654321"
}

2. Test Case: Unknown Shopping Trip (400 Error)

Objective: Trigger "UnknownShoppingTrip" error

{
  "storeId": "VALID_STORE_ID",
  "shoppingTripId": "invalid-shopping-trip-uuid"
}

Expected Response:

{
  "errorMsg": "UnknownShoppingTrip"
}

3. Test Case: Bad Request - Invalid Store ID (400 Error)

Objective: Trigger "BadRequestException" for invalid storeId format

{
  "storeId": "INVALID@STORE#ID",
  "shoppingTripId": "valid-shopping-trip-uuid"
}

Expected Response:

{
  "errorMsg": "BadRequestException"
}

4. Test Case: Bad Request - Missing Required Fields (400 Error)

Objective: Trigger "BadRequestException" for missing storeId

{
  "shoppingTripId": "valid-shopping-trip-uuid"
}

Expected Response:

{
  "errorMsg": "BadRequestException"
}

5. Test Case: Bad Request - Missing Shopping Trip ID (400 Error)

Objective: Trigger "BadRequestException" for missing shoppingTripId

{
  "storeId": "VALID_STORE_ID"
}

Expected Response:

{
  "errorMsg": "BadRequestException"
}

6. Test Case: Bad Request - Invalid Data Types (400 Error)

Objective: Trigger "BadRequestException" for incorrect data types

{
  "storeId": 12345,
  "shoppingTripId": true
}

Expected Response:

{
  "errorMsg": "BadRequestException"
}

7. Test Case: StoreId Format Validation (400 Error)

Objective: Test storeId pattern validation ^[0-9a-zA-Z_-]*$

{
  "storeId": "invalid@store#id!",
  "shoppingTripId": "valid-shopping-trip-uuid"
}

Expected Response:

{
  "errorMsg": "BadRequestException"
}

8. Test Case: ShoppingTripId Format Validation (400 Error)

Objective: Test shoppingTripId pattern validation ^[0-9a-zA-Z_-]+$

{
  "storeId": "VALID_STORE_ID",
  "shoppingTripId": "invalid@trip#id!"
}

Expected Response:

{
  "errorMsg": "BadRequestException"
}

9. Test Case: Field Length Validation (400 Error)

Objective: Test field length limits (> 255 characters)

{
  "storeId": "A".repeat(256),
  "shoppingTripId": "valid-shopping-trip-uuid"
}

Expected Response:

{
  "errorMsg": "BadRequestException"
}

10. Test Case: Rate Limiting (429 Error)

Objective: Trigger "Too Many Requests" error

Test Method: Send multiple rapid requests to exceed rate limit

Expected Response:

{
  "errorMsg": "Too Many Requests"
}

Headers: Retry-After: 600

11. Test Case: Server Error (500 Error)

Objective: Trigger "ServiceException"

Test Method: This typically occurs during server issues or unhandled exceptions

Expected Response:

{
  "errorMsg": "ServiceException"
}

12. Test Case: Service Unavailable (503 Error)

Objective: Trigger "ServiceUnavailableException"

Test Method: Send request during maintenance or service downtime

Expected Response:

{
  "errorMsg": "Service temporarily unavailable",
  "retryAfter": "300"
}

Edge Case Test Scenarios

13. Test Case: Empty String Values (400 Error)

Objective: Test empty string validation

{
  "storeId": "",
  "shoppingTripId": ""
}

14. Test Case: Null Values (400 Error)

Objective: Test null value handling

{
  "storeId": null,
  "shoppingTripId": null
}

15. Test Case: Whitespace Only Values (400 Error)

Objective: Test whitespace validation

{
  "storeId": "   ",
  "shoppingTripId": "   "
}

16. Test Case: Shopping Trip Without Transaction Data (200 Response)

Objective: Test valid trip but no EMV data available

{
  "storeId": "VALID_STORE_ID",
  "shoppingTripId": "valid-trip-no-emv-data"
}

Expected Response: May return partial data or empty fields for EMV-specific information

Response Data Validation Test Cases

17. Test Case: Verify All POS Entry Mode Enums

Objective: Ensure response contains valid posEntryMode enum values

Valid Values to Verify in Response:

  • "EMV_9F39_02" - Magnetic stripe read, CVV/CVC non-compliant
  • "EMV_9F39_05" - Chip card read via chip reader
  • "EMV_9F39_07" - Contactless reader
  • "EMV_9F39_80" - Chip fallback to magnetic stripe
  • "EMV_9F39_90" - Magnetic stripe read, full contents

18. Test Case: Verify Response Field Formats

Objective: Validate response field format compliance

Fields to Validate:

  • currency: ^[A-Z]{3}$ (e.g., "USD", "EUR")
  • cryptogramInformationData: ^[0-9A-F]*$ max 2 chars
  • tail: max 4 characters
  • panSequenceNumber: max 99 characters
  • applicationId: ^[0-9A-F]*$ max 32 chars
  • cardholderVerificationMethodResult: ^[0-9A-F]*$ max 6 chars
  • reconciliationId: ^[0-9a-zA-Z]*$ max 64 chars
  • cardStatementTransactionId: ^[0-9a-zA-Z]*$ max 64 chars

Test Execution Notes

  1. Rate Limiting: Use automated scripts to send 10+ rapid consecutive requests
  2. Field Validation: Test each validation rule individually
  3. Shopping Trip States: Use non-existent UUIDs for UnknownShoppingTrip errors
  4. EMV Data: Test with trips that have different payment methods (chip, contactless, magnetic stripe)
  5. Response Validation: Verify all response fields match documented patterns and lengths

Expected HTTP Status Codes Summary

  • 200: Successful data retrieval (returns EMV transaction data)
  • 400: Bad Request (validation errors, unknown trip, missing/invalid fields)
  • 429: Too Many Requests (rate limiting with Retry-After header)
  • 500: Internal Server Error (service exceptions)
  • 503: Service Unavailable (maintenance/downtime with retryAfter field)