1. Web
Español
  • Español
  • English
  • Bienvenida
    • Home Page
  • Perú 🇵🇪
    • Kushki Developer Portal 🚀
    • Perú 🇵🇪
    • 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
          • Antifraud
            • Interfaces
              • SecureInitRequest
              • SecureInitResponse
              • SiftScienceObject
            • Methods
              • requestInitAntiFraud
              • requestSecureInit
              • requestValidate3DS
          • Card
            • CarApplePay interface
              • ICardApplePay Interface
            • Card-Interface
              • ICard Interface
              • ICardSubscriptions Interface
            • Errors
              • Error list
            • Interfaces
              • Amount
              • ApplePayGetTokenOptions Interface
              • ApplePayOptions Interface
              • ApplePayPaymentContact
              • AppleTokenResponse
              • BrandByMerchantResponse Interface
              • CardFieldValues
              • CardInfo
              • CardOptions
              • CardTokenResponse
              • DeferredByBinOptionsResponse
              • DeferredInputValues
              • DeferredValuesResponse
              • DeviceTokenRequest
              • Field
              • FieldInstance
              • Fields
              • FieldValidity
              • FormValidity
              • MasterCardBrandingRequest
              • SecureDeviceTokenOptions
              • Styles
              • TokenResponse
              • VisaBrandingRequest
            • Methods
              • initApplePayButton
              • initCardToken
              • initSecureDeviceToken
              • requestBrandsByMerchant method
              • requestDeviceToken method
              • requestInitCardBrandingAnimation
            • Types
              • CssProperties
              • Currency
              • FieldTypeEnum
          • Card Payouts
            • Card Payouts Interface
              • ICardPayouts
            • Enumerations
              • Enumeration `InputModelEnum`
            • Errors
              • Errors
            • Interfaces
              • CardPayoutOptions
              • CardPayoutSubscriptionTokenResponse
              • CardPayoutUniqueTokenResponse
              • Field
              • Fields
              • FieldValidity
              • Interface FormValidity
              • Interface `Styles`
            • Methods
              • initCardPayoutToken
            • Type Aliases
              • CardPayoutTokenResponse
              • InputTypeEnum
            • Types
              • CssProperties
          • Kushki
            • Methods
              • init function
              • requestBankList function
              • requestCommissionConfiguration function
            • Classes
              • KushkiError
            • Interfaces
              • CommissionConfigurationRequest
              • IKushki
              • KushkiOptions
    • Raíz
    • Schemas
      • API Raw Card Present
        • metadata
        • extra_taxes
        • card
        • sub_merchant
        • pos_details
        • enc_tlv
        • deferred
        • contact_details
        • card_details
        • amount
      • Chargebacks
      • Commissions
      • Gateway Status
      • ChargebackListResponse
      • StatusComponent
      • currency
      • one-and-two-step-payment
      • webhooksChargeback
      • ChargebackItem
      • webhooks
      • networkToken
      • webhooksItem
      • transactionType
      • ErrorResponse400
      • threeDomainSecure
      • ErrorResponse401
      • product
      • ErrorResponse403
      • payment_submethod
      • ErrorResponse500
      • payment_method
      • paymentMethod
      • orderDetails
      • Shipping Address
      • headers
      • extraTaxes
      • documentType
      • currency
      • currency-cash-in
      • currency-CL
      • binInfo
      • UnexpectedErrorResponse
      • citMit
      • SubscriptionUpdate
      • messageFields
      • network
      • 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
  • México 🇲🇽
    • Bienvenidos
    • ONLINE PAYMENTS
      • CARD
        • CARD
        • 1. Request a card token
        • 2. Make a charge or deferred charge
        • 3. Void a transaction
        • 4. Refund a transaction
        • 5. Request deferred options
        • 6. Authorize payments
        • 7. Reauthorize payments
        • 8. Capture an authorized payment
        • 9. Bin Info
        • 10. Bin Info V2
        • 11. Validate OTP
        • 12. Verify Account
        • 12. Verify Account
        • 6. Authorize payments
        • 10. Bin Info V2
        • 8. Capture an authorized payment
        • 3. Void a transaction
        • 4. Refund a transaction
        • 7. Reauthorize payments
        • 1. Request a card token
        • 9. Bin Info
        • 5. Request deferred options
        • 2. Make a charge or deferred charge
        • 11. Validate OTP
      • CASH IN
        • 1. Request a cash in token
        • 2. Init Transaction
        • 3. Transaction Status
        • 1. Request a cash in token
        • 2. Init Transaction
        • 3. Transaction Status
      • TRANSFER IN
        • 1. Request a Transfer In token
        • 2. Init Transaction
        • 4. Get Status Copy
        • 1. Request a Transfer In token
        • 4. Get Status Copy
        • 2. Init Transaction
      • TRANSFER OUT
        • 1. Get Bank List
        • 2. Request a Transfer Out token
        • 3. Init Transaction
        • 4. Get Status
        • 5. Wallet Balance
        • 5. Wallet Balance
        • 1. Get Bank List
        • 4. Get Status
        • 2. Request a Transfer Out token
        • 3. Init Transaction
      • ONE-CLICK & SCHEDULED PAYMENTS
        • 1. Request a recurring charge token
        • 2. Create a recurring charge
        • 3. Update recurring charge card data
        • 4. Make an One-click payment
        • 5. Cancel a recurring charge
        • 6. Update a recurring charge
        • 7. Add a temporary charge or discount
        • 8. Authorize payments Copy
        • 9. Capture an authorized payment Copy
        • 10. Get recurring charge Info
        • 1. Request a recurring charge token
        • 8. Authorize payments Copy
        • 3. Update recurring charge card data
        • 6. Update a recurring charge
        • 10. Get recurring charge Info
        • 2. Create a recurring charge
        • 5. Cancel a recurring charge
        • 9. Capture an authorized payment Copy
        • 4. Make an One-click payment
        • 7. Add a temporary charge or discount
      • PAYMENT BUTTON
        • 1. Create a payment button
        • 1. Create a payment button
      • SMARTLINKS V2
        • 1. Create a Smartlink
        • 2. Get a Smartlink
        • 3. Delete a Smartlink
        • 4. Update a Smartlink
        • 1. Create a Smartlink
        • 4. Update a Smartlink
        • 2. Get a Smartlink
        • 3. Delete a Smartlink
      • PAYMENT CREDENTIALS
        • 1. Create a credential
        • 2. Search credentials
        • 3. Advanced search
        • 4. Activate or deactivate
        • 5. Delete credential
        • 6. Update credential
        • 7. Regenerate a credential
        • 3. Advanced search
        • 6. Update credential
        • 5. Delete credential
        • 2. Search credentials
        • 4. Activate or deactivate
        • 7. Regenerate a credential
        • 1. Create a credential
      • COMMISSIONS
        • 1. Get Commission Configuration
        • 1. Get Commission Configuration
      • GATEWAY STATUS
        • 1. Get gateway status
        • 1. Get gateway status
      • ANALYTICS
        • 1. Get transactions list
        • 1. Get transactions list
    • CARD PRESENT PAYMENTS (BILLPOCKET)
      • Get token
      • States
      • Validate token
      • Municipalities
      • Collect payments
      • Tax companies
      • Capture an authorized payment
      • Commercial activities
      • Refund
      • Create checkout
      • Get status
      • Get checkout details
      • Collect card payments
      • Print Ticket
      • Collect card payments v2
      • Cancel Push Notification
      • Get transaction status
      • Add or update CLABE account
      • Configure payment link
      • Get payment link configuration
      • Create payment link
      • Update payment link
      • List payment links
      • Delete payment link
      • Add CLABE account
      • Get token
      • Get transaction list
      • Get transaction list v2
      • Get transaction list v3
      • Get transaction list v4
      • Create user
    • CARD PRESENT PAYMENTS (API RAW) Copy Copy
      • error-catalog
      • Test data
      • One-time payments
        • Single payment
      • Two-step-payments
        • Authorization and capture
      • Voids & Refunds
        • Void & Reverse
        • Refund a transaction
      • Card information
        • Balance inquiries
        • Get BIN Info
        • BIN info V2
        • Request deferred options
      • Query Transactions
        • Transaction Search
  • Ecuador 🇪🇨
    • Bienvenidos
    • ONLINE PAYMENTS
      • Card
        • Overview
        • Request a card token
        • Make a charge or deferred charge
        • Void a transaction
        • Request deferred options
        • Validate OTP
        • Refund a transaction
        • Bin Info
        • Bin Info V2
      • One Click Charges
        • Overview
        • Request a recurring charge token
        • Create a recurring charge
        • Make an One-click payment
        • Cancel a recurring charge
        • Add a temporary charge or discount
        • Get recurring charge Info
        • Update a recurring charge
        • Update recurring charge card data
      • Transfer in
        • Overview
        • Get Bank List
        • Request a Transfer In token
        • Init Transaction
        • Get Status
      • Cash in
        • Overview
        • Request a cash in token
        • Init Transaction
        • Transaction Status
        • Update a cash in transaction
        • Delete a cash in transaction
      • Chargebacks
        • Overview
        • Query chargebacks
        • Request chargeback export
      • Smartlinks
        • Overview
        • Create a Smartlink
        • Update a Smartlink
        • Get a Smartlink
        • Delete a smartlink
        • Get a Smartlink
        • Delete a Smartlink
        • Update a Smartlink
        • Create a Smartlink
      • Payment Button
        • Overview
        • Create a payment button
      • Payment Credentials
        • Overview
        • Regenerate a credential
        • Activate or deactivate
        • Update credential
        • Search credentials
        • Delete credential
        • Create a credential
        • Advanced search
      • Gateway Status
        • Overview
        • Get gateway status
      • Analytics
        • Overview
        • Get transactions list v2
        • Get transactions list v1
      • Commissions
        • Commissions
        • Get Commission Configuration
  • Colombia 🇨🇴
    • ANALYTICS
      • Get transactions list v1
      • Get transactions list v2
    • CARD-OUTS
      • Request a cash out token
      • Init Transaction
      • Update a cash out transaction
      • Delete a cash out transaction
      • Transaction Status
    • CARD
      • Bin Info
      • Bin Info V2
      • Request deferred options
      • Request a card token
      • Make a charge or deferred charge
      • Create payment (tokenless)
      • Authorize payments
      • Preauthorization (tokenless)
      • Capture an authorized payment
      • Reauthorize payments
      • Refund a transaction
      • Void a transaction
      • Verify Account
      • Validate OTP
    • 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
      • Void a transaction
      • Balance for Payouts
    • CASH-IN
      • Request a cash in token
      • Init Transaction
      • Update a cash in transaction
      • Delete a cash in transaction
      • Transaction Status
    • CASH-OUT
      • Request a cash out token
      • Init Transaction
      • Update a cash out transaction
      • Delete a cash out transaction
      • Transaction Status
    • COMMISSIONS
      • Get Commission Configuration
    • GATEWAY-STATUS
      • Get gateway status
      • Get platform status
    • ONE-CLICK & SCHEDULED PAYMENTS
      • Request a recurring charge token
      • Update recurring charge card data
      • Update a recurring charge
      • Add a temporary charge or discount
      • Get recurring charge Info
      • Create a recurring charge
      • Make an One-click payment
      • Cancel a recurring charge
      • Authorize payments
      • Capture an authorized payment
    • PAYMENT-BUTTON
      • Create a payment button
    • PAYMENT-CREDENTIALS
      • Advanced search
      • Delete credential
      • Regenerate a credential
      • Search credentials
      • Activate or deactivate
      • Update credential
      • Create a credential
    • SMARTLINKS-V2
      • Create a Smartlink
      • Get a Smartlink
      • Update a Smartlink
      • Delete a smartlink
    • TRANSFER-IN
      • Get Bank List
      • Request a Transfer In token
      • Init Transaction
      • Get Status
    • TRANSFER-OUT
      • Balance for Payouts
      • Get Bank List
      • Get Bank List V2
      • Request a Transfer Out token
      • Init Transaction
      • Get Status
      • Void a transaction
  • Chile 🇨🇱
    • Bienvenidos
    • CARD PRESENT PAYMENTS (API RAW) Copy
      • One-time payments
      • Two-step-payments
      • Voids & Refunds
      • Card information
      • Query Transactions
    • Online Payments
      • Card Async
        • Request a card async token
        • Authorize payments
        • Get Status
        • Capture an authorized payment
        • Init Transaction
      • Async Card Recurring Charges
        • Request an async card recurring charge token
        • Init an async card recurring charge
        • Capture an authorized payment
        • Authorize payments
        • Capture an authorized payment
        • Authorize payments
      • Card
        • Bin Info
        • Bin Info V2
        • Request deferred options
        • Request a card token
        • Make a charge or deferred charge
        • Create payment (tokenless)
        • Authorize payments
        • Capture an authorized payment
        • Reauthorize payments
        • Void a transaction
        • Refund a transaction
        • Voucher
        • Validate OTP
        • Verify Account
      • Chargebacks
        • Query chargebacks
        • Request chargeback export
      • Transfer In
      • Transfer Out
      • Cash In
      • Smartlinks V2
      • Analytics
        • Get transactions list v1
        • Get transactions list v2
      • Gateway Status
        • Get gateway status
      • Commissions
      • Payment Credentials
      • Payment Button
      • Platform Status
      • Subscription Transactions
      • Preauthorization (tokenless)
  1. Web

Kushki.js 🌐

Kushki.js is our JavaScript library for building payment flows with your own style. You can collect all the card information from your client and generate a token that will safely save and send that data to your servers.
TIP
We make it easier!
This library handles the complexity of secure payments so you can focus on your web experience.

📦 Import Kushki.js#

Choose the installation method that fits your project structure.
Option 1 - CDN
Option 2 - NPM
Use a script tag inside your page to add the features. When adding the following code to your page it will be imported.
Update package.json:
Add this to your postinstall scripts to run every time you execute npm install:
"scripts": {
    "postinstall": "node patch.js"
}

🛠️ Usage#

Begin creating your Kushki instance. This will allow you to perform all the functions available in Kushki.js.

Configuration Parameters#

Required
PropertyTypeDescriptionDefaultPossible Values
merchantIdStringKushki ID created for your merchant
inTestEnvironmentbooleanValue to define if you are in production or test environmentfalsetrue , false
Optional
PropertyTypeDescriptionDefaultPossible Values
regionalBooleanDefine if use a static IP to Kushki accessfalsetrue,false

⚡ Examples
Find the methods available in our Kushki.js library along with 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 Examples section.

One-Time Payment Examples#

💳 Card Token
🛡️ 3DS & OTP
⏳ Card Async 🇨🇱
🍏 Apple Pay
🏦 Transfer In
💵 Cash In

requestToken()#

To create a card token, you can use this function.
Required Parameters
PropertyTypeDescription
amountStringThe amount to collect.
currencyStringUSD, COP, CLP, UF, PEN, MXN.
cardObjectThe card data collected.
callbackFunctionHandles the response.
Optional Parameters
PropertyTypeDescription
monthsIntegerInstallments (Chile only). Min: 2, Max: 48.
Response Scenarios
Successful response will be in the function (callback):
{ 
    "token": "90a9f2d93ba508c38971890454897fd4"
}
The following is a response when the merchant has the OTP validation activated:
{ 
    "token": "90a9f2d93ba508c38971890454897fd4",
    "secureId": "5e44449e-869b-4fed-bbca-e1bfa5af53c3",
    "secureService": "KushkiOTP"
}
The following is a response when the merchant has the 3DS validation activated:
{ 
    "token": "90a9f2d93ba508c38971890454897fd4",
    "secureId": "1c3a9ada-1287-4f8b-b1a9-dadf44a39dd3",
    "secureService": "3dsecure",
    "security": {
        "acsURL": "",
        "authenticationTransactionId": "OWgXwASsYPW4hr1ATcf0",
        "authRequired": true,
        "paReq": "sandbox",
        "specificationVersion": "1.0.2"
    }
}
Error response will be in the function (callback):
{ 
  "message":"error-message", 
  "code":"error-code",
  "error": "error-message"
}

requestDeferred()#

To get deferred options according to merchant deferred configurations specified in Backoffice.
Request
Required
PropertyTypeDescription
binStringThe bin that is going to be validated for deferred options
callbackFunction(response)The created callback function()
Response
Successful response will be in the function (callback):

Ecuador#

[
  {
    "name": "Diferido Cuota Fija sin intereses",
    "type": "04",
    "months": ["3", "6", "12"],
    "monthsOfGrace": ["1", "2"]
  },
  {
    "name": "Diferido Cuota Fija con intereses",
    "type": "01",
    "months": ["3", "6", "9"],
    "monthsOfGrace": []
  }
]

Chile: Issuer & Merchant Installments available#

[
  {
    "type": "ALL",
    "months": ["2", "3", "4", "...", "48"],
    "monthsOfGrace": []
  },
  {
    "type": "03",
    "months": ["2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
    "monthsOfGrace": []
  }
]
The Merchant Installments (Cuotas Comercio) feature—identified by specific type "03" is currently in Beta.
ParameterTypeDescriptionCountries/Notes
namestringThe name of the deferred payment option (e.g., "Diferido con intereses," "Meses sin intereses," "Regular").Note: This field may not always be returned in the response.
typestringA code that identifies the deferred option type.The value can be a specific code (e.g., "001", "002") or the keyword "ALL" for countries like Perú or Colombia, where it applies to all deferred options.
monthsstring[]An array of available payment terms (number of months).Required for deferred payments.
monthsOfGracestring[]An array of available grace periods in months.This field is optional and is only present if the bank/card allows a grace period for the specific deferred type.
Error response will be in the function (callback):#
{ 
  "code":"error-code",
  "message":"error-message",
}

requestBinInfo()#

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
callbackFunction(response)The created callback function()

Response#

Successful response will be in the function (callback):

{
    "bank": "BANCO DE LA PRODUCCION S.A. (PRODUBANCO)",
    "brand": "visa",
    "cardType": "debit",
    "country": "Ecuador"
}

Error response will be in the function (callback):

{ 
  "code":"error-code",
  "message":"error-message",
}

Recurring Charges Examples#

💳 Card Subscription
⏳ Card Async 🇨🇱

requestSubscriptionToken()#

To create a recurring charge token.
Required
PropertyTypeDescriptionDefaultPossible Values
cardObjectThe card data collected in an card object
currencyStringCode of currency usedUSDUSD, COP, CLP, UF, PEN, MXN
callbackFunction(response)The created callback function()* Success : { token: "90a9f2d93ba508c38971890454897fd4"} * Error: { message:"error-message", code:"error-code", error: "error-message"}
Response
Successful response will be in the function (callback):
{ 
  "token": "90a9f2d93ba508c38971890454897fd4"
}
Error response will be in the function (callback):
{ 
 "message":"error-message", 
 "code":"error-code",
 "error": "error-message" 
}
The following is a response when the merchant has the 3DS validation activated:
{
    "token": "oaACBE1012310zYTjE239227yqFRA8r7",
    "secureService": "3dsecure",
    "secureId": "e356d68d-3f31-4134-a9a7-8cba46b3cdac",
    "security": {
        "acsURL": "https://authentication.cardinalcommerce.com/ThreeDSecure/V1_0_2/PayerAuthentication?issuerId\u00d2aa20412b0063aca652facd9g\u0034transactionId\u003dQhcf3XOjdZmjve336Vee2gb5rof1",
        "authenticationTransactionId": "1d8cf7jg5Bfn8Nj73mn7",
        "paReq": "eNpVUtluwjAQfPdXoH5A7DghtGixxFUViRt6iDfXGGJCDpykQL++doDSvu3sjtYzs4ZlqKXsLaQotWQwknnOt7Km1q2HyeIx6EW7w2dn09NjFXnxxn1gMG3P5YHBl9S5ShPmOsShgG8QmRVahDwpGHBx6AzGzKdXoH5A7DghtGixxpVUtluwjAQfPdXoH5A7DghtGixs4ZlqKXsLaQot0u4KqLQKRlUugzC4gP+AYQlHrPwqLImhgfj0cnKvMwUhnfprkj0hiwnSPAxn1gMG3P5YHBl9S5ShPmOsShOqLqJ7x73Gx2vVbgC0DwZoXklFCKXFpo0bcpu83qWht0u4KqLQKRlUugzC4gP+AYQlHrpfUGenfxtGEOl1jIRN0c3hECesjSRhmNC+62Nh7vy7otNVxQmtdkm3Ew/Jrv1Kp0X4elF8Pb6p/n2KH/k0skaqcyeVHfdaulqgoP20X4elF8Pb6p/n2KH/k0sv8\u003d",
        "specificationVersion": "1.0.2",
        "authRequired": true
    }

}
Below is the description of these variables:
ParameterTypeDescription
authRequiredBooleanThis field indicates whether or not a 3DS challenge is required.
acsURLStringRefers to the URL of the challenge page that the user must pass (Access Control System)
specificationVersionStringIt refers to the 3DS version
authenticationTransactionIdStringTransaction ID verified from Visa and Mastercard
paReqStringPayer Authentication Request. It is a base64 encoded field that contains information about your merchant and the cardholder and that is sent to the issuer for authentication.

Note: if you are testing in a UAT environment, sandbox must be sent.
Once you receive the Token response with the above structure, you must send the security object to Kushki by consuming the requestValidate3DS method:

requestSecureInit()#

OPTIONAL. This method allows you to obtain the Json Web token (JWT) for 100% API integrations with 3DS.
Request
Required
PROPERTYTYPEDESCRIPTIONPOSSIBLE VALUES
cardObjectBin number (8 digits) collected in an object
Response
Successful response will be in the function (callback):
{
  "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NTQ2NTY4ODYsImlhdCI6MTY1NDY0OTY4NiwiaXNzIjoiNWVhMzJmZDJmZjQ2NDU2OTY3YjUyNDliIiwianRpIjoiMDFhZTQyYWUtYzMyZS00YWRjLWFmOWQtZWVhMmFlNjRkMDkxIiwiT3JnVW5pdElkIjoiNWVhMzJmZDJhZDA3ZDIxYTM2OTc4OGFlIiwiUmVmZXJlbmNlSWQiOiI3ZjY1NzM5NS0yMDIwLTQ1ZjEtOTY4Mi05MzJiNTU5YWYzMWIifQ.JUkk70Kg4KlUYW7eIvsW8LoDhxJeG8P00VrJH9oQipc"
}
Error response will be in the function (callback):
{ 
  "message":"error-message", 
  "code":"error-code",
  "error": "error-message"
}

requestValidate3DS()#

OPTIONAL. This method allows to perform the 3DS authentication by the cardholder in case it is required.
Request
Use the following cards in test mode to make sure your integration is ready. Use them with any CVV, 1234 as OTP code and future expiration date.
Transaction approved with 3DS authentication required:
4456528080389860
4456529267234200
4456529165328302
4456524869770255
4456523340069956
Transaction approved without 3DS validation:
4456540000000063
4456543371713314
4456541982068615
4456541249811088
Parameters
PROPERTYTYPEDESCRIPTIONPOSSIBLE VALUES
secureIdStringThe secureId you get from the token or recurring charge token response
securityObjectThe security object received from the token response
acsURLStringURL of the challenge page of the issuer
authenticationTransactionIdStringID of the transaction verified by the brands.
specificationVersionString3D Secure version
paReqStringThis parameter contains zipped Based64-encoded data on the transaction. This parameter is received from the brands.
authRequiredBooleanIdentifies whether the 3DS challenge is required or not.
callbackFunction(response)The created callback function()
Response
The following response will be in the function (callback):
{isValid:true}
Error response will be in the function (callback):
{ 
  "message":"error-message", 
  "code":"error-code"
}
If the transaction is declined for the authentication, its result will be included as part of the response of the charge with 322 and any of the subcodes specified in the error code list.
If the value of the authRequired variable is equal to true the modal for OTP validation will be displayed and your client will then receive the value to enter by email or text message.
If the value of the authRequired variable is equal to false, the OTP validation modal will not be displayed.
The response to this call will be received in the callback function. If it is positive, it sends the token to the back-end to continue with the transaction.

requestDeviceToken()#

This method is required for executing one-click payments. Find more information in our guide to generate One-Click payments.
Request
Required
PropertyTypeDescriptionDefaultPossible Values
subscriptionIdStringSubscriptionId that was previously created
callbackFunction(response)The created callback function()* Success : { token: "90a9f2d93ba508c38971890454897fd4"} * Error: { message:"error-message", code:"error-code", error: "error-message"}
amount (only required for 3DS authentication)ObjectThe value of the purchase
currency (only required for 3DS authentication)StringCode of currency usedUSD, PEN
Response
Successful response will be in the function (callback):
{ 
  "token": "90a9f2d93ba508c38971890454897fd4"
}
Error response will be in the function (callback):
{ 
  "message":"error-message", 
  "code":"error-code",
  "error": "error-message" 
}

Payouts Examples#

💸 Cash Out

requestPayoutsCashToken()#

To create a Cash Out token.
Required
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
documentNumberStringDocument number that the client is using to pay
totalAmountNumberThe amount you are going to collect as a number
currencyStringCode of currency usedCOP
callbackFunction(response)The created callback function()* Success : { token: "90a9f2d93ba508c38971890454897fd4"} * Error: { message:"error-message", code:"error-code", error: "error-message"}
Optional
PropertyTypeDescription
emailStringEmail address of the client
paymentDescriptionStringA description of the payment
Response
Successful response will be in the function (callback):
{ 
    "token": "90a9f2d93ba508c38971890454897fd4"
}
Error response will be in the function (callback):
{ 
  "message":"error-message", 
  "code":"error-code",
  "error": "error-message"
}

Other Examples#

Gateway Status
Commissions
🎨 Card Branding Animation

getStatusGateway()#

To get the status of all the payment methods configured for a specific merchant.
Request
Required
PropertyTypeDescription
callbackFunction(response)The created callback function()
Response
The response will be in the function (callback):
[
    {
      "card": true,
      "transfer": true,
      "cash": true
    }
]

📖 Reference Summary#

One-Time Payment#

NameDescription
requestToken()Returns a card token (supports 3DS/OTP).
requestSecureServiceValidation()Validates OTP.
requestSecureInit()Gets JWT for 3DS API integration.
requestValidate3DS()Performs 3DS authentication flow.
requestDeferred()Gets deferred payment options.
requestBinInfo()Gets BIN information.
requestCardAsyncToken()Returns a card async token.
requestBankList()Returns list of banks (Transfer In).
requestTransferToken()Returns a transfer in token.
requestCashToken()Returns a cash in token.

Recurring Charges#

NameDescription
requestSubscriptionToken()Returns a recurring charge token.
requestDeviceToken()Returns token for one-click payments.
requestSubscriptionCardAsyncToken()Returns async card recurring token.

Others#

NameDescription
requestPayoutsCashToken()Returns a cash out token.
getStatusGateway()Returns payment methods status.
getCommissionConfiguration()Returns commission configuration.
initCardBrandingAnimation()Renders sensory branding.

One-Time Payment#

NameParametersReturnsDescription
requestToken()card, amount, currency, months, callbackObjectReturns a token of a credit card. Make sure they are outside of your main form (PCI COMPLIANCE). If the merchant has the OTP validation activated, this method will also return a secureId and a secureService that can later be used to validate the OTP.
requestSecureServiceValidation()secureServiceId, otpValue, callbackObjectReturns whether the OTP is valid or not.
requestSecureInit()card, callbackObjectThis method allows you to obtain the Json Web token (JWT) for 100% API integrations with 3DS.
requestValidate3DS()secureId, security, acsURL, authenticationTransactionId, specificationVersion, paReq, authRequired, callbackObjectThis method allows to perform the 3DS authentication by the cardholder in case it is required.
requestDeferred()binBody, callbackObjectReturns an object with deferred options that are allowed for Ecuadorian, Mexican, and Peruvian merchants.
requestBinInfo()binBody, callbackObjectReturns an object with the information related to the credit card bin.
requestCardAsyncToken()totalAmount, currency, returnUrl, email, description, callbackObjectReturns a card async token.
requestBankList()callbackObjectReturns a list of banks available for Transfer In.
requestTransferToken()bankId, amount, email, callbackUrl, documentType, documentNumber, currency, paymentDesc, userType, callbackObjectReturns a transfer in token.
requestTransferSubscriptionToken()email, callbackObjectReturns a transfer in token (Mexico only).
requestCashToken()name, lastName,documentType, identification, email, totalAmount, currency,description, callbackObjectReturns a cash in token.

Recurring Charges#

NameParametersReturnsDescription
requestSubscriptionToken()card, currency, callbackObjectReturns a token of a recurring charge. Make sure they are outside of your main form (PCI COMPLIANCE).
requestSecureInit()card, callbackObjectThis method allows you to obtain the Json Web token (JWT) for 100% API integrations with 3DS.
requestValidate3DS()secureId, security, acsURL, authenticationTransactionId, specificationVersion, paReq, authRequired, callbackObjectThis method allows to perform the 3DS authentication by the cardholder in case it is required.
requestDeviceToken()subscriptionId, callbackObjectReturns the token of a specific recurring charge.
requestSubscriptionCardAsyncToken()currency, email, cardNumber, callbackUrl, callbackObjectReturns an async card recurring charge token.

Payouts#

NameParametersReturnsDescription
requestPayoutsCashToken()name, lastName,documentType, identification, email, totalAmount, currency,paymentDescription, callbackObjectReturns a cash out token.

Others#

NameParametersReturnsDescription
getStatusGateway()callbackObjectReturns the status of all the payment methods configured for a specific merchant.
getCommissionConfiguration()totalAmount, currency, callbackObjectReturns the information related to the commission charge configured for a specific merchant.
initCardBrandingAnimation()callback, constrained, color, sound, checkmarkObjectThe Card Branding Animation gives users meaningful confirmation of their payment.
Got a suggestion on this documentation? Contact Us.
Modified at 2026-03-13 14:08:17
Previous
Kushki iOS ARM Setup
Next
kushki.js Hosted Fields
Built with