Package name
Charge
Generating or applying a payment using any card or digital method.
Revert
Reversing a transaction, returning the money to the original account.
High-level flow
- Client’s app constructs an explicit
Intenttargeting Payment app and specifies the desired action. - Client’s app launches the
IntentwithregisterForActivityResult(StartActivityForResult). - The user pays (or cancels).
- Payment app returns a result
Intentwith details viasetResult(...)andfinish(). - Client’s app finalizes the order.
Charge Intent Contract
Request action
com.lab4pay.pos.CHARGE
Request parameters
| Name | Type | Example | Notes |
|---|---|---|---|
| payConnectIntegratorId | String | 9e6d06fe0322 | Your Integrator ID. For reference see the Integrator Registry section |
| payConnectId | String | 350344d0718b | Pay-Connect ID returned from Pairing section |
| amount | Integer | 2350 | The amount of the payment, in cents |
| clientTransactionId | String | ref-49152 | Unique per payment attempt |
Response
- Result codes:
Activity.RESULT_OK-> The payment app completed normally and returned a valid result Intent. Additional details are provided in the Intent extras.Activity.RESULT_CANCELED-> Payment flow ended unexpectedly (user exited early or app failed before returning a result). No Intent extras are available.
- Data: An
Intentwith Response extras
Response extras
| Name | Type | Required | Notes |
|---|---|---|---|
| transactionId | String | Yes - When SUCCESS | Our unique transaction reference |
| clientTransactionId | String | Yes | Echoed from original request |
| paymentMethod | String | Yes - When SUCCESS | e.g., CARD, MBILLS, VALU |
| paymentOption | String | No | Depends on payment method. e.g., VISA, MASTERCARD, BTC, USDT |
| amount | Integer | Yes - When SUCCESS | The amount of the payment, in cents |
| tipAmount | Integer | Yes - When provided | The tip amount of the payment, in cents |
| currency | String | Yes | Currency format ISO 4217 |
| status | String | Yes | SUCCESS | CANCELED | FAILED |
Revert Intent Contract
Request action
com.lab4pay.pos.REVERT
Request parameters
| Name | Type | Example | Notes |
|---|---|---|---|
| payConnectIntegratorId | String | 9e6d06fe0322 | Your Integrator ID. For reference see the Integrator Registry section |
| payConnectId | String | 350344d0718b | Pay-Connect ID returned from Pairing section |
| transactionId | String | 41dTf452a3b2 | The CHARGE transaction ID returned in transactionId |
Only the most recent
SUCCESS transaction performed on the terminal can be reverted.Reverts are only available for certain payment methods.
Response
- Result codes:
Activity.RESULT_OK-> The payment app completed normally and returned a valid result Intent. Additional details are provided in the Intent extras.Activity.RESULT_CANCELED-> Payment flow ended unexpectedly (user exited early or app failed before returning a result). No Intent extras are available.
- Data: An
Intentwith Response extras
Response extras
| Name | Type | Required | Notes |
|---|---|---|---|
| transactionId | String | Yes | Echoed from original request |
| status | String | Yes | SUCCESS | FAILED |