script tag inside your page to add the features. When adding the following code to your page it will be imported.npm install, include the following code in your package.json as a part of the postinstall scripts:| Property | Type | Description | Default | Possible Values |
|---|---|---|---|---|
| merchantId | String | Kushki ID created for your merchant | ||
| inTestEnvironment | boolean | Value to define if you are in production or test environment | false | true , false |
| Property | Type | Description | Default | Possible Values |
|---|---|---|---|---|
| regional | Boolean | Define if use a static IP to Kushki access | false | true,false |
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.
| Property | Type | Description | Default | Possible Values |
|---|---|---|---|---|
| amount | String | The amount you are going to collect as a string | ||
| currency | String | Code of currency used | USD | USD, COP, CLP, UF, PEN, MXN |
| card | Object | The card data collected in an card object | ||
| callback | Function(response) | The created callback function() | * Success : { token: "90a9f2d93ba508c38971890454897fd4"} * With OTP validation activated : { token: "90a9f2d93ba508c38971890454897fd4", secureId: "5e44449e-869b-4fed-bbca-e1bfa5af53c3", secureService: "KushkiOTP"} * Error: { message:"error-message", code:"error-code", error: "error-message"} |
| Property | Type | Description | Possible Values |
|---|---|---|---|
| months | Integer | Number of installments. Required only for deferred transactions in Chile | Minimum: 2, maximum: 48 |
callback):{
"token": "90a9f2d93ba508c38971890454897fd4"
}{
"token": "90a9f2d93ba508c38971890454897fd4",
"secureId": "5e44449e-869b-4fed-bbca-e1bfa5af53c3",
"secureService": "KushkiOTP"
}{
"token": "90a9f2d93ba508c38971890454897fd4",
"secureId": "1c3a9ada-1287-4f8b-b1a9-dadf44a39dd3",
"secureService": "3dsecure",
"security": {
"acsURL": "",
"authenticationTransactionId": "OWgXwASsYPW4hr1ATcf0",
"authRequired": true,
"paReq": "sandbox",
"specificationVersion": "1.0.2"
}
}callback):{
"message":"error-message",
"code":"error-code",
"error": "error-message"
}| Property | Type | Description | Possible Values |
|---|---|---|---|
| secureServiceId | String | The secureId you get from the token request | |
| otpValue | String | Three-digit number that corresponds to the OTP | For the OTP sandbox, the value will change depending on the credit card currency: 155 for USD and PEN, 555 for COP and MXN, 150 for CLP |
| callback | Function(response) | The created callback function() | * Success : { isValid: true} * Error: { message:"error-message", code:"error-code", error: "error-message"} |
callback):{
"code": "OTP000",
"message": "ok"
}322 and any of the subcodes specified in the error code list.| PROPERTY | TYPE | DESCRIPTION | POSSIBLE VALUES |
|---|---|---|---|
| card | Object | Bin number (8 digits) collected in an object |
callback):{
"jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NTQ2NTY4ODYsImlhdCI6MTY1NDY0OTY4NiwiaXNzIjoiNWVhMzJmZDJmZjQ2NDU2OTY3YjUyNDliIiwianRpIjoiMDFhZTQyYWUtYzMyZS00YWRjLWFmOWQtZWVhMmFlNjRkMDkxIiwiT3JnVW5pdElkIjoiNWVhMzJmZDJhZDA3ZDIxYTM2OTc4OGFlIiwiUmVmZXJlbmNlSWQiOiI3ZjY1NzM5NS0yMDIwLTQ1ZjEtOTY4Mi05MzJiNTU5YWYzMWIifQ.JUkk70Kg4KlUYW7eIvsW8LoDhxJeG8P00VrJH9oQipc"
}callback):{
"message":"error-message",
"code":"error-code",
"error": "error-message"
}1234 as OTP code and future expiration date.445652808038986044565292672342004456529165328302445652486977025544565233400699564456540000000063445654337171331444565419820686154456541249811088| PROPERTY | TYPE | DESCRIPTION | POSSIBLE VALUES |
|---|---|---|---|
| secureId | String | The secureId you get from the token or recurring charge token response | |
| security | Object | The security object received from the token response | |
| acsURL | String | URL of the challenge page of the issuer | |
| authenticationTransactionId | String | ID of the transaction verified by the brands. | |
| specificationVersion | String | 3D Secure version | |
| paReq | String | This parameter contains zipped Based64-encoded data on the transaction. This parameter is received from the brands. | |
| authRequired | Boolean | Identifies whether the 3DS challenge is required or not. | |
| callback | Function(response) | The created callback function() |
callback):{isValid: true}callback):{
"message":"error-message",
"code":"error-code"
}322 and any of the subcodes specified in the error code list.| Property | Type | Description |
|---|---|---|
| bin | String | The bin that is going to be validated for deferred options |
| callback | Function(response) | The created callback function() |
callback):[
{
"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": []
}
][
{
"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.
| Parameter | Type | Description | Countries/Notes |
|---|---|---|---|
name | string | The 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. |
type | string | A 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. |
months | string[] | An array of available payment terms (number of months). | Required for deferred payments. |
monthsOfGrace | string[] | 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. |
callback):{
"code":"error-code",
"message":"error-message",
}CREDIT), or with the request of a card async token (when cardType is DEBIT):| Property | Type | Description |
|---|---|---|
| bin | String | The first eight digits of the credit card |
| callback | Function(response) | The created callback function() |
callback):{
"bank": "BANCO DE LA PRODUCCION S.A. (PRODUBANCO)",
"brand": "visa",
"cardType": "debit",
"country": "Ecuador"
}callback):{
"code":"error-code",
"message":"error-message",
}| Property | Type | Description | Default | Possible Values |
|---|---|---|---|---|
| card | Object | The card data collected in an card object | ||
| currency | String | Code of currency used | USD | USD, COP, CLP, UF, PEN, MXN |
| callback | Function(response) | The created callback function() | * Success : { token: "90a9f2d93ba508c38971890454897fd4"} * Error: { message:"error-message", code:"error-code", error: "error-message"} |
callback):{
"token": "90a9f2d93ba508c38971890454897fd4"
}callback):{
"message":"error-message",
"code":"error-code",
"error": "error-message"
}{
"token": "oaACBE1012310zYTjE239227yqFRA8r7",
"secureService": "3dsecure",
"secureId": "e356d68d-3f31-4134-a9a7-8cba46b3cdac",
"security": {
"acsURL": "https://authentication.cardinalcommerce.com/ThreeDSecure/V1_0_2/PayerAuthentication?issuerIdΓaa20412b0063aca652facd9g4transactionId=Qhcf3XOjdZmjve336Vee2gb5rof1",
"authenticationTransactionId": "1d8cf7jg5Bfn8Nj73mn7",
"paReq": "eNpVUtluwjAQfPdXoH5A7DghtGixxFUViRt6iDfXGGJCDpykQL++doDSvu3sjtYzs4ZlqKXsLaQotWQwknnOt7Km1q2HyeIx6EW7w2dn09NjFXnxxn1gMG3P5YHBl9S5ShPmOsShgG8QmRVahDwpGHBx6AzGzKdXoH5A7DghtGixxpVUtluwjAQfPdXoH5A7DghtGixs4ZlqKXsLaQot0u4KqLQKRlUugzC4gP+AYQlHrPwqLImhgfj0cnKvMwUhnfprkj0hiwnSPAxn1gMG3P5YHBl9S5ShPmOsShOqLqJ7x73Gx2vVbgC0DwZoXklFCKXFpo0bcpu83qWht0u4KqLQKRlUugzC4gP+AYQlHrpfUGenfxtGEOl1jIRN0c3hECesjSRhmNC+62Nh7vy7otNVxQmtdkm3Ew/Jrv1Kp0X4elF8Pb6p/n2KH/k0skaqcyeVHfdaulqgoP20X4elF8Pb6p/n2KH/k0sv8=",
"specificationVersion": "1.0.2",
"authRequired": true
}
}| Parameter | Type | Description |
|---|---|---|
authRequired | Boolean | This field indicates whether or not a 3DS challenge is required. |
acsURL | String | Refers to the URL of the challenge page that the user must pass (Access Control System) |
specificationVersion | String | It refers to the 3DS version |
| authenticationTransactionId | String | Transaction ID verified from Visa and Mastercard |
paReq | String | Payer 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. |
security object to Kushki by consuming the requestValidate3DS method:| PROPERTY | TYPE | DESCRIPTION | POSSIBLE VALUES |
|---|---|---|---|
| card | Object | Bin number (8 digits) collected in an object |
callback):{
"jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NTQ2NTY4ODYsImlhdCI6MTY1NDY0OTY4NiwiaXNzIjoiNWVhMzJmZDJmZjQ2NDU2OTY3YjUyNDliIiwianRpIjoiMDFhZTQyYWUtYzMyZS00YWRjLWFmOWQtZWVhMmFlNjRkMDkxIiwiT3JnVW5pdElkIjoiNWVhMzJmZDJhZDA3ZDIxYTM2OTc4OGFlIiwiUmVmZXJlbmNlSWQiOiI3ZjY1NzM5NS0yMDIwLTQ1ZjEtOTY4Mi05MzJiNTU5YWYzMWIifQ.JUkk70Kg4KlUYW7eIvsW8LoDhxJeG8P00VrJH9oQipc"
}callback):{
"message":"error-message",
"code":"error-code",
"error": "error-message"
}1234 as OTP code and future expiration date.445652808038986044565292672342004456529165328302445652486977025544565233400699564456540000000063445654337171331444565419820686154456541249811088| PROPERTY | TYPE | DESCRIPTION | POSSIBLE VALUES |
|---|---|---|---|
| secureId | String | The secureId you get from the token or recurring charge token response | |
| security | Object | The security object received from the token response | |
| acsURL | String | URL of the challenge page of the issuer | |
| authenticationTransactionId | String | ID of the transaction verified by the brands. | |
| specificationVersion | String | 3D Secure version | |
| paReq | String | This parameter contains zipped Based64-encoded data on the transaction. This parameter is received from the brands. | |
| authRequired | Boolean | Identifies whether the 3DS challenge is required or not. | |
| callback | Function(response) | The created callback function() |
callback):{isValid:true}callback):{
"message":"error-message",
"code":"error-code"
}322 and any of the subcodes specified in the error code list.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.authRequired variable is equal to false, the OTP validation modal will not be displayed.callback function. If it is positive, it sends the token to the back-end to continue with the transaction.| Property | Type | Description | Default | Possible Values |
|---|---|---|---|---|
| subscriptionId | String | SubscriptionId that was previously created | ||
| callback | Function(response) | The created callback function() | * Success : { token: "90a9f2d93ba508c38971890454897fd4"} * Error: { message:"error-message", code:"error-code", error: "error-message"} | |
| amount (only required for 3DS authentication) | Object | The value of the purchase | ||
| currency (only required for 3DS authentication) | String | Code of currency used | USD, PEN |
callback):{
"token": "90a9f2d93ba508c38971890454897fd4"
}callback):{
"message":"error-message",
"code":"error-code",
"error": "error-message"
}| Property | Type | Description | Possible Values |
|---|---|---|---|
| name | String | Name of the client | |
| lastName | String | Last name of the client | |
| documentType | String | Type of document that the client is using to pay. | CC, NIT, CE, TI, PP |
| documentNumber | String | Document number that the client is using to pay | |
| totalAmount | Number | The amount you are going to collect as a number | |
| currency | String | Code of currency used | COP |
| callback | Function(response) | The created callback function() | * Success : { token: "90a9f2d93ba508c38971890454897fd4"} * Error: { message:"error-message", code:"error-code", error: "error-message"} |
| Property | Type | Description |
|---|---|---|
| String | Email address of the client | |
| paymentDescription | String | A description of the payment |
callback):{
"token": "90a9f2d93ba508c38971890454897fd4"
}callback):{
"message":"error-message",
"code":"error-code",
"error": "error-message"
}| Property | Type | Description |
|---|---|---|
| callback | Function(response) | The created callback function() |
callback):[
{
"card": true,
"transfer": true,
"cash": true
}
]| Name | Parameters | Returns | Description |
|---|---|---|---|
| requestToken() | card, amount, currency, months, callback | Object | Returns 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, callback | Object | Returns whether the OTP is valid or not. |
| requestSecureInit() | card, callback | Object | This method allows you to obtain the Json Web token (JWT) for 100% API integrations with 3DS. |
| requestValidate3DS() | secureId, security, acsURL, authenticationTransactionId, specificationVersion, paReq, authRequired, callback | Object | This method allows to perform the 3DS authentication by the cardholder in case it is required. |
| requestDeferred() | binBody, callback | Object | Returns an object with deferred options that are allowed for Ecuadorian, Mexican, and Peruvian merchants. |
| requestBinInfo() | binBody, callback | Object | Returns an object with the information related to the credit card bin. |
| requestCardAsyncToken() | totalAmount, currency, returnUrl, email, description, callback | Object | Returns a card async token |
| requestBankList() | callback | Object | Returns a list of banks available for Transfer In |
| requestTransferToken() | bankId, amount, email, callbackUrl, documentType, documentNumber, currency, paymentDesc, userType, callback | Object | Returns a transfer in token |
| requestTransferSubscriptionToken() | email, callback | Object | Returns a transfer in token (Mexico only) |
| requestCashToken() | name, lastName,documentType, identification, email, totalAmount, currency,description, callback | Object | Returns a cash in token |
| Name | Parameters | Returns | Description |
|---|---|---|---|
| requestSubscriptionToken() | card, currency, callback | Object | Returns a token of a recurring charge. Make sure they are outside of your main form (PCI COMPLIANCE). |
| requestSecureInit() | card, callback | Object | This method allows you to obtain the Json Web token (JWT) for 100% API integrations with 3DS. |
| requestValidate3DS() | secureId, security, acsURL, authenticationTransactionId, specificationVersion, paReq, authRequired, callback | Object | This method allows to perform the 3DS authentication by the cardholder in case it is required. |
| requestDeviceToken() | subscriptionId, callback | Object | Returns the token of a specific recurring charge. |
| requestSubscriptionCardAsyncToken() | currency, email, cardNumber, callbackUrl, callback | Object | Returns an async card recurring charge token. |
| Name | Parameters | Returns | Description |
|---|---|---|---|
| requestPayoutsCashToken() | name, lastName,documentType, identification, email, totalAmount, currency,paymentDescription, callback | Object | Returns a cash out token |
| Name | Parameters | Returns | Description |
|---|---|---|---|
| getStatusGateway() | callback | Object | Returns the status of all the payment methods configured for a specific merchant |
| getCommissionConfiguration() | totalAmount, currency, callback | Object | Returns the information related to the commission charge configured for a specific merchant |
| initCardBrandingAnimation() | callback, constrained, color, sound, checkmark | Object | The Card Branding Animation gives users meaningful confirmation of their payment. |
Got a suggestion on this documentation? Contact Us.