POS Integration
This guide describes the integration flow with the Vender app, developed by SOPAGUE for POS devices GPOS 700X and GPOS 720 models.
The app manages the entire payment flow, including customer association, payment capture, and receipt printing.
Overview
- Integration via Android Intent (
startActivityForResult). - Support for debit, credit, installment, PIX, and cancellation operations.
- Transaction result returned via
onActivityResult.
Prerequisites
- Compatible POS device with the Vender app installed.
- Android 4.4 (KitKat) or higher.
- Internet access for online transactions.
- Permission to use
startActivityForResult.
Integration Parameters
Required
| Parameter | Type | Description |
|---|---|---|
TRANSACTION_VALUE | String | Transaction amount in cents (e.g., R$120.00 → 12000). |
OPERATION_TYPE | String | Operation type (see the list below). |
Optional
| Parameter | Type | Description |
|---|---|---|
INSTALMENTS | String | Number of installments for installment credit ("1" to "12"). |
NSU | String | NSU of the transaction you want to cancel. |
TRANSACTION_DATE | String | Transaction date to cancel (ddMMyyyy, e.g., 30072025). |
Supported Operations
| Operation | Value for OPERATION_TYPE |
|---|---|
| Debit | DEBIT |
| One-time credit | CREDIT |
| Installment credit | CREDIT_INSTALLMENT |
| Pix | PIX |
| Debit cancellation | CANCELLATION_DEBIT |
| Credit cancellation | CANCELLATION_CREDIT |
Integration Examples
Sale
Intent intent = new Intent("com.sopague.START");
intent.putExtra("TRANSACTION_VALUE", "12000");
intent.putExtra("OPERATION_TYPE", "DEBIT");
startActivityForResult(intent, 1113);
Cancellation
Intent intent = new Intent("com.sopague.START");
intent.putExtra("OPERATION_TYPE", "CANCELLATION_DEBIT");
intent.putExtra("NSU", "123456");
intent.putExtra("TRANSACTION_DATE", "30072025");
startActivityForResult(intent, 1113);
Receiving the response
The transaction result will be returned via onActivityResult:
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 1113 && resultCode == RESULT_OK && data != null) {
// Approved transaction
String nsu = data.getExtras().getString("NSU");
// For a cancellation transaction, you'll also receive NSU_CANCELLATION
String nsuCancel = data.getExtras().getString("NSU_CANCELLATION");
Log.d("INTEGRATION", "Transaction completed. NSU: " + nsu);
setResult(RESULT_OK, data);
finish();
} else if (requestCode == 1113 && resultCode == RESULT_CANCELED && data != null) {
// Transaction canceled or error
String error = data.getExtras().getString("ERROR");
Log.e("INTEGRATION", "Transaction error: " + error);
setResult(RESULT_CANCELED, data);
finish();
}
}
Final Notes
- Always send amounts in cents.
- The Vender app must be installed on the POS device.
- Possible return extras:
NSU→ Transaction sequential number (success).NSU_CANCELLATION→ Cancellation transaction NSU.ERROR→ Error message (failure).
- To simulate an error, send the value
3333. - In homologation (HMG), physical card reading is not enabled (transactions are simulated).
For questions or issues, see the support section on