Payment Operations
The SDK supports a full range of payment operations including purchases, pre-authorizations, captures, refunds, voids, and reversals.
Transactions
We support the following types of transactions. Please note that support for authorization, capture, and void operations may vary depending on the country, card issuer, and specific business rules.
Transaction Parameters
Updated v1.0.5The TxnParams class holds all parameters for a transaction:
Loading...| Type | Description | Requires Original | Force PIN |
|---|---|---|---|
PURCHASE | Standard sale transaction | No | No |
AUTHORIZE | Pre-authorization (hold funds) | No | No |
CAPTURE | Capture pre-authorized amount | Yes | No |
REFUND | Refund a previous purchase | Yes | No |
VOID | Void unsettled transaction | Yes | No |
REVERSAL | Reverse/cancel a transaction | Yes | No |
CASHBACK | Purchase with cashback | No | No |
CHANGE_PIN | PIN change operation | No | Yes |
CARD_ACTIVATION | Activate a new card | No | Yes |
Flow Types
Control the UI flow during transaction processing:
| FlowType | Description | Use Case |
|---|---|---|
IMMEDIATE | Minimal UI, quick processing | Background transactions |
STATUS | Shows transaction status only | Simple feedback |
DETAIL | Full transaction details and receipt | Default experience |
Purchase
Process a standard sale transaction:
Loading...Understanding isFlowComplete
Updated v1.0.5The onPaymentProcessComplete callback fires up to 3 times — the exact number depends on the FlowType you passed:
| Call # | When it fires | isFlowComplete | FlowType(s) |
|---|---|---|---|
| 1st | Immediately after server response received | true | IMMEDIATE (only call) |
| 1st | Immediately after server response received | false | STATUS, DETAIL |
| 2nd | Status tick / success animation displayed | false | DETAIL only |
| 2nd / 3rd | Transaction detail screen closed by user | true | STATUS, DETAIL |
Best Practice
Always gate post-payment actions (navigate to receipt, update UI, fulfil order) on isFlowComplete === true. For FlowType.IMMEDIATE this is the 1st call; for DETAIL it is the 3rd call after the detail screen closes.
Capture
Capture a previously authorized amount. The capture amount can be less than or equal to the authorized amount:
Loading...Refund
Refund a previously completed purchase. Supports both full and partial refunds:
Loading...Void
Void an unsettled transaction. Only works for transactions from the current batch/day before settlement:
Loading...Reverse
Reverse a transaction. Typically used when a transaction needs to be undone due to timeout or error during original processing:
Loading...Reverse Last Transaction
New in v1.0.5Convenience method to reverse the most recent transaction without needing to provide the original transaction details. The transaction must be reversible (not already reversed or voided):
Loading...TxnResponse Model
Response object returned by void and reverse operations:
| Property | Type | Description |
|---|---|---|
| code | String | Response code from server |
| type | String | Response type |
| message | String | Response message |
| transaction | Transaction | Associated transaction details |
Loading...On this page
Downloads
Coming SoonSample apps, release bundles, and more content will be available here soon.