Skip to content

Pos Bilgileri

Açıklama: Kullanıcı kart numarasının ilk 6 hanesini, tarım kartları için kart numarasının tamamını girdiğinde, API çağrılmalıdır. getPos API, ödeme sayfasındaki verilen kart numarasına göre taksit listesini, tarım kartları için vade aralığını ve ödeme sıklığını sağlamaktan sorumludur. Authorization gereklidir ve yöntem Bearer olmalıdır

Notlar: Veri değerleri bir dizi olabilir. Bu durumda, üye işyeri web sitesi kullanıcının seçmesi için tüm taksit seçeneklerini göstermelidir. Varsayılan olarak, ilk taksit seçilecektir. Her durumda, cevapta en az bir taksit olacak.

URL: /api/getpos

Test Sunucusu: https://test.vepara.com.tr/ccpayment/api/getpos

Canlı Sunucusu: https://app.vepara.com.tr/ccpayment/api/getpos

Method: POST

REQUEST BODY SCHEMA

json
{
  "type": "object",
  "properties": {
    "credit_card": {
      "type": "string",
      "description": "Kart numarsının ilk 6 hanesi; Tarım kartları için kart numarasının tamamı gereklidir"
    },
    "amount": {
      "type": "string",
      "description": "Toplam ürün tutarı" 
    },
    "currency_code": {
      "type": "string",
      "description": "Para biriminin ISO kodudur. Örneğin, USD, TRY, EUR vb."
    },
    "merchant_key" : {
        "type": "string",
        "description": "Vepara tarafından sağlanan üye işyerinin benzersiz anahtarıdır."
    },
    "is_2d": {
      "type": "boolean",
      "description": "Get token API yanıtında, ''is_3d'' 0 ise is_2d = 1 gönderilmelidir"  
    }
  },
  "required": ["credit_card"],
  "required" : ["amount"],
  "required": ["currency_code"],
  "required": ["merchant_key"]
}

RESPONSE BODY

200 Başarılı Sonuç
json
{
  "status_code": 100,
  "status_description": "Successfull",
  "data": [
    {
      "pos_id": 197,
      "campaign_id": 0,
      "allocation_id": 0,
      "installments_number": 1,
      "card_type": "CREDIT CARD",
      "card_program": "BANKKART_COMBO",
      "card_scheme": "visa",
      "payable_amount": 1,
      "hash_key": "c5925eb7d9247901:a87f:QUKHRsknKab4gCVcCYEzrYCg2x2nzImUrw0WzRaYhPXIt2MaC160N0rV7FJRn04R3t3CiF9PgdUD8BXm9sSxPxo7CjLXMrqL5nhGJu9bY+E=",
      "amount_to_be_paid": "1.00",
      "currency_code": "TRY",
      "currency_id": 1,
      "title": "Single payment"
    },
    {
      "pos_id": 197,
      "campaign_id": 0,
      "allocation_id": 0,
      "installments_number": 2,
      "card_type": "CREDIT CARD",
      "card_program": "BANKKART_COMBO",
      "card_scheme": "visa",
      "payable_amount": 1,
      "hash_key": "477977286bda03d7:c459:H45AqXUesS504Zf5t2vtGlNKxRyXi6Kc5MaPFkFhQvQLSlPbCkhFMDj5awYp2uq6ex1rfSxrKW+xN3jOpA3B4tuVasNsC13D__ZsLHpJH0Pg=",
      "amount_to_be_paid": "1.00",
      "currency_code": "TRY",
      "currency_id": 1,
      "title": 2
    },
  ]
}
422 Başarısız Sonuç
json
{
  "message": "The credit card field must be a string. (and 1 more error)",
  "errors": {
    "credit_card": [
      "The credit card field must be a string.",
      "The credit card field is required."
    ]
  }
}

Kod Örnekleri

PHP Örneği
php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://test.vepara.com.tr/ccpayment/api/getpos',
  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 =>'{
	"credit_card":"523529",
	"amount":"100.00",
	"currency_code":"TRY",
	"merchant_key":"$2y$10$w/ODdbTmfubcbUCUq/ia3OoJFMUmkM1UVNBiIQIuLfUlPmaLUT1he",
    "is_2d" : 0
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxNSIsImp0aSI6ImEyZTlkMzllYTcxMTRhMTE4ODY3NmQxNmNmMWZjYzNmYzcyYmJmYTBkYTRiNWZlMDRmZjFlNmY1ZmY4M2E4N2JiOTcyNzBlMWIyOTNhYjQ3IiwiaWF0IjoxNjkzMzExMjI5LjQ1ODcsIm5iZiI6MTY5MzMxMTIyOS40NTg3LCJleHAiOjE2OTMzMTg0MjkuNDUzMiwic3ViIjoiMzgyIiwic2NvcGVzIjpbXX0.GyabFvLN5JldPXpnX-q3bBUEcPWlVMxsoaGnB3-2Erxuk-aaezCCtbS6ccJpEgUF3TnWdLv3jCpRiFy0NvXpKVAfH5MCKGRoe1D6FDoa-aPHswqEd-avo5VfbT346S2nsHytYYWcFWGVuhrJ3ZprLP0GYdDCqMTJd4jV33_pyMET_J0VFuEdKNJ051F7JyhzSMysE5dsC-sdIRMENYtZzVnO41lr0FJmdLJjwiZSIBmf_0C3CRRwRD8qLkGnUITO13CJvLbx_Wgz4mrXe-CrlvuOtqybBqK24iiNDY2WIMjnRyYsi9QbMeenU46x4UlH9SSDVb0ypQRX5fI7oYx7v6yJE0kYmSX8SmOgFuTup-86Hmd52KfvRfn8lpV35Ul2tqWmhP5INhyP9klyuITmFyj4FjNkRBBFLJR-1jyCVdyL3XdwMNzxVcZA-QcHwOiaU1hBsuHlbWOY7E7SWt8nrn4Zz1OJVHuuiL5Fcrntik-r17pNIvmN7QZJl9hXcsM7hLNVZN79NnOiKhDx7Vn_q211YxVu-MEFG31o8-HEQ3XmGCqk2xydyuRKWE1jbl9CFsD1VYZ80Z1Xpb0AH2Wb3WbemQaWA0qlGTQo21vnVSTQK4KLwgzifdVl2aUQK0KqzCMph4TFaqv88Xvs46So0s1fazkLhysX1R6GYLfaQpU'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Ruby Örneği
ruby
require "uri"
require "json"
require "net/http"

url = URI("https://test.vepara.com.tr/ccpayment/api/getpos")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer eyJ0eXAiOiJKV1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BiIQIuLfUlPmaLUT1he",
  "is_2d": 0
})

response = https.request(request)
puts response.read_body
Python Örneği
python
import requests
import json

url = "https://test.vepara.com.tr/ccpayment/api/getpos"

payload = json.dumps({
  "credit_card": "523529",
  "amount": "100.00",
  "currency_code": "TRY",
  "merchant_key": "$2y$10$w/ODdbTmfubcbUCUq/ia3OoJFMUmkM1UVNBiIQIuLfUlPmaLUT1he",
  "is_2d": 0
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxNSIsImp0aSI6ImEyZTlkMzllYTcxMTRhMTE4ODY3NmQxNmNmMWZjYzNmYzcyYmJmYTBkYTRiNWZlMDRmZjFlNmY1ZmY4M2E4N2JiOTcyNzBlMWIyOTNhYjQ3IiwiaWF0IjoxNjkzMzExMjI5LjQ1ODcsIm5iZiI6MTY5MzMxMTIyOS40NTg3LCJleHAiOjE2OTMzMTg0MjkuNDUzMiwic3ViIjoiMzgyIiwic2NvcGVzIjpbXX0.GyabFvLN5JldPXpnX-q3bBUEcPWlVMxsoaGnB3-2Erxuk-aaezCCtbS6ccJpEgUF3TnWdLv3jCpRiFy0NvXpKVAfH5MCKGRoe1D6FDoa-aPHswqEd-avo5VfbT346S2nsHytYYWcFWGVuhrJ3ZprLP0GYdDCqMTJd4jV33_pyMET_J0VFuEdKNJ051F7JyhzSMysE5dsC-sdIRMENYtZzVnO41lr0FJmdLJjwiZSIBmf_0C3CRRwRD8qLkGnUITO13CJvLbx_Wgz4mrXe-CrlvuOtqybBqK24iiNDY2WIMjnRyYsi9QbMeenU46x4UlH9SSDVb0ypQRX5fI7oYx7v6yJE0kYmSX8SmOgFuTup-86Hmd52KfvRfn8lpV35Ul2tqWmhP5INhyP9klyuITmFyj4FjNkRBBFLJR-1jyCVdyL3XdwMNzxVcZA-QcHwOiaU1hBsuHlbWOY7E7SWt8nrn4Zz1OJVHuuiL5Fcrntik-r17pNIvmN7QZJl9hXcsM7hLNVZN79NnOiKhDx7Vn_q211YxVu-MEFG31o8-HEQ3XmGCqk2xydyuRKWE1jbl9CFsD1VYZ80Z1Xpb0AH2Wb3WbemQaWA0qlGTQo21vnVSTQK4KLwgzifdVl2aUQK0KqzCMph4TFaqv88Xvs46So0s1fazkLhysX1R6GYLfaQpU'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
Nodejs Örneği
javascript
const axios = require('axios');
let data = JSON.stringify({
  "credit_card": "523529",
  "amount": "100.00",
  "currency_code": "TRY",
  "merchant_key": "$2y$10$w/ODdbTmfubcbUCUq/ia3OoJFMUmkM1UVNBiIQIuLfUlPmaLUT1he",
  "is_2d": 0
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://test.vepara.com.tr/ccpayment/api/getpos',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxNSIsImp0aSI6ImEyZTlkMzllYTcxMTRhMTE4ODY3NmQxNmNmMWZjYzNmYzcyYmJmYTBkYTRiNWZlMDRmZjFlNmY1ZmY4M2E4N2JiOTcyNzBlMWIyOTNhYjQ3IiwiaWF0IjoxNjkzMzExMjI5LjQ1ODcsIm5iZiI6MTY5MzMxMTIyOS40NTg3LCJleHAiOjE2OTMzMTg0MjkuNDUzMiwic3ViIjoiMzgyIiwic2NvcGVzIjpbXX0.GyabFvLN5JldPXpnX-q3bBUEcPWlVMxsoaGnB3-2Erxuk-aaezCCtbS6ccJpEgUF3TnWdLv3jCpRiFy0NvXpKVAfH5MCKGRoe1D6FDoa-aPHswqEd-avo5VfbT346S2nsHytYYWcFWGVuhrJ3ZprLP0GYdDCqMTJd4jV33_pyMET_J0VFuEdKNJ051F7JyhzSMysE5dsC-sdIRMENYtZzVnO41lr0FJmdLJjwiZSIBmf_0C3CRRwRD8qLkGnUITO13CJvLbx_Wgz4mrXe-CrlvuOtqybBqK24iiNDY2WIMjnRyYsi9QbMeenU46x4UlH9SSDVb0ypQRX5fI7oYx7v6yJE0kYmSX8SmOgFuTup-86Hmd52KfvRfn8lpV35Ul2tqWmhP5INhyP9klyuITmFyj4FjNkRBBFLJR-1jyCVdyL3XdwMNzxVcZA-QcHwOiaU1hBsuHlbWOY7E7SWt8nrn4Zz1OJVHuuiL5Fcrntik-r17pNIvmN7QZJl9hXcsM7hLNVZN79NnOiKhDx7Vn_q211YxVu-MEFG31o8-HEQ3XmGCqk2xydyuRKWE1jbl9CFsD1VYZ80Z1Xpb0AH2Wb3WbemQaWA0qlGTQo21vnVSTQK4KLwgzifdVl2aUQK0KqzCMph4TFaqv88Xvs46So0s1fazkLhysX1R6GYLfaQpU'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
C# Örneği
c#
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://test.vepara.com.tr/ccpayment/api/getpos");
request.Headers.Add("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxNSIsImp0aSI6ImEyZTlkMzllYTcxMTRhMTE4ODY3NmQxNmNmMWZjYzNmYzcyYmJmYTBkYTRiNWZlMDRmZjFlNmY1ZmY4M2E4N2JiOTcyNzBlMWIyOTNhYjQ3IiwiaWF0IjoxNjkzMzExMjI5LjQ1ODcsIm5iZiI6MTY5MzMxMTIyOS40NTg3LCJleHAiOjE2OTMzMTg0MjkuNDUzMiwic3ViIjoiMzgyIiwic2NvcGVzIjpbXX0.GyabFvLN5JldPXpnX-q3bBUEcPWlVMxsoaGnB3-2Erxuk-aaezCCtbS6ccJpEgUF3TnWdLv3jCpRiFy0NvXpKVAfH5MCKGRoe1D6FDoa-aPHswqEd-avo5VfbT346S2nsHytYYWcFWGVuhrJ3ZprLP0GYdDCqMTJd4jV33_pyMET_J0VFuEdKNJ051F7JyhzSMysE5dsC-sdIRMENYtZzVnO41lr0FJmdLJjwiZSIBmf_0C3CRRwRD8qLkGnUITO13CJvLbx_Wgz4mrXe-CrlvuOtqybBqK24iiNDY2WIMjnRyYsi9QbMeenU46x4UlH9SSDVb0ypQRX5fI7oYx7v6yJE0kYmSX8SmOgFuTup-86Hmd52KfvRfn8lpV35Ul2tqWmhP5INhyP9klyuITmFyj4FjNkRBBFLJR-1jyCVdyL3XdwMNzxVcZA-QcHwOiaU1hBsuHlbWOY7E7SWt8nrn4Zz1OJVHuuiL5Fcrntik-r17pNIvmN7QZJl9hXcsM7hLNVZN79NnOiKhDx7Vn_q211YxVu-MEFG31o8-HEQ3XmGCqk2xydyuRKWE1jbl9CFsD1VYZ80Z1Xpb0AH2Wb3WbemQaWA0qlGTQo21vnVSTQK4KLwgzifdVl2aUQK0KqzCMph4TFaqv88Xvs46So0s1fazkLhysX1R6GYLfaQpU");
var content = new StringContent("{\r\n\t\"credit_card\":\"523529\",\r\n\t\"amount\":\"100.00\",\r\n\t\"currency_code\":\"TRY\",\r\n\t\"merchant_key\":\"$2y$10$w/ODdbTmfubcbUCUq/ia3OoJFMUmkM1UVNBiIQIuLfUlPmaLUT1he\",\r\n    \"is_2d\" : 0\r\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());

Vepara