script tag inside your page to add the features. When adding the following code to your page it will be imported.package.json:npm install:"scripts": {
"postinstall": "node patch.js"
}| 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 |
| Property | Type | Description |
|---|---|---|
amount | String | The amount to collect. |
currency | String | USD, COP, CLP, UF, PEN, MXN. |
card | Object | The card data collected. |
callback | Function | Handles the response. |
| Property | Type | Description |
|---|---|---|
months | Integer | Installments (Chile only). Min: 2, Max: 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 |
|---|---|---|
| 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\u00d2aa20412b0063aca652facd9g\u0034transactionId\u003dQhcf3XOjdZmjve336Vee2gb5rof1",
"authenticationTransactionId": "1d8cf7jg5Bfn8Nj73mn7",
"paReq": "eNpVUtluwjAQfPdXoH5A7DghtGixxFUViRt6iDfXGGJCDpykQL++doDSvu3sjtYzs4ZlqKXsLaQotWQwknnOt7Km1q2HyeIx6EW7w2dn09NjFXnxxn1gMG3P5YHBl9S5ShPmOsShgG8QmRVahDwpGHBx6AzGzKdXoH5A7DghtGixxpVUtluwjAQfPdXoH5A7DghtGixs4ZlqKXsLaQot0u4KqLQKRlUugzC4gP+AYQlHrPwqLImhgfj0cnKvMwUhnfprkj0hiwnSPAxn1gMG3P5YHBl9S5ShPmOsShOqLqJ7x73Gx2vVbgC0DwZoXklFCKXFpo0bcpu83qWht0u4KqLQKRlUugzC4gP+AYQlHrpfUGenfxtGEOl1jIRN0c3hECesjSRhmNC+62Nh7vy7otNVxQmtdkm3Ew/Jrv1Kp0X4elF8Pb6p/n2KH/k0skaqcyeVHfdaulqgoP20X4elF8Pb6p/n2KH/k0sv8\u003d",
"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 | Description |
|---|---|
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. |
| Name | Description |
|---|---|
requestSubscriptionToken() | Returns a recurring charge token. |
requestDeviceToken() | Returns token for one-click payments. |
requestSubscriptionCardAsyncToken() | Returns async card recurring token. |
| Name | Description |
|---|---|
requestPayoutsCashToken() | Returns a cash out token. |
getStatusGateway() | Returns payment methods status. |
getCommissionConfiguration() | Returns commission configuration. |
initCardBrandingAnimation() | Renders sensory branding. |
| 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.