1. PayCube Lite
AXS Developer Hub
  • Getting Started
    • Overview
    • Account Setup
    • Merchant Branding
    • Payment Link
  • Checkout | Online Payment
    • Payment Link Integration
    • QR Code Integration
    • Card on File
    • Plugins
      • WooCommerce
      • PrestaShop
  • PayCube | Point of Sale
    • PayCube Pro & Mini
      • ECR Integration
      • Function & Response Codes
    • PayCube Lite
      • App-to-App Integration
  • Shared Resources
    • Transaction Query
    • Void and Refund
  • Appendix
    • Test Cards
    • Reserved Amounts
  1. PayCube Lite

App-to-App Integration

Context#

This developer guide provides a detailed technical overview of integrating an Android POS application with the AXS payment app (PayCube Lite).

Device Requirement#

Android 10+ (API level 29+/ Q/ Quince Tart).
Support Google Play Services (GMS).
For production app, it is required to be installed from Google Play Store.
The device must be able to receive security updates and has recent security patch level.
Supports of hardware backed key attestation.
Supports of NFC for Cards Payment.
Supports of light sensor.
Device must not be rooted.
Device must pass Android compatibility test.
Device bootloader must be locked.
The application must not be built in a way that allows extraction of native libraries from APKs during installation.
No hooking framework (e.g. Frida, Xposed) shall be installed on the device or bundled with the app.

Mechanism#

This integration uses the Android App-to-App mechanism. The POS application initiates a transaction by sending an Intent with specific data elements to the payment app. The payment app then takes control of the screen to process the transaction (e.g., card tapping). Once complete, control is returned to the POS application with the results.

Package & Class Constants#

Declare these constants once in your integration code:

AndroidManifest - Package Visibility (Android 11+)#

Android 11 (API 30) restricts cross-package visibility. Add the following <queries> block to your AndroidManifest.xml so your app can detect and bind to PayCube Lite:
<queries>
    <package android:name="com.axs.paycube.lite" />
</queries>

Checksum Algorithm#

Every request must include a checksum field according to requirements below:
1.
Collect the recognised parameter keys for the given transType that are present in your request (exclude the checksum key itself).
2.
Sort those keys lexically (A→Z).
3.
Concatenate the corresponding string values in that order (no separator).
4.
MD5-hash the UTF-8 bytes of the concatenated string.
5.
Format the hash as a lowercase hex string — that is your checksum.
transTypeKeys included in checksum (sorted lexically)
SALEamount, currencyCode, merchantRemarks (if present), posReference, scheme, transType
VOIDposReference, transType
QUERYposReference, transType
INITactivationCode, transType
INFO
Only keys that are present in the bundle/message are included. If an optional key is absent, it is skipped rather than treated as an empty string.

Activity Intent#

Launch PayCube Lite's MainActivity for UI-driven payment flows. Your app receives the result via onActivityResult / ActivityResultLauncher.
This is applicable to SALE payment flow only.

Step 1: Verify PayCube Lite is Installed#

Step 2: Declare ActivityResultLauncher#

Register the launcher inside your Activity (before onCreate completes):
INFO
Both success and error responses are returned as RESULT_OK with a JSON string in the result extra. Check the status field in the JSON to determine the outcome — a status of "ERROR" indicates a failure.

SALE#

Request parameters:#

ParametersRequiredExampleRemarks
transTypeSALETo trigger AXS payment app for payment
schemeCARDOptions of schemes: CARD,QR,ALIPAY,WECHAT,PAYNOW
amount10Amount in cent.
Example: 10 = $0.10
currencyCodeSGDISO 4217 currency codes
posReference12345POS' unique identifier for the transaction
merchantRemarksMerchant Ref-1POS' merchant reference for the transaction

Present only for CARD payment.
checksum9e107d9d372bb682…MD5 checksum value
Sample Request Data
INFO
Checksum walk through:
with merchantRemarks:
Keys (sorted): amount, currencyCode, merchantRemarks, posReference, scheme, transType
Concatenated:  2550SGDTable 5ORD-20260701-001CARDSALE

without merchantRemarks:
Keys (sorted): amount, currencyCode, posReference, scheme, transType
Concatenated:  2550SGDORD-20260701-001CARDSALE
Sample Codes

Response Parameters#

ParametersRequiredExampleRemarks
transTypeSALEEcho from request
transactionId12345For AXS PayCube Lite:
Unique transaction ID returned from AXS payment gateway for each transaction

For AXS PayCube Pro (Castle): Echo from request (posReference)

Always use this value for future QUERY or VOID action
transactionReferenceM67890For AXS PayCube Lite:
A unique reference ID for merchant to reconcile the record against Transaction Reference in AXS Merchant Portal

For AXS PayCube Pro (Castle):
Echo from request (posReference)
statusSUCCESSStatus of the transaction.
SUCCESS, DECLINED, ERROR
errorCodeOptional, code is present only if the status is ERROR
errorHeaderOptional, header is present only if the status is ERROR
errorDescriptionConnection timeoutOptional, description is present only if the status is ERROR
schemeVISAPayment scheme. Available values:
VISA, MASTERCARD, UNIONPAY, AMEX, PAYNOW, WECHAT, ALIPAY
responseCode00Present only for CARD payment.
Refer to gateway response code for more details
tid10004657Terminal ID
mid100023987253Unique Merchant ID assigned by AXS
approvalCode831000Gateway approval code. Present only for CARD payment.
transDateTimeYYYY-MM-DDTHH:mm:ssZTransaction timestamp ISO-8601 UTC
retrievalReferenceNumber611204599707Gateway RRN. Present only for CARD payment.
amount10Echo from request
currencyCodeSGDEcho from request
Sample Response Data

Bound Service (IPC)#

Bind to SoftPosBackgroundService and exchange structured messages via Android Messenger. Supports INIT, VOID, and QUERY without launching a UI.

Step 1: Bind to SoftPosBackgroundService#

Use an explicit ComponentName targeting the service class directly. Do not rely on an intent-action filter.

Step 2: Send a Message#

Standard Response Parameters#

All the following functions in this section are having standard response parameters.
ParametersRequiredExampleRemarks
transTypeVOIDType of the transaction for the record:
INIT, VOID, QUERY
transactionId12345For AXS PayCube Lite:
Unique transaction ID returned from AXS payment gateway for each transaction

AXS PayCube Pro (Castle):
Echo from request (posReference)
transactionReferenceM67890For AXS PayCube Lite:
A unique reference ID for merchant to reconcile the record against Transaction Reference in AXS Merchant Portal

For AXS PayCube Pro (Castle):
Echo from request (posReference)
statusSUCCESSStatus of the transaction.
SUCCESS, DECLINED, ERROR
errorCodeOptional, code is present only if the status is ERROR
errorHeader
errorDescriptionConnection timeoutOptional, description is present only if the status is ERROR
schemeVISAPayment scheme. Available values:
VISA, MASTERCARD, UNIONPAY, AMEX, PAYNOW, WECHAT, ALIPAY
responseCode00Present only for CARD payment.
Refer to gateway response code for more details
tid10004657Terminal ID
mid100023987253Unique Merchant ID assigned by AXS
approvalCode831000Gateway approval code. Present only for CARD payment.
transDateTimeYYYY-MM-DDTHH:mm:ssZDate time in UTC ISO
retrievalReferenceNumber611204599707Gateway RRN. Present only for CARD payment.
amount10Echo from request
currencyCodeSGDFrom the SALE record

INIT (Device Activation)#

Request parameters:#

ParametersRequiredExampleRemarks
transTypeINITTo trigger AXS payment app for initialisation
activationCode2345-5465-3245-2345Unique activation code assigned to individual terminal
checksum9e107d9d372bb6826bd81d3542a419d6MD5 checksum value
Sample Code
Sample Response Data

VOID#

Voids an existing approved transaction. The service looks up the transaction by posReference.
WARNING
Restriction: Void is only permitted on the same calendar day (SGT) as the original transaction.

Request Parameters#

ParametersRequiredExampleRemarks
transTypeVOIDTo trigger AXS payment app to void specific transaction
posReference12345POS' unique identifier for the transaction sent during SALE
checksum9e107d9d372bb6826bd81d3542a419d6MD5 checksum value
Sample Code
Sample Response Data

QUERY#

Retrieves the current status of a transaction by its posReference. The response shape differs slightly between card and QR results.

Request parameters:#

ParametersRequiredExampleRemarks
transTypeQUERYTo trigger AXS payment app for query specific transaction
posReference12345POS' unique identifier for the transaction sent during SALE / VOID
checksum9e107d9d372bb6826bd81d3542a419d6MD5 checksum value
Sample Code
Sample Response Data

Error Handling#

ScenarioHandling
status = ERRORTo trigger a QUERY command using posReference send during SALE / VOID action.
connection timeoutTo trigger a QUERY command using posReference send during SALE / VOID action.

Error Message#

Error CodeProposed Error MessageRemark/Scenario
40_000Error Header:
Initialization failed [40_000]
Error Message:
Please restart the app and try again.
InitSoftPosError
40_001Error Header:
Setup failed [40_001]
Unable to complete setup. Please try again or contact support team.
SetupSoftPosError
40_002Error Header:
No configuration found [40_002]
Error Message:
Default configuration is missing. Please verify your setup.
NoDefaultConfig
41_001Error Header:
Payment result could not be processed [41_001]
Error Message:
Please try the transaction again.
ParsingActivityResultFailed
41_002Error Header:
Unable to retrieve payment profile [41_002]
Error Message:
Please check your connection and try again.
ProfileNotFound
42_001Error Header:
Card Detection timed out [42_001]
Error Message:
Please retry and ensure the card is held steady.
AbortedCardDetectionTimeout
42_002Error Header:
Transaction Aborted [42_002]
Error Message:
Transaction was cancelled manually.
AbortedManually - User press 'back' button / User press home button
42_003Error Header:
Unable to read Card. Retry limit exceeded. [42_003]
Error Message:
Please retry or use another payment method.
AbortedCardReadRetryCountExceeded
43_001Error Header:
Connection timed out [43_001]
Error Message:
Unable to reach the server. Please check your network.
ConnectionTimeout
43_002Error Header:
Request Failed [43_002]
Error Message:
There was an issue with the request. Please check your details and try again.
NetworkClientSideError
43_003Error Header:
Service Unavailable [49_003]
Error Message:
We're having trouble processing your request right now. Please try again shortly.
NetworkServerSideError
49_000Error Header:
Unexpected Error [49_000]
Error Message:
We received an unexpected response while processing your request. Please retry or contact support.
ResultNull
49_001Error Header:
Service Issue [49_001]
Error Message:
We couldn't complete the request due to a temporary system issue. Please try again.
OtherSourceError - Trigger logout from admin portal / expired
49_002Error Header:
Unexpected Error [49_002]
Error Message:
An error occurred while processing your request. Please try again.
OtherSourceException
FE1001Error Header:
Amount Exceeds Limit [FE1001]
Error Message:
The transaction amount exceeds the maximum allowed limit. Please enter a lower amount.
Transaction amount exceeds the permitted limit
FE1002Error Header:
Transaction Type Required [FE1002]
Error Message:
A transaction type is required to proceed.
transType field is absent or empty in the intent payload
FE1003Error Header:
Unsupported Transaction Type - {transType} [FE1003]
Error Message:
The transaction type is not recognized. Please use a supported transaction type.
transType value is not one of the recognised values. Recognised values: Sale, Void, Query
FE1004Error Header:
Missing Required Fields - {keys} [FE1004]
Error Message:
Required transaction details are missing. Please ensure required fields such as amount, currency, or transaction type are provided.
One or more mandatory fields missing from the intent payload. e.g. keys: amount, currency, transType
FE1005Error Header:
Request Validation Failed [FE1005]
Error Message:
The transaction request could not be validated. Please verify the request and try again.
MD5 checksum in payload does not match computed value
FE1006Error Header:
Transaction Not Authorized - {transType} [FE1006]
Error Message:
The requested transaction type is not authorised. Please contact service provider for assistance.
Merchant is not authorised for the given transaction type. Recognised values: Sale, Void, Query
FE1007Error Header:
Payment Method Not Recognized - {scheme} [FE1007]
Error Message:
The selected payment method is not recognised. Please try another payment method.
Payment scheme is not recognised. e.g. scheme: Visa, Mastercard, PayNow
FE1008Error Header:
Unable to Complete Transaction [FE1008]
Error Message:
An unexpected issue occurred during transaction processing. Please try again.
Unexpected exception during transaction execution. e.g. error: NullPointerException, IllegalArgumentException
FE1009Error Header:
Transaction Cancelled [FE1009]
Error Message:
The transaction was cancelled before completion.
QR manually cancel
FE1010Error Header:
QR Code Expired [FE1010]
Error Message:
The QR Code is no longer valid. Please generate a new QR code and try again.
QR expired
AN1001Error Header:
Invalid Request [AN1001]
Error Message:
No transaction details were received. Please try again.
Null request bundle received in SoftPosBackgroundService - (When android receive nothing)
AN1002Error Header:
Service Under Maintenance [AN1002]
Error Message:
The service is currently unavailable due to scheduled maintenance. Please try again later.
App is in maintenance mode
AN1003Error Header:
App Update Required [AN1003]
Error Message:
Your app version ({current}) is below the minimum required version ({minimum}). Please update the app to continue.
e.g. current: 1.0.0, minimum: 1.2.0 → "App version 1.0.0 is below the minimum required version 1.2.0. Please update the app."
AN1004Error Header:
Request Validation Failed [AN1004]
Error Message:
The transaction request could not be validated. Please verify the request and try again.
MD5 checksum in the request does not match computed value
AN1005Error Header:
Unsupported Transaction Type - {transType} [AN1005]
Error Message:
The transaction type is not recognized. Please use a supported transaction type.
transType value is not recognised. Recognised values: INIT, SALE, VOID, QUERY, CAPTURE
AN1006Error Header:
Missing Activation Code [AN1006]
Error Message:
The activation request is missing the required activation code. Please verify the request and try again.
activationCode field missing from INIT request
AN1007Error Header:
Activation Already Completed [AN1007]
Error Message:
This device has already been activated. Initialization is not required.
INIT attempted on an already-activated device
AN1008Error Header:
Request Failed [AN1008]
Error Message:
{API_MESSAGE}
Message comes from the API response. e.g. msg: "Invalid merchant credentials", "Merchant not found", "Server timeout"
AN1009Error Header:
Device Error [AN1009]
Error Message:
{SDK_MESSAGE}
Message comes from the SoftPOS SDK. e.g. msg: "SDK licence expired", "Hardware not supported"
AN1010Error Header:
Setup Failed [AN1010]
Error Message:
{SETUP_ERROR_MESSAGE}
Message comes from the setup step that failed. e.g. msg: "Failed to register device", "Configuration missing"
AN1011Error Header:
POS Reference Required [AN1011]
Error Message:
A POS reference is required to process the void transaction.
posReference field missing from VOID request
AN1012Error Header:
Activation Required [AN1012]
Error Message:
Device activation is required before performing this operation.
VOID attempted before device is activated
AN1013Error Header:
Amount Exceeds Limit [AN1013]
Error Message:
The transaction amount exceeds the permitted limit. Please enter a lower amount.
Request more than the amount
AN1014Error Header:
Unable to Void Transaction [AN1014]
Error Message:
Void is only available for same-day transactions
VOID attempted on a non-same-day transaction
AN1015Error Header:
Void Failed [AN1015]
Error Message:
{VOID_API_MESSAGE}
Message comes from the VOID API response. e.g. msg: "Transaction already voided", "Original transaction not found"
AN1016Error Header:**POS Reference Required [AN1016]**Error Message:A POS reference is required to perform this operation.posReference field missing from QUERY request
AN1017Error Header:
Activation Required [AN1017]
Error Message:
Device activation is required before performing this operation.
QUERY attempted before device is activated
AN1018Error Header:
Transaction Not Found [AN1018]
Error Message:
The transaction could not be found. Please verify the transaction details and try again.
QUERY returned no matching transaction for the given posReference
AN1024Error Header:
Transaction Failed [AN1024]
Error Message:
An unexpected error occurred while processing the transaction. Please try again.
Unexpected exception in headless transaction flow. e.g. msg: "NullPointerException: amount is null", "IllegalStateException"
AN1025Error Header:
Unexpected Error [AN1025]
Error Message:
We were unable to process your request. Please try again.
Fallback error for unhandled finishWithError cases
Previous
Function & Response Codes
Next
Transaction Query
Built with