1. Terminal SDK
  • API Docs Mexico 🇲🇽
  • Online Payments
    • Release Notes
    • Card Payments
      • Request a card token
      • Make a charge or deferred charge
      • Create payment (tokenless)
      • Request deferred options
      • Refund a transaction
      • Authorize payments
      • Preauthorization (tokenless)
      • Void a transaction
      • Reauthorize payments
      • Capture an authorized payment
      • Bin Info V2
      • Bin Info
      • Validate OTP
      • Verify Account
    • One-Click and Scheduled Payments
      • Request a recurring charge token
      • Create a recurring charge
      • Make an One-click payment
      • Update recurring charge card data
      • Cancel a recurring charge
      • Update a recurring charge
      • Add a temporary charge or discount
      • Authorize payments
      • Capture an authorized payment
      • Get recurring charge Info
    • Transfer in
      • Get Bank List
      • Request a Transfer In token
      • Init Transaction
      • Get Status
    • Transfer Out
      • Get Bank List
      • Get Bank List V2
      • Request a Transfer Out token
      • Init Transaction
      • Get Status
      • Balance for Payouts
    • Smartlinks
      • Create a Smartlink
      • Get a Smartlink
      • Delete a smartlink
      • Update a Smartlink
    • Payment Button
      • Create a payment button
    • Analytics
      • Get transactions list v1
      • Get transactions list v2
    • Chargebacks
      • Query chargebacks
      • Request chargeback export
    • Commissions
      • Get Commission Configuration
    • Payment Credentials
      • Create a credential
      • Activate or deactivate
      • Delete credential
      • Regenerate a credential
      • Update credential
      • Advanced search
      • Search credentials
    • Platform Status
      • Get platform status
      • Get gateway status
    • Settlement
      • Query settlement
    • Subscription Transactions
      • Get subscription transactions
  • Card Present Billpocket
    • Get Started
      • Create Account
      • User Token
      • API Keys
    • Webhooks
      • Webhooks — Transfer Funds (v1)
      • Webhooks — Transfer Funds to Your Bank Account
      • Transfer Funds Errors
    • Terminals
      • App Review
      • Splash Screen
    • Card Present Payment Services
      • Cloud Terminal API
        • Collect card payments
        • Print Ticket
        • Cancel Push Notification
        • Get transaction status
        • Collect card payments v2
      • App-to-App
        • Android intents
        • App to App — iOS
        • App to App — Mobile Web
      • Terminal SDK
        • Terminal SDK
        • Android SDK errors
    • Card not Present Billpocket Services
      • 3DS Checkout
        • Create checkout
        • Get checkout details
      • E-commerce Flex
        • Get token
        • Validate token
        • Collect payments
        • Refund
        • Capture an authorized payment
        • Get status
    • Catalogs
      • States
      • Municipalities
      • Tax companies
      • Commercial activities
    • User Settings
      • Create user
    • Accounts
      • Clabe Account Setup
        • Add CLABE account
      • Deposit Accounts
        • Add or update CLABE account
    • Transactions
      • Transaction List
        • Get token
        • Get transaction list
        • Get transaction list v2
        • Get transaction list v3
        • Get transaction list v4
      • Cancel Payments
        • Cancel payments Error Codes
        • Cancel payments
  • API Raw Card Present
    • The Amount Object
    • Error Catalog
    • Key Exchange Process
    • Release Notes
    • Test Data
    • One-time payments
      • Single payment
    • Two-step-payments
      • Authorization and capture
    • Voids & Refunds
      • Refund a transaction
    • Card information
      • Get BIN Info
      • Balance inquiries
      • Bin Info V2
      • Request deferred options
    • Query Transactions
      • Transaction Search
    • Webhooks
      • Webhooks — Introduction
      • Good Practices
      • Webhooks — Card Payments
      • Webhooks — Refunds
      • Check Your Webhooks
  • Kushki One
    • Cloud Services
      • Payment
        • Charge
        • Authorization (Pre-auth)
        • Capture
        • Re-authorization
        • Post-tip
        • Void
        • Refund
        • Abort
      • Search
        • Transaction Search
      • Print
        • Create Print Job
        • Get Print Job Status
    • Local Services
      • Print
        • Create Print Job
        • Get Print Job Status
        • Print Job Webhook (inbound — implemented by your POS)
      • Payment
        • Charge
        • Authorization (Pre-auth)
        • Capture
        • Re-authorization
        • Post-tip
        • Void
        • Refund
        • Abort
      • Search
        • Transaction Search — Online
        • Transaction Search — Local
  • Appian - Submerchant Register
    • Submerchant Validation in Batch
    • Query submerchant status by requestId/submerchantId
    • Submerchant Document Upload
    • Get submerchantIds
    • Get credentials for submerchants
  • Schemas
    • RequestBodies
      • one-and-two-step-payment
    • Card
    • Channel
    • Amount-cash-in
    • ChargebackListResponse
    • StatusComponent
    • SettlementDateRangeRequest
    • SubscriptionTransactionsResponse
    • amount
    • AmountWithTaxes
    • PrintJobRequest
    • networkToken
    • ChargebackItem
    • SettlementTicketRequest
    • SubscriptionTransaction
    • extra_taxes
    • AmountCore
    • CommandText
    • currency
    • ErrorResponse400
    • ErrorResponse
    • SettlementResponse
    • webhooksItem
    • card
    • ExtraTaxes
    • CommandColumns
    • Amount
    • Country
    • ErrorResponse401
    • SettlementRecord
    • card_details
    • ColumnItem
    • extraTaxes
    • ErrorResponse403
    • enc_tlv
    • TransactionResponse
    • CommandDivider
    • Deferred
    • payment_method
    • ErrorResponse500
    • deferred
    • RawResponse
    • CommandFeed
    • Metadata
    • pos_details
    • CardData
    • CommandSpace
    • ContactDetails
    • contact_details
    • sub_merchant
    • AmountWithTip
    • CommandCut
    • documentType
    • Subscription
    • metadata
    • LinkFailure
    • CommandImage
    • orderDetails
    • Language
    • TransactionSearchRequest
    • CommandQR
    • Shipping Address
    • payment_submethod
    • CommandBarcode
    • Billing-Address
    • SubscriptionUpdate
    • PrinterError
    • product
    • SubscriptionAdjustmentRequest
    • PrintJobStatus
    • threeDomainSecure
    • PrintWebhookPayload
    • webhooks
    • headers
    • webhooksChargeback
    • citMit
    • network
    • binInfo
    • messageFields
    • UnexpectedErrorResponse
    • transactionType
    • ExternalReferenceId
    • ExternalSubscriptionId
BienvenidaPerú 🇵🇪México 🇲🇽
Ecuador 🇪🇨Colombia 🇨🇴Chile 🇨🇱
BienvenidaPerú 🇵🇪México 🇲🇽
Ecuador 🇪🇨Colombia 🇨🇴Chile 🇨🇱
  1. Terminal SDK

Terminal SDK

Terminal SDK — Android#

Accept card-present payments through a Billpocket terminal directly from your Android app. Unlike the App to App integration, the SDK does not require the Billpocket POS app to be installed on the device — your app fully controls the user interface.
INFO
Service available in Mexico only.

Requirements#

A valid account
A supported Billpocket terminal

Add the SDK to your project#

Dependency#

In build.gradle (app level):
INFO
If integrating an Ultra SE reader, add the following permission to AndroidManifest.xml:
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"
    tools:ignore="QueryAllPackagesPermission" />
Required from version 2.8.1 onward for Ultra SE initialization.

Plugins#

In build.gradle:

Repositories#

In settings.gradle:

Initialize the SDK#

Call BillpocketSDK.initSDK() to connect and authenticate.
ParameterTypeRequiredDescriptionValues
contextObject✅android.content.Context
sdkModeObject✅Environment modeTEST, PRODUCTION
userTokenString✅Your user token
deviceTokenString—Device ID (v2.8.4+). Visible under My Devices in the dashboard
listenerObject✅EventListenerInitSDK
Listen for the result via EventListenerInitSDK:
INFO
initSDK() automatically connects to Ultra and Ultra P terminals — no need to call connectReader() for those models.

Connect a Bluetooth reader#

For terminals that connect via Bluetooth (e.g., Nano), discover and connect the reader explicitly.

Get available readers#

Implement resultListReaders from EventListenerConnection:
INFO
resultListReaders is not available for Ultra and Ultra P terminals.

Connect the selected reader#

Disconnect the reader#

Implement onQposDisconnected to handle auto-disconnect after inactivity:

Start a transaction#

Use BluetoothReaderTransaction.doTransaction() to initiate a payment.
ParameterTypeRequiredDescription
contextObject✅android.content.Context
amountNumber✅Transaction amount
descriptionString✅Transaction description
locationObject✅android.location.Location with lat/lng
tipNumber—Tip amount
listenerObject✅EventListenerTransaction instance
rotationSignatureBoolean—true = portrait signature, false = landscape

Transaction flow callbacks#

Magnetic stripe fallback#

Multi-application cards#

When a card has multiple payment applications, select one:

MSI (Meses Sin Intereses)#

For transactions ≥ $300 MXN, onMsiDefined is called with available installment options:
INFO
You must implement onMsiDefined even if you don't offer installments — the last option (installments=0) continues the flow without deferral.

Cardholder authentication#

PIN#

Add the minervacore-gsm-1.0.1.aar dependency and declare the activities in AndroidManifest.xml:
<activity android:name="com.billpocket.minerva.core.PlainPINCaptureActivity"
    android:excludeFromRecents="true"
    android:exported="false"
    android:permission="com.billpocket.minerva.permission.SECURE_PIN_INPUT"
    android:screenOrientation="portrait"
    android:windowSoftInputMode="stateAlwaysHidden"/>

<activity android:name="com.billpocket.minerva.core.RSAKeyPINCaptureActivity"
    android:excludeFromRecents="true"
    android:exported="false"
    android:permission="com.billpocket.minerva.permission.SECURE_PIN_INPUT"
    android:screenOrientation="portrait"
    android:windowSoftInputMode="stateAlwaysHidden"/>
After the activity result, continue:

Signature#

Declare the activity:
<activity android:name="com.billpocket.bil_lib.SignatureActivity"
    android:excludeFromRecents="true"
    android:exported="false"
    android:permission="com.billpocket.minerva.permission.SECURE_PIN_INPUT"
    android:screenOrientation="portrait"
    android:windowSoftInputMode="stateAlwaysHidden"/>
After the activity result, continue:

Response callbacks#

Full EventListenerTransaction interface#


Transaction history#


Refund#

Retrieve the transaction list, then call refundPayment:

Print ticket#

Print by transaction ID#

Print copy (v2.8.5+)#

The requestPrintCopy callback prompts the user to print a copy:

Print result callback#

Print bitmap#

INFO
For terminal printer documentation, see the Sunmi developer docs.

Message tracking#

Optional callbacks for debugging:

Resources#

SDK demo app
Android SDK errors
Android SDK release notes

Got a suggestion on this documentation? Contact us.
Modified at 2026-07-09 22:34:28
Previous
Terminal SDK
Next
Android SDK errors
Built with