1. Terminal SDK
Kushki Docs
English
  • Español
  • English
  • Home
  • Quick Start
    • Frequently Asked Questions
    • Moving to Production
    • Policy for Important API Changes
    • Test Data
    • Error Codes
    • Latest Features
  • Payment Glossary
    • Payments Glossary
  • One-time card payments (Online)
    • Supported card brands
    • Functionalities by business model
    • How do third party commissions work?
    • Integration guide Third Party Commissions
    • Network Tokens
    • One-step Payments
      • How do Card Payments Work?
      • Accept a Card Payment
      • Direct charge (without token)
      • Accept One-Time Payments with OTP
      • OTP Authentication Error Codes
      • Error codes for single card payments
    • Two-steps Payments
      • How do single payments with authorization and capture work?
      • Receive payments with authorization and capture
    • Refunds
      • Returns, cancellations, and refunds
    • 3DS Authentication
      • Introduction to 3DS
      • 3DS API integration
      • 3DS integration with kushki.js library
      • 3DS API integration plus kushki.js library
      • 3DS Error Codes
    • Apple Pay Payments
      • Apple Pay Configuration
      • Apple Pay Sandbox testing
  • Recurring Card Payments (Online)
    • Functionalities by business model
    • External subscriptions to Kushki
    • Authenticate your subscriptions with 3DS
    • Accept one-click payments with 3DS
    • Error codes in recurring charges
    • Apple Pay for Subscriptions
    • Scheduled payments
      • How do Credit or Debit Card Payment Recurring Charges Work?
      • Create a recurring charge
      • Manage your Scheduled Charges
    • OneClick Payments
      • Accepting One-Click Payments
      • How do OneClick payments with authorization and capture work?
      • Receive one-click payments with authorization and capture
  • Card-present payments
    • Card present payments
    • Accept card present payments
    • Test data
    • Webhooks for card present
    • Cloud Terminal API
      • Cloud terminal API overview
      • Take payments
      • Cancel a payment request
      • Check the status of a payment request
      • How to print a customized ticket?
    • App-to-app
      • App-to-app overview
      • Take payments
    • Terminal SDK
      • Terminal SDK Introduction
      • Take payments
    • Raw card-present API
      • Raw card-present API overview
      • Cryptographic key exchange
      • Sample script to encrypt information
      • Take Payments
      • Frequently Asked Questions
      • Error codes for card-present transactions
    • Transactions
      • Transactions
      • Cancel payments
    • Kushki One
      • First Steps
      • Autenticación y Cifrado de Requests
      • Accept payments with Kushki One
      • Amount Format
      • Async services and webhooks
      • Printing on SmartPOS terminal
      • Unified Error Catalog — Kushki ONE Connect
    • Kushki One Payment App
      • Overview
      • Process a payment
      • Split payment on the terminal
      • Refunds and PreAuth & Capture
      • Review Your Transactions
      • Terminal Setup
  • Wire Transfers
    • How do Payments by Wire Transfers Work?
    • Banks and transaction details for bank transfer payments
    • Receive Wire Transfers
    • Check the Status of a Transaction
  • Money Disbursement
    • Wire Transfer
      • How Does a Payment Distribution by Wire Transfer Work?
      • Payment Distribution to Bank Accounts
      • Error codes for transfer dispersions
  • Payment Links
    • Smartlinks
  • Plugins
    • Shopify
      • Shopify
      • Plugin Operation
    • VTEX
      • VTEX Integration Guide
  • Payment forms and buttons
    • Kajita
      • How Does it Work?
      • Payment Kajitas
    • Payment Button
      • Overview
      • Generate a payment button
  • Branch Offices Management
    • How to Onboard Submerchants via API
  • Notifications
    • Webhooks
    • Good Practices
    • Check your Webhooks
    • One-time Payments Webhooks
      • Webhook for One-Time Payments made with a card
      • Webhook for One-Time Payments by Wire Transfer
      • Webhook for One-Time Payments in Cash
    • Recurring Payments Webhooks
      • Webhook for Recurring Payments Made with Card
    • Payment Distribution Webhooks
      • Webhook for payment disbursement through wire transfer
    • Payment button Webhooks
      • Webhooks with Payment Button
    • Smartlinks Webhooks
      • Webhooks with Smartlinks
    • Refunds Webhooks
      • Webhook for Voids and Refunds
      • Chargeback Webhooks
HomeMexico 🇲🇽
Ecuador 🇪🇨Chile 🇨🇱Colombia 🇨🇴Peru 🇵🇪
HomeMexico 🇲🇽
Ecuador 🇪🇨Chile 🇨🇱Colombia 🇨🇴Peru 🇵🇪
Status
Soporte / Support
English
  • Español
  • English
  1. Terminal SDK

Take payments

Perform transactions with a terminal from your Android mobile point-of-sale application.

Importing Android SDK#

Import the SDK to your project by adding the following lines to your build.gradle file
Install the following plugins necessary for the SDK to function correctly in your build.gradle file.
Add the following repositories in your settings.gradle file.

Initializing SDK#

Initialize the SDK by setting your user token and environment via the initSDK() method, as shown below
PropertyTypeRequiredDescriptionAllowed values
contextObjectYesandroid.content.Context
sdkModeObjectYesInitBillpocketSDK.SdkMode.TEST, PRODUCTION
userTokenStringYesUser token.
deviceTokenStringNODevice ID. It can be viewed and renamed from the Billpocket dashboard > My devices section.
listenerObjectYesEventListenerInitSDK
Send eventListener as an object that implements the EventListenerInitSDK interface to listen to the initialization result.

Connecting bluetooth reader#

Link the terminal to your mobile device via Bluetooth so the SDK can find it. Get the available readers using the getListBluetoothReaders method.
Implement the resultListReaders method of the EventListenerConnection interface to listen to the result.
You will need to verify Bluetooth permissions for devices with an Android API Level lower than 31.
Implement the connectReader method to get the selected item from the list of available devices. Get the type, macAddress and name data from the previously selected BluetoothDevice object.
Implement the resultReaderConnect method of the EventListenerConection interface to get the connection result.

Request data model#

These are all the parameters you can configure when making a request.
PropiedadTypeRequiredDescription
contextObjectYesandroid.content.Context
amountNumberYesTransaction amount.
descriptionStringYesTransaction description.
locationObjectYesInstance of the android.location.Location object with latitude and longitude of the transaction source.
tipNumberNoTransaction tip
listenerObjectYesInstance of EventListenerTransaction.
rotationSignatureBooleanNoSet true to display the signature screen vertically or set false to display the signature screen horizontally.

Operations#

Discover all the operations available through Terminal SDK integrations.

Sale#

Send a request with the required payment settings from your system to a terminal to perform the desired transaction.
Use the doTransaction method to initiate a transaction with the terminal. You must send all required parameters in the request.
Send an eventListener object which implements the EventListenerTransaction interface to listen for transaction events.
Learn how to implement deferred payments, disconnect a terminal, authenticate a transaction, and other available methods in the SDK documentation.

Response#

Depending on the result, the response will be returned as one of the following callbacks.

onTransactionSuccessful#

This method is called when the transaction is successful.

onTransactionFinished#

This method is called when a magnetic stripe payment is made or an error has occurred during the transaction.

onTransactionAborted#

This callback is called when the operation is cancelled. For example, it is called when the terminal is disconnected or the card reading time has expired.
Please review the SDK reference for more detailed information.

Test data
Make any necessary adjustments to your system using the test data.
Transactions
Get the list of transactions with information relevant to your operations.
Modificado en 2026-10-14 19:44:35
Anterior
Terminal SDK Introduction
Siguiente
Raw card-present API
Built with