Your customers will be able to use the balance in their bank account to make purchases on your website or application
Web
iOS
Android
Allow your customers to use the available balance in their bank account or in their digital wallet to purchase your products or services from your website. In Ecuador you can process transfers with two processors:
Traditional bank transfer: you obtain the basic data of your paying customer and redirect them to the electronic banking system to authorize the debit to their bank account.
DeUna!: your customer pays with the balance of their DeUna! account from the app, using a dynamic QR, a deep link or a reference code.
The integration flow is the same in both cases —you tokenize in the front end and start the transaction in the back end— and the only thing that changes is the way your customer completes the payment.The payment flow with traditional bank transfer that you will integrate is as shown below:The payment flow with DeUna! is as shown below:
DeUna! activation
DeUna! is enabled as a processor for your merchant from the Kushki Console, and the Kushki team does it. There is no parameter in the request to select the processor: once enabled, the same Init Transaction endpoint starts returning the DeUna! fields.
Important
Due to our risk policies, the available payment methods and the integration type may vary once you complete the affiliation. We will tell you how to proceed if this process applies to your merchant.
The front end is responsible for collecting the user's main data, generating a token for such information through Kushki's servers, and sending that information to the back end to start the payment process.You have two options to integrate: Kajita and Kushki.js.
If you are going to use DeUna!, choose your option carefully
The three DeUna! payment experiences are not available in every integration type:
Deep link: available with API · Kushki.js and with Kajita · SmartLinks.
Reference code: available with API · Kushki.js and with Kajita · SmartLinks.
Dynamic QR: only with API · Kushki.js. Kajita does not render it.
DeUna! logo in the checkout: your own design with API · Kushki.js; Kajita shows a generic transfer text instead.
Traditional transfer and DeUna! in parallel: only with API · Kushki.js. Kajita supports one processor only.
If you need the QR, your own DeUna! logo or both processors running in parallel, integrate with Kushki.js or directly with the API. Kajita does not cover those cases.
Kushki has payment forms ready to collect payment information securely. You can use any of our versions:
Cajita: the first version of the predefined payment form. Not customizable.
Kajita: the second version. It allows you to customize your payment forms from your Administration Console and even have several versions of Kajita, for example, one for each payment method.
Include the 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.
Kajita needs a space within your page. Enter the following code in your website's <body>, where you want the payment form to be displayed.For Kajita (v.2):
For Cajita (v.1):
Remember to configure the action of the action form according to the corresponding endpoint in your back end, to obtain the token.Then, add the script tag.For Kajita (v.2) you can obtain such script from your Administration Console, as explained in Create and customize your Kajitas.
For v.1 (Cajita), add the following script, making sure the form has loaded:
This will create a predesigned form on your website to accept payments.
You can use Kajita to offer not only wire transfer payments, but also card or cash payments.
Collect user information and send it to your back-end#
First, embed the form in your payment page adding the required fields. You can design it as you prefer.For example:
Send notifications to your customers
If you want your customers to be notified of their transactions, make sure to capture your customer's email address in the payment form. In addition to this, remember to enable the notification option from your administration console.
Then, for the moment when the user submits the form, add a token request and send it to your back end.
Tokenization does not change with DeUna!
The token request is identical for traditional transfer and for DeUna!. There are no new fields and no parameter to select the processor: the difference only appears in the response of the transaction init, in the back end.
The back end is responsible for receiving the token obtained from your front end and starting the payment process with Kushki.When the user submits the form, your front end sends a token to an endpoint that you specified previously. Using this token, you must make a call to our charge endpoint to start the charge process.
The transaction init requires the Private-Merchant-Id header. Never expose your Private Key in front-end code: this call must always be made from your back end.
The response of the transaction init depends on the processor enabled for your merchant.With traditional bank transfer, redirect the user to the URL that Kushki returns in redirectUrl so that your customer can authenticate in the virtual portal of their bank entity and authorize the transaction amount to be debited from the balance of their bank account.With DeUna!, the same call returns three new fields, one for each payment experience. A single request returns all three: you decide which one to display, based on the channel your customer is buying through.
qr — Dynamic QR, as a Base64 PNG. Best for desktop checkout: the customer scans with their phone.
redirectUrl — Deep link that opens the DeUna! app. Best for mobile web or your own app: opens DeUna! in one tap.
referenceCode — Reference code the customer types into the app. Alternative when the camera fails or the customer prefers to type.
The qr field contains a PNG image encoded in Base64, with the data:image/png;base64, prefix already included. You must read the value and render it as an image in your checkout: Kushki does not host the QR image for you.
Do not add the prefix twice
Because qr already carries the data:image/png;base64, prefix, concatenating it again produces an invalid data URI and the image fails silently: you will see a blank space with no error in the console.
The referenceCode field is a 6-digit numerical key.
You have 3 minutes
The QR, the deep link and the reference code expire in 3 minutes, while the transaction token lasts 30 minutes. Generate the payment experience at the moment your customer is ready to pay, show a countdown on screen, and request a new token if it expires.
Once the payment is completed, the customer will be returned with a GET call to the callbackUrl you specified when requesting the token.Along with the return URL, we will send the transaction token in the path, with which you can check the status of the transaction using this endpoint. In addition, you will obtain the necessary information for your customer's payment voucher.For example, for callbackUrl = 'http://www.example.com' the customer will return to:GET https://www.example.com/?token=26735cbb653a421ba7138eb515e0ab1dwhere token is equal to 26735cbb653a421ba7138eb515e0ab1dAccording to the response that you receive from the transaction status, show the user a success or failure screen to inform the customer whether the payment was made correctly or if there was an error.
With DeUna! the return is not guaranteed
If you display the QR or the reference code, your customer pays from their phone and may never return to your callbackUrl: there is no redirection to bring them back. Do not use the return as proof of payment.Always confirm the result with the status endpoint or with a webhook. The webhook is the recommended option, because it does not depend on your customer coming back to your site.
The final result of this test data depends on your merchant's configuration: it requires the test environment (sandbox) to be active for your merchant and the assigned processor to support simulating certain statuses. If you don't get the expected result, contact your Kushki account manager or support.
There are test ID numbers that you can use in the UAT environment to ensure that your integration is ready.
Approved Transaction: Any identification number
Declined Transaction: 999999990
DeUna! has no simulation environment
The test identification numbers above apply to traditional bank transfer. With DeUna! it is not possible to simulate a transaction in UAT: there is no test data that returns an approved transaction. Coordinate with your Kushki team before certifying.