
kushki-checkout.js script in your payment page by adding it to the <head> of your HTML file. Always load kushki-checkout directly from cdn.kushkipagos.com. Do not include the script in a bundle or package or host a copy of it.<body>, where you want the payment form to be displayed.action form according to the corresponding endpoint in your back-end. This will allow you to obtain the token.script tag.script tag at the end of the <body> of your payment page.Kushki Object.<script> tag inside the <body> tag. Once imported, you will be able to access the resources described below to create a payment flow with Kushki.kushki.min.js (which brings the necessary code to store your merchant's credentials) and card.min.js (the module that brings the necessary functionalities for the flow with card payments).KushkiOptionsKushkiOptions which allows you to set the public key of the work environment (test or production) through the init() method.initCardToken() method, it is required to place the necessary elements to be able to render each hosted field.CardOptionsCardOptions with the transaction information, such as the amount, currency, among other parameters.isSubscription property with a value of true.CardOptions, you need to call the initCardToken() function to initialize an instance of ICard.requestToken() method on the previously initialized card instance. This method performs 3DS and Sift Science validations automatically. Also, validate that all the fields are correct; otherwise it will throw an exception.ignoreWarnings parameter to false, include the document type and number, first name, first last name and second last name in the contactDetails object. If you decide to skip this validation, set the ignoreWarnings parameter to true value. __rules object, and there are three possible responses:| Response | Parameters Received | What to do? |
|---|---|---|
| Transaction approved | {"code": "000","message":"TransUnion Approval"} {"code": "000","message":"ExperianSignature Approval"} | No further action will be necessary, the transaction will be sent to create the subscription and, according to the response, it redirects the user to a success or failure page to inform the customer if the subscription was created successfully or not. |
| Rejected transaction: (Validation not possible) | {" code ":" 006 "," message ":" TransUnion Unavailable "} {" code ":" 006 "," message ":" ExperianSignature Unavailable "} | Check that the documentNumber and documentType parameters have been sent in the contactDetails object and retry. |
| Rejected transaction | {"code": "322","message": "TransUnion Declined"} {"code": "322","message": "Card number does not correspond to the given identification"} | If the transaction has been declined by the validation system, you will have two options: 1)Ignore the alert and create the subscription: In this case, you must go back to the previous step, making sure to send the ignoreWarnings parameter to true and the same token already generated 2) Abide by the alert and reject the transaction. |
ignoreWarnings with a value of true and get a negative response from the validation service (code 322), the transaction will be declined.54519515749254804574441215190335.contactDetails object.5642569816497595.80004393.CC5642569816497595.8000000.CCdocumentNumber or documentType in the contactDetails object.