Test Your Integration

Once you've successfully implemented the Unified SDK in your ePOS application, the next step is to validate that your integration works as expected. This ensures both the technical correctness and merchant readiness of your setup before moving to production.

Pre-Testing Checklist

Before you begin testing your integration, ensure the following requirements are met:

  • The SDK is integrated correctly and compiles without errors.
  • Partner credentials (Client ID and Client Secret) are generated from the Teya Developer Portal (Dev Environment) and properly configured in your application.
  • The SDK is configured to route transactions to the development environment.
  • The Teya Payment App is installed and linked to a valid test merchant account. This can be done using a physical test card machine or an Android emulator.
  • Your app receives payment state updates - via the PaymentStateSubscription interface, or by collecting PaymentHandle.state in the coroutines API.
  • You have access to test cards provided through the Teya mock app to simulate various scenarios.

Testing Scenarios

Scenario Action Expected Result
Initialise the SDK Configure environment and credentials. SDK initialises without errors.
Authenticate Partner Authenticate using Device Code Flow. Valid token is retrieved and stored.
Pair Teya Payment App Ensure Teya app is installed and linked to test merchant. Merchant context is successfully recognised.
Initiate Payment Call makePayment with a valid amount. Card Machine shows Teya payment UI, payment completes successfully.
Subscribe to Status Subscribe to PaymentStateSubscription, or collect PaymentHandle.state, for updates. App receives real-time status updates (e.g., InProgress, Success).
Cancel In-Progress Call cancelPayment during InProgress. Payment is cancelled, status becomes Canceled.
Refund a Payment Use original transaction reference to issue refund. Refund succeeds and confirmation is received.
Add Tips in Payment Request from ePOS Include a tipAmount field when calling makePayment from the ePOS app. The tip is included in the total amount and processed by the SDK.
Add Tips in Payment from Card Machine Start payment without tips from ePOS; tips option enabled on card machine; customer adds tip. ePOS receives updated amount including tip and reflects it in transaction data.
Print Unified Receipt from ePOS Use ePOS print function to generate unified receipt including itemised and transaction data. Receipt prints correctly with both itemised and transaction data.