Kushki Developer Portal
  1. Mobile
Kushki Developer Portal
  • KUSHKI API
    • Kushki Developer Portal 🚀
    • Perú 🇵🇪
    • Ecuador 🇪🇨
    • Chile 🇨🇱
    • México 🇲🇽
    • Colombia 🇨🇴
    • Libraries & SDKs (Online Payments)
      • Release notes
      • Mobile
        • Kushki Android
        • Kushki iOS 
        • Kushki iOS ARM Setup
      • Web
        • Kushki.js 🌐
        • kushki.js-hosted-fields
          • kushki.js Hosted Fields
          • Guía de migración a Kushki.js 2.0
          • Javascript
          • Card Payouts
            • Interfaces
              • Interface `FormValidity`
              • Interface `Styles`
              • Interface `CardPayoutUniqueTokenResponse`
              • Interface `CardPayoutSubscriptionTokenResponse`
              • Interface `CardPayoutOptions`
              • Interface `Fields`
              • Interface `Field`
              • Interface `FieldValidity`
            • Type Aliases
              • Type Alias `InputTypeEnum`
              • Type Alias `CardPayoutTokenResponse`
            • Errors
              • Errors
            • Card Payouts Interface
              • Interface `ICardPayouts`
            • Enumerations
              • Enumeration `InputModelEnum`
            • Methods
              • initCardPayoutToken method
            • Types
              • Type Alias `CssProperties`
          • Antifraud
            • Interfaces
              • Untitled Doc
              • Untitled Doc
              • SiftScienceObject Interface
            • Methods
              • Untitled Doc
              • requestInitAntiFraud method
              • Untitled Doc
          • Kushki
            • Interfaces
              • Untitled Doc
              • CommissionConfigurationRequest interfaces
              • Untitled Doc
            • Classes
              • Untitled Doc
            • Methods
              • requestBankList function
              • requestCommissionConfiguration function
              • Kushki.js Hosted Fields init function
          • Card
            • Card-Interface
              • Untitled Doc
              • Untitled Doc
            • Interfaces
              • Untitled Doc
              • AppleTokenResponse Interface
              • Untitled Doc
              • Untitled Doc
              • BrandByMerchantResponse Interface
              • ApplePayOptions Interface
              • ApplePayPaymentContact Interface
              • ApplePayGetTokenOptions Interface
              • Untitled Doc
              • Untitled Doc
              • MasterCardBrandingRequest Interface
              • Untitled Doc
              • Untitled Doc
              • Untitled Doc
              • Untitled Doc
              • Untitled Doc
              • Untitled Doc
              • Untitled Doc
              • Untitled Doc
              • Untitled Doc
              • VisaBrandingRequest Interface
              • Untitled Doc
              • Untitled Doc
              • Untitled Doc
            • CarApplePay interface
              • ICardApplePay Interface
            • Errors
              • Untitled Doc
            • Methods
              • Untitled Doc
              • Untitled Doc
              • Untitled Doc
              • requestInitCardBrandingAnimation method
              • Untitled Doc
              • requestBrandsByMerchant method
            • Types
              • Untitled Doc
              • Untitled Doc
              • Untitled Doc
    • Schemas
      • webhooksChargeback
      • one-and-two-step-payment
      • webhooks
      • transactionType
      • threeDomainSecure
      • product
      • payment_submethod
      • paymentMethod
      • orderDetails
      • headers
      • extraTaxes
      • documentType
      • currency
      • currency-cash-in
      • currency-CL
      • binInfo
      • UnexpectedErrorResponse
      • SubscriptionUpdate
      • SubscriptionAdjustmentRequest
      • Subscription
      • Submerchant
      • Shipping-Address
      • Promotions
      • Metadata
      • Language
      • InvalidBinResponse
      • GetConfigurationRequest
      • ErrorResponse
      • Deferred
      • Country
      • ContactDetails
      • ChargesVoidCardResponse
      • Channel
      • Card
      • Billing-Address
      • BadRequestResponse
      • Amount
      • Amount-cash-in
      • Amount-CL
  • APPIAN-SUBMERCHANT-REGISTER
    • Submerchant Validation in Batch
    • Query submerchant status by requestId/submerchantId
    • Get submerchantIds
    • Get credentials for submerchants
  1. Mobile

Kushki Android

The Kushki library for Android allows you to collect payments easily and safely in your Android mobile application.
TIP
We make it easier!
We make it easier! This library handles the complexity of secure payments so you can focus on your app experience.

⚙️ Install and configure#

To use 3DS, add the following Maven repository and credentials to your app-level gradle file.
Installing the Kushki Android library is simple; add the following code to your project's build.gradle file, inside the dependencies section.

🛠️ Usage#

After you finish installing, create an instance of Kushki. This will allow you to perform all the methods available in the SDK.

Configuration Parameters#

Required
PropertyTypeDescriptionDefaultPossible Values
publicMerchantIdStringKushki ID created for your merchant.--
currencyStringCurrency code.USDUSD, COP, CLP, UF, PEN, MXN
Optional
PropertyTypeDescriptionDefaultPossible Values
environmentEnumValue to define if you are in production or test environmentKushkiEnvironment.productionKushkiEnvironment.production , KushkiEnvironment.testing
regionalBooleanDefine if use a static IP to Kushki accessfalsetrue,false

⚡ Examples
Find the methods available in our Android library along with examples.

One-Time Payment Examples#

Security Note
The token delivered by Kushki only encrypts and sends information. If you want to store the card information for future purchases, go to the Recurring Charges section.
💳 Card
⏳ Card Async
🍏 Apple Pay
🏦 Transfer In
💵 Cash In

requestToken()#

To request a card token, you can use this method


Required

PropertyTypeDescription
cardObjectThe card data collected in a card object
totalAmountDoubleThe amount you are going to collect

Optional

PropertyTypeDescriptionPossible Values
contextContextContext of the current state of the application/object. Required for 3DS and Sift implementations.
activityActivityAn application component that provides a screen with which users can interact in order to do something. Required for 3DS implementations.

3DS#

The requestToken method of the Kushki library on android does what is necessary so that merchants that have 3DS activated can verify transactions through this service.
It is necessary to validate that the specificationVersion is greater than 2.0. in implementations with 3DS.
Response
If the 3DS service is not active, a response similar to the following will be returned when consuming the requestToken method

{
     "token": "PmgVbd100000Pe5VEU098014S84wiTFR"
}

If the 3DS service is active, a response similar to the following will be returned when consuming the requestToken method

{
    "token": "PmgVbd100000Pe5VEU098014S84wiTFR",
    "secureService": "3dsecure",
    "secureId": "a80d6cef-90ad-44ca-a2ef-f244301d5e40",
    "security": {
        "acsURL": "https://0merchantacsstag.cardinalcommerce.com/MerchantACSWeb/creq.jsp",
        "authenticationTransactionId": "o6YMk3mdEoAMVMImUpd0",
        "authRequired": true,
        "paReq": "eyJtZXNzYWdlVHlwZSI6IkNSZXMiLCJtZXNzYWdlVmVyc2lvbiI6IjIuMi4wIiwidGhyZWVEU1NlcnZlclRyYW5zSUQiOiJlODIzYWVhMS1hMjM3LTRkNmQtYjlhNC0yY2JjZGZlYjI1YTYiLCJhY3NUcmFuc0lEIjoiY2Q4MThmNDAtOTc1NC00NmRjLTg1YzgtMWU5MDk2MjY1MmMzIiwiYWNzVWlUeXBlIjoiMDIiLCJjaGFsbGVuZ2VDb21wbGV0aW9uSW5kIjoiTiIsImNoYWxsZW5nZ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xjb21tZXJjZS5jb20vTWVyY2hhbnRBQ1NXZWIvc2NyZWVucy9pbWFnZXMvQ2FyZF9OZXR3b3JrLnBuZyIsImV4dHJhSGlnaCI6Imh0dHBzOi8vbWVyY2hhbnRhY3NzdGFnLmNhcmRpbmFsY29tbWVyY2UuY29tL01lcmNoYW50QUNTV2ViL3NjcmVlbnMvaW1hZ2VzL0NhcmRfTmV0d29yay5wbmcifSwic2RrVHJhbnNJRCI6IjJjZWI0NjUxLWUyYzAtNDZjOS04YzAxLWI2ODNjMTM3Nzc5MSIsInN1Ym1pdEF1dGhlbnRpY2F0aW9uTGFiZWwiOiJORVhUIiwiYWNzQ291bnRlckF0b1MiOiIwMDAiLCJleHBhbmRJbmZvTGFiZWwiOiJNb3JlIEluZm9ybWF0aW9uIiwiZXhwYW5kSW5mb1RleHQiOiJIZXJlIGlzIHRoZSBhZGRpdGlvbmFsIGluZm9ybWF0aW9uIHRoYXQgd2UgcHJvdmlkZS4iLCJ3aHlJbmZvTGFiZWwiOiJOZWVkIHNvbWUgaGVscD8iLCJ3aHlJbmZvVGV4dCI6IkhlcmUgaXMgdGhlIGhlbHAgdGhhdCB3ZSBwcm92aWRlLiJ9",
        "specificationVersion": "2.2.0"
    }
}

PROPERTYTYPEDESCRIPTIONPOSSIBLE VALUES
secureServiceStringService used to authenticate the transaction
secureIdStringThe secureId you get from the token response
securityObjectThe security object received from the token response
security.acsURLStringURL of the challenge page of the issuer
security.authenticationTransactionIdStringID of the transaction verified by the brands.
security.specificationVersionString3D Secure version. Must be greater than 2.0
security.paReqStringThis parameter contains zipped Based64-encoded data on the transaction. This parameter is received from the brands.
security.authRequiredBooleanIdentifies whether the 3DS challenge is required or not.

requestSecureValidation()#

It is necessary to validate that the 3DS flow has been completed successfully and that the 3DS challenge has been successfully passed. To do this, the requestSecureValidation() method must be used, sending the secureId parameter obtained from the requestToken() method.


Response
The response object must have the following structure, to complete the valid 3DS flow.

{
    "code": "3DS000",
    "message": "ok"
}

Example


d6d065f2-6e08-4729-953f-d4df9b3bc1ad.gif

getBinInfo()#

Returns an object with the information related to the credit card bin (first eight digits). For Chilean merchants, the response is helpful to decide whether to continue with the request of a card token (when cardType is CREDIT), or with the request of a card async token (when cardType is DEBIT):
Request


Required

PropertyTypeDescription
binStringThe first eight digits of the credit card


Recurring Charges Examples#

💳 Card Subscription
⏳ Async Subscription 🇨🇱

requestSubscriptionToken()#

To request a recurring charge token.
Required Parameters
PropertyTypeDescription
cardObjectThe card data collected in a card object.

Payouts Examples#

💸 Cash Out 🇨🇴

requestCashOutToken()#

To request a Cash Out token.
Required Parameters
PropertyTypeDescriptionPossible Values
nameStringName of the client
lastNameStringLast name of the client
documentTypeStringType of document that the client is using to pay.CC, NIT, CE, TI, PP
identificationStringDocument number that the client is using to pay
totalAmountNumberThe amount you are going to collect as a number
currencyStringCode of currency usedCOP

🚦 Handling Responses#

Once the execution finishes, you need to handle the Transaction object.
Successful Results
The onPostExecute method will receive a Transaction object. If the operation was successful, the token will be available by invoking the getToken method:
Failed Results & Exceptions
If the transaction was not successful, you can retrieve the error details directly from the object:
Error Code: Invoke transaction.getCode()
Description: Invoke transaction.getMessage()
Note: For any unexpected errors, the requestToken method will throw a managed exception of type KushkiException.

🎨 Sensory Branding#

The Card Branding Animation gives users meaningful confirmation of their payment.
Apply this animation only when the user has selected a Mastercard or Visa card to make payment, and play it after a transaction is complete.
Visa
Mastercard
Gradle Setup
Add the following dependencies in your build.gradle file:
Define the view ViewVisaAnimation in the target activity.

Properties#


PropertyTypeRequiredDescriptionDefaultPossible values
backdropColorAndroid colorNoSet a color for the animation background. See Android resource types for more information.white
languageCodeenumNoDefine the language of animation.ENGLISHENGLISH, SPANISH, PORTUGUESE
soundEnabledbooleanNoEnable or disable animation sound.truetrue, false
hapticEnabledbooleanNoEnable or disable animation haptics.truetrue, false
checkmarkModeenumNoShow check mark.CHECKMARKCHECKMARK, CHECKMARK_WITH_TEXT, NONE
checkmarkTextenumNoSet check mark text.APPROVEAPPROVE, COMPLETE, SUCCESS

Get visaAnimationView by the defined activity id:

Also you can define custom properties for the animation:
Finally, trigger the animation:

Properties#

PropertyTypeRequiredDescription
fnOnFinishedAnimationlambdaYesLambda to execute when animation finished.

Next Steps#

Remember that to continue with the payment flow you must send to your back-end the token received.
To start the charge process, please go to our backend integrations: Kushki Libraries or Kushki API


📖 Reference Summary#

Find the methods available in our Android library. You can perform the following operations:
One-time Payment:
Create a Card token
Get Bin Info
Create a Card Async Token
Create a Transfer In token
Create a Cash In token
Recurring Charges
Create a Card recurring charge token
Get an Async Card recurring charge
Get a list of banks available for Recurring Charges With Wire Transfer Debit
Create a Transfer recurring charge token
Start and answer a challenge to validate the account data in Transfer Recurring Charges
Payouts
Create a Cash Out token

One-time Payment#


NameParametersReturnsDescription
requestToken()card, totalAmount, context, activityObjectReturns a token
requestSecureValidation()On the first call: secureService, secureServiceId, cityCode, stateCode, phone, expeditionDocumentDate. On second call: secureService, secureServiceId, questionnaireCode, answers (JSON Object)ObjectOn the first call, returns a questionnaire for the challenge. On second call, returns a code and a message with the results of the account verification
getBinInfo()binObjectReturns an object with the information related to the credit card bin
requestCardAsyncToken()totalAmount, returnUrl, email, descriptionObjectReturns a card async token
requestTransferToken()amount, callbackUrl, documentType, documentNumber, email, paymentDescription, userTypeObjectReturns a transfer in token
requestCashToken()totalAmount, currency, identification, documentType, name, lastName, email, descriptionObjectReturns a cash in token that can later be used to initialize a cash in transaction

Recurring Charges#


NameParametersReturnsDescription
requestSubscriptionToken()cardObjectReturns a recurring charge token
requestCardSubscriptionAsyncTokencurrency, email, cardNumber, callbackUrlObjectReturns an async card recurring charge token
getBankList()ObjectReturns a list of banks available for transfer Recurring Charges
requestTransferSubscriptionToken()documentNumber, bankCode, name, lastName, accountNumber, documentType, accountType, email, currencyObjectReturns a token along with a secureId, and secureService. The token can later be used to create a transfer recurring charge. Before that, you will need to confirm the account data by starting and answering a challenge with the secure validation method

Payouts#


NameParametersReturnsDescription
requestCashOutToken()totalAmount, currency, identification, documentType, name, lastName, email, descriptionObjectReturns a cash out token that can later be used to initialize a cash out transaction

🚀 Example Application#

You can find an example application in our GitHub android project repository.
Got a suggestion on this documentation? Contact Us.
Modified at 2026-02-03 21:17:12
Previous
Release notes
Next
Kushki iOS 
Built with