API Documentation - Installment Information Belongs to You
There are 2 types of Pay N Kolay APIs. You can create your own payment form structure with these APIs.
Section titled “There are 2 types of Pay N Kolay APIs. You can create your own payment form structure with these APIs.”Merchants use their own payment forms with APIs.
Click to download Postman collection. You can see example codes in Postman Code snippet.
Minimum TLS 1.2 must be used. Click for TLS Connection Problems Solving Guide.
1 - Pay N Kolay API (Version to use if you want to get installments from your own installment tables)
- In this version, all variables are POSTed as form-data in the Body to “https://paynkolaytest.nkolayislem.com.tr/Vpos/v1/Payment” address. (sx, clientRefCode, successUrl, failUrl, amount, installmentNo, cardHolderName, month, year, cvv, cardNumber, use3D, transactionType, rnd, hashData, environment, currencyNumber)
- Production environment link: https://paynkolay.nkolayislem.com.tr/Vpos/v1/Payment
- You need to send requests to the production environment from your server. Requests sent from localhost give security errors.
- Click for hash calculation.
- Payment Service test environment link: “https://paynkolaytest.nkolayislem.com.tr/Vpos/v1/Payment” You can see all relevant variables from the Postman collection.
- If the transaction is not 3D, payment is received and response parameters are returned to your successURL page. Response Return Parameters
- If use3D is “true”, a 3D form will come. You can run this form on screen as follows.
<?php
$curl = curl_init();
curl_setopt_array($curl, array( CURLOPT_URL => 'https://paynkolaytest.nkolayislem.com.tr/Vpos/v1/Payment', CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => array( 'sx' => '118591467|bScbGDYCtPf7SS1N6PQ6/+58rFhW1WpsWINqvkJFaJlu6bMH2tgPKDQtjeA5vClpzJP24uA0vx7OX53cP3SgUspa4EvYix+1C3aXe++8glUvu9Oyyj3v300p5NP7ro/9K57Zcw==', 'clientRefCode' => '789456|AB76', 'successUrl' => 'https://paynkolay.com.tr/test/success', 'failUrl' => 'https://paynkolay.com.tr/test/fail', 'amount' => '6.00', 'installmentNo' => '2', 'cardHolderName' => 'Tuna Çınar', 'month' => '12', 'year' => '2026', 'cvv' => '001', 'cardNumber' => '4546711234567894', 'use3D' => 'true', 'transactionType' => 'SALES', ),));$response = curl_exec($curl);curl_close($curl);echo $response;?>
var client = new HttpClient();var request = new HttpRequestMessage(HttpMethod.Post, "https://paynkolaytest.nkolayislem.com.tr/Vpos/v1/Payment");var content = new MultipartFormDataContent();content.Add(new StringContent("118591467|bScbGDYCtPf7SS1N6PQ6/+58rFhW1WpsWINqvkJFaJlu6bMH2tgPKDQtjeA5vClpzJP24uA0vx7OX53cP3SgUspa4EvYix+1C3aXe++8glUvu9Oyyj3v300p5NP7ro/9K57Zcw=="), "sx");content.Add(new StringContent("789456|AB76"), "clientRefCode");content.Add(new StringContent("https://paynkolay.com.tr/test/success"), "successUrl");content.Add(new StringContent("https://paynkolay.com.tr/test/fail"), "failUrl");content.Add(new StringContent("6.00"), "amount");content.Add(new StringContent("2"), "installmentNo");content.Add(new StringContent("Tuna Çınar"), "cardHolderName");content.Add(new StringContent("12"), "month");content.Add(new StringContent("2026"), "year");content.Add(new StringContent("001"), "cvv");content.Add(new StringContent("4546711234567894"), "cardNumber");content.Add(new StringContent("true"), "use3D");content.Add(new StringContent("SALES"), "transactionType");request.Content = content;var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());
import http.clientfrom codecs import encode
conn = http.client.HTTPSConnection("paynkolaytest.nkolayislem.com.tr")dataList = []boundary = 'wL36Yn8afVp8Ag7AmP8qZ0SA4n1v9T'dataList.append(encode('--' + boundary))dataList.append(encode('Content-Disposition: form-data; name=sx;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))dataList.append(encode(''))
dataList.append(encode("118591467|bScbGDYCtPf7SS1N6PQ6/+58rFhW1WpsWINqvkJFaJlu6bMH2tgPKDQtjeA5vClpzJP24uA0vx7OX53cP3SgUspa4EvYix+1C3aXe++8glUvu9Oyyj3v300p5NP7ro/9K57Zcw=="))dataList.append(encode('--' + boundary))dataList.append(encode('Content-Disposition: form-data; name=clientRefCode;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))dataList.append(encode(''))
dataList.append(encode("789456|AB76"))dataList.append(encode('--' + boundary))dataList.append(encode('Content-Disposition: form-data; name=successUrl;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))dataList.append(encode(''))
dataList.append(encode("https://paynkolay.com.tr/test/success"))dataList.append(encode('--' + boundary))dataList.append(encode('Content-Disposition: form-data; name=failUrl;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))dataList.append(encode(''))
dataList.append(encode("https://paynkolay.com.tr/test/fail"))dataList.append(encode('--' + boundary))dataList.append(encode('Content-Disposition: form-data; name=amount;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))dataList.append(encode(''))
dataList.append(encode("6.00"))dataList.append(encode('--' + boundary))dataList.append(encode('Content-Disposition: form-data; name=installmentNo;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))dataList.append(encode(''))
dataList.append(encode("2"))dataList.append(encode('--' + boundary))dataList.append(encode('Content-Disposition: form-data; name=cardHolderName;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))dataList.append(encode(''))
dataList.append(encode("Tuna Çınar"))dataList.append(encode('--' + boundary))dataList.append(encode('Content-Disposition: form-data; name=month;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))dataList.append(encode(''))
dataList.append(encode("12"))dataList.append(encode('--' + boundary))dataList.append(encode('Content-Disposition: form-data; name=year;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))dataList.append(encode(''))
dataList.append(encode("2026"))dataList.append(encode('--' + boundary))dataList.append(encode('Content-Disposition: form-data; name=cvv;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))dataList.append(encode(''))
dataList.append(encode("001"))dataList.append(encode('--' + boundary))dataList.append(encode('Content-Disposition: form-data; name=cardNumber;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))dataList.append(encode(''))
dataList.append(encode("4546711234567894"))dataList.append(encode('--' + boundary))dataList.append(encode('Content-Disposition: form-data; name=use3D;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))dataList.append(encode(''))
dataList.append(encode("true"))dataList.append(encode('--' + boundary))dataList.append(encode('Content-Disposition: form-data; name=transactionType;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))dataList.append(encode(''))
dataList.append(encode("SALES"))dataList.append(encode('--' + boundary))dataList.append(encode('Content-Disposition: form-data; name=rnd;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))dataList.append(encode(''))
dataList.append(encode("09-10-2025 15:24:22"))dataList.append(encode('--' + boundary))dataList.append(encode('Content-Disposition: form-data; name=hashDatav2;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))dataList.append(encode(''))
dataList.append(encode("VM9LfJtJTjUesvqq9HQqCkuD6fYn+mhrn0WV5UCPU30VcI4BYRPzbhOs3EBDTCuwvndVsAEsqLFEClqZ3SbbIw=="))dataList.append(encode('--' + boundary))dataList.append(encode('Content-Disposition: form-data; name=environment;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))dataList.append(encode(''))
dataList.append(encode("API"))dataList.append(encode('--' + boundary))dataList.append(encode('Content-Disposition: form-data; name=currencyNumber;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))dataList.append(encode(''))
dataList.append(encode("949"))dataList.append(encode('--'+boundary+'--'))dataList.append(encode(''))body = b'\r\n'.join(dataList)payload = bodyheaders = { 'Content-type': 'multipart/form-data; boundary={}'.format(boundary)}conn.request("POST", "/Vpos/v1/Payment", payload, headers)res = conn.getresponse()data = res.read()print(data.decode("utf-8"))
const axios = require('axios');const FormData = require('form-data');let data = new FormData();data.append('sx', '118591467|bScbGDYCtPf7SS1N6PQ6/+58rFhW1WpsWINqvkJFaJlu6bMH2tgPKDQtjeA5vClpzJP24uA0vx7OX53cP3SgUspa4EvYix+1C3aXe++8glUvu9Oyyj3v300p5NP7ro/9K57Zcw==');data.append('clientRefCode', '789456|AB76');data.append('successUrl', 'https://paynkolay.com.tr/test/success');data.append('failUrl', 'https://paynkolay.com.tr/test/fail');data.append('amount', '6.00');data.append('installmentNo', '2');data.append('cardHolderName', 'Tuna Çınar');data.append('month', '12');data.append('year', '2026');data.append('cvv', '001');data.append('cardNumber', '4546711234567894');data.append('use3D', 'true');data.append('transactionType', 'SALES');data.append('rnd', '09-10-2025 15:24:22');data.append('hashDatav2', 'VM9LfJtJTjUesvqq9HQqCkuD6fYn+mhrn0WV5UCPU30VcI4BYRPzbhOs3EBDTCuwvndVsAEsqLFEClqZ3SbbIw==');data.append('environment', 'API');data.append('currencyNumber', '949');let config = { method: 'post', maxBodyLength: Infinity, url: 'https://paynkolaytest.nkolayislem.com.tr/Vpos/v1/Payment', headers: { ...data.getHeaders() }, data : data};axios.request(config).then((response) => { console.log(JSON.stringify(response.data));}).catch((error) => { console.log(error);});
- When the incoming 3D form is printed on the screen, the relevant bank’s 3D secure window opens and it is expected to enter the 3D secure password here.
