Kaydedilmiş Kartı Çağırma
Açıklama: Müşteri için kaydedilmiş kartları çağırabileceğiniz servistir.
URL: /api/getCardTokens
Test Sunucusu: https://test.vepara.com.tr/ccpayment/api/getCardTokens
Canlı Sunucusu: https://app.vepara.com.tr/ccpayment/api/getCardTokens
Method: POST
REQUEST BODY SCHEMA
json
{
"type": "object",
"properties": {
"merchant_key": {
"type": "string",
"description": "Vepara tarafından sağlanan üye işyerinin benzersiz anahtarıdır."
},
"customer_number":{
"type" : "string",
"description" : "Müşteri Numarası"
},
},
"required": ["merchant_key"],
"required": ["customer_number"],
}
RESPONSE BODY
200 Başarılı Sonuç
json
{
"status_code": 100,
"status_description": "Data fetched successfully",
"data": [
{
"id": 11,
"pos_id": 0,
"card_token": "KELUUKPQBCGYLV7FP7I7VUQNZP7N5UX7JUCPKZVOPKEMCEQP",
"merchant_id": 98950,
"customer_number": 5070,
"customer_name": "Eren Yokus",
"customer_email": "Eren Yokus",
"customer_phone": 8801749452019,
"bin": 540668,
"created_at": "2021-04-08T14:07:42.000000Z",
"updated_at": "2021-04-08T14:07:42.000000Z"
}
]
}
422 Başarısız Sonuç
json
{
"status_code": 41,
"status_description": "Invalid merchant Key"
}
Kod Örnekleri
PHP Örneği
php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://test.vepara.com.tr/ccpayment/api/getCardTokens',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS =>'{
"merchant_key": "$2y$10$w/ODdbTmfubcbUCUq/ia3OoJFMUmkM1UVNBiIQIuLfUlPmaLUT1he",
"customer_number": ""
}',
CURLOPT_HTTPHEADER => array(
'Accept: application/json',
'Content-Type: application/json',
'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxOSIsImp0aSI6ImFkODMxYTUxYmU3MWEzMzAxYzQzN2I1MTU5MGY4OGJjMTZkZjRmODM4NjZhZGI5NmU3NmJkMzZjZjFjMmU1ZmM1ZDAxZWU5NTFkYjc4MjUxIiwiaWF0IjoxNjk1MjE3NDk2LjI0NjUsIm5iZiI6MTY5NTIxNzQ5Ni4yNDY1LCJleHAiOjE2OTUyMjQ2OTYuMjQwNywic3ViIjoiNiIsInNjb3BlcyI6W119.uXMULNGpNPfH4bLyraz5PV-cBgPM3JZlrRFW4PuGpDcop2HatY4YhKHviNf5-xkgor50iTyaCHYfTGEErNW-1wiWiddxSr62H-Nc7lHP9wRinZEEKFyeF3UbYG7lSAaLy1dTtICsnb3Sixw0XePqGyuAlKw9_gGQOzAmT0p6zQY1VsSzTROIG490G-Sk-CdAeAJS8z0eIgC9avXz2PZ4Esf5AnxH5k9IGX-nLaFnkGP28FdnM3nZMfD8-9OKkrS_uv6DU2uiWmdeZI1pIQknAigJUR2qAZDXa42xJfRfBqBmGA4Ugq-_aje4DzAX063CjHRFSzlWDTv189y2AOM3gCsXSP0UojFwq8KxdxREEj96X-5qebp93q59FevJJiMXmGDKRxwRiAONpXcTNwVXXbrSEerjybZUZRw_SOJxcb6Vmb2NREODqb13S-5bjFo11Lm8K40QBPmKjcc13RsAVb5g_D7Nc7wS3DSNSNxKIzMI8GF7hQPPVKRJ_Wb4_TwlEsPGlZ6HLXwEQ7u4F6KTh38aSvMW4a2Z8dOR9kONgRYdgltnPJ7Z6iUuUY_NHBdrX9q0CAm35R8-eUjOOu8XrX03CLsRLcAimCmZJEREev391yM4o2KLy-If6jBrJ0LGNSMNk0bC6_LGqzACyuZ6vltw84HpiKcPqmE4uXJxESg'
),
));
$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/getCardTokens")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxOSIsImp0aSI6ImFkODMxYTUxYmU3MWEzMzAxYzQzN2I1MTU5MGY4OGJjMTZkZjRmODM4NjZhZGI5NmU3NmJkMzZjZjFjMmU1ZmM1ZDAxZWU5NTFkYjc4MjUxIiwiaWF0IjoxNjk1MjE3NDk2LjI0NjUsIm5iZiI6MTY5NTIxNzQ5Ni4yNDY1LCJleHAiOjE2OTUyMjQ2OTYuMjQwNywic3ViIjoiNiIsInNjb3BlcyI6W119.uXMULNGpNPfH4bLyraz5PV-cBgPM3JZlrRFW4PuGpDcop2HatY4YhKHviNf5-xkgor50iTyaCHYfTGEErNW-1wiWiddxSr62H-Nc7lHP9wRinZEEKFyeF3UbYG7lSAaLy1dTtICsnb3Sixw0XePqGyuAlKw9_gGQOzAmT0p6zQY1VsSzTROIG490G-Sk-CdAeAJS8z0eIgC9avXz2PZ4Esf5AnxH5k9IGX-nLaFnkGP28FdnM3nZMfD8-9OKkrS_uv6DU2uiWmdeZI1pIQknAigJUR2qAZDXa42xJfRfBqBmGA4Ugq-_aje4DzAX063CjHRFSzlWDTv189y2AOM3gCsXSP0UojFwq8KxdxREEj96X-5qebp93q59FevJJiMXmGDKRxwRiAONpXcTNwVXXbrSEerjybZUZRw_SOJxcb6Vmb2NREODqb13S-5bjFo11Lm8K40QBPmKjcc13RsAVb5g_D7Nc7wS3DSNSNxKIzMI8GF7hQPPVKRJ_Wb4_TwlEsPGlZ6HLXwEQ7u4F6KTh38aSvMW4a2Z8dOR9kONgRYdgltnPJ7Z6iUuUY_NHBdrX9q0CAm35R8-eUjOOu8XrX03CLsRLcAimCmZJEREev391yM4o2KLy-If6jBrJ0LGNSMNk0bC6_LGqzACyuZ6vltw84HpiKcPqmE4uXJxESg"
request.body = JSON.dump({
"merchant_key": "$2y$10$w/ODdbTmfubcbUCUq/ia3OoJFMUmkM1UVNBiIQIuLfUlPmaLUT1he",
"customer_number": ""
})
response = https.request(request)
puts response.read_body
Python Örneği
python
import http.client
import json
conn = http.client.HTTPSConnection("test.vepara.com.tr")
payload = json.dumps({
"merchant_key": "$2y$10$w/ODdbTmfubcbUCUq/ia3OoJFMUmkM1UVNBiIQIuLfUlPmaLUT1he",
"customer_number": ""
})
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxOSIsImp0aSI6ImFkODMxYTUxYmU3MWEzMzAxYzQzN2I1MTU5MGY4OGJjMTZkZjRmODM4NjZhZGI5NmU3NmJkMzZjZjFjMmU1ZmM1ZDAxZWU5NTFkYjc4MjUxIiwiaWF0IjoxNjk1MjE3NDk2LjI0NjUsIm5iZiI6MTY5NTIxNzQ5Ni4yNDY1LCJleHAiOjE2OTUyMjQ2OTYuMjQwNywic3ViIjoiNiIsInNjb3BlcyI6W119.uXMULNGpNPfH4bLyraz5PV-cBgPM3JZlrRFW4PuGpDcop2HatY4YhKHviNf5-xkgor50iTyaCHYfTGEErNW-1wiWiddxSr62H-Nc7lHP9wRinZEEKFyeF3UbYG7lSAaLy1dTtICsnb3Sixw0XePqGyuAlKw9_gGQOzAmT0p6zQY1VsSzTROIG490G-Sk-CdAeAJS8z0eIgC9avXz2PZ4Esf5AnxH5k9IGX-nLaFnkGP28FdnM3nZMfD8-9OKkrS_uv6DU2uiWmdeZI1pIQknAigJUR2qAZDXa42xJfRfBqBmGA4Ugq-_aje4DzAX063CjHRFSzlWDTv189y2AOM3gCsXSP0UojFwq8KxdxREEj96X-5qebp93q59FevJJiMXmGDKRxwRiAONpXcTNwVXXbrSEerjybZUZRw_SOJxcb6Vmb2NREODqb13S-5bjFo11Lm8K40QBPmKjcc13RsAVb5g_D7Nc7wS3DSNSNxKIzMI8GF7hQPPVKRJ_Wb4_TwlEsPGlZ6HLXwEQ7u4F6KTh38aSvMW4a2Z8dOR9kONgRYdgltnPJ7Z6iUuUY_NHBdrX9q0CAm35R8-eUjOOu8XrX03CLsRLcAimCmZJEREev391yM4o2KLy-If6jBrJ0LGNSMNk0bC6_LGqzACyuZ6vltw84HpiKcPqmE4uXJxESg'
}
conn.request("GET", "/ccpayment/api/getCardTokens", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Nodejs Örneği
javascript
const axios = require('axios');
let data = JSON.stringify({
"merchant_key": "$2y$10$w/ODdbTmfubcbUCUq/ia3OoJFMUmkM1UVNBiIQIuLfUlPmaLUT1he",
"customer_number": ""
});
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://test.vepara.com.tr/ccpayment/api/getCardTokens',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxOSIsImp0aSI6ImFkODMxYTUxYmU3MWEzMzAxYzQzN2I1MTU5MGY4OGJjMTZkZjRmODM4NjZhZGI5NmU3NmJkMzZjZjFjMmU1ZmM1ZDAxZWU5NTFkYjc4MjUxIiwiaWF0IjoxNjk1MjE3NDk2LjI0NjUsIm5iZiI6MTY5NTIxNzQ5Ni4yNDY1LCJleHAiOjE2OTUyMjQ2OTYuMjQwNywic3ViIjoiNiIsInNjb3BlcyI6W119.uXMULNGpNPfH4bLyraz5PV-cBgPM3JZlrRFW4PuGpDcop2HatY4YhKHviNf5-xkgor50iTyaCHYfTGEErNW-1wiWiddxSr62H-Nc7lHP9wRinZEEKFyeF3UbYG7lSAaLy1dTtICsnb3Sixw0XePqGyuAlKw9_gGQOzAmT0p6zQY1VsSzTROIG490G-Sk-CdAeAJS8z0eIgC9avXz2PZ4Esf5AnxH5k9IGX-nLaFnkGP28FdnM3nZMfD8-9OKkrS_uv6DU2uiWmdeZI1pIQknAigJUR2qAZDXa42xJfRfBqBmGA4Ugq-_aje4DzAX063CjHRFSzlWDTv189y2AOM3gCsXSP0UojFwq8KxdxREEj96X-5qebp93q59FevJJiMXmGDKRxwRiAONpXcTNwVXXbrSEerjybZUZRw_SOJxcb6Vmb2NREODqb13S-5bjFo11Lm8K40QBPmKjcc13RsAVb5g_D7Nc7wS3DSNSNxKIzMI8GF7hQPPVKRJ_Wb4_TwlEsPGlZ6HLXwEQ7u4F6KTh38aSvMW4a2Z8dOR9kONgRYdgltnPJ7Z6iUuUY_NHBdrX9q0CAm35R8-eUjOOu8XrX03CLsRLcAimCmZJEREev391yM4o2KLy-If6jBrJ0LGNSMNk0bC6_LGqzACyuZ6vltw84HpiKcPqmE4uXJxESg'
},
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.Get, "https://test.vepara.com.tr/ccpayment/api/getCardTokens");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxOSIsImp0aSI6ImFkODMxYTUxYmU3MWEzMzAxYzQzN2I1MTU5MGY4OGJjMTZkZjRmODM4NjZhZGI5NmU3NmJkMzZjZjFjMmU1ZmM1ZDAxZWU5NTFkYjc4MjUxIiwiaWF0IjoxNjk1MjE3NDk2LjI0NjUsIm5iZiI6MTY5NTIxNzQ5Ni4yNDY1LCJleHAiOjE2OTUyMjQ2OTYuMjQwNywic3ViIjoiNiIsInNjb3BlcyI6W119.uXMULNGpNPfH4bLyraz5PV-cBgPM3JZlrRFW4PuGpDcop2HatY4YhKHviNf5-xkgor50iTyaCHYfTGEErNW-1wiWiddxSr62H-Nc7lHP9wRinZEEKFyeF3UbYG7lSAaLy1dTtICsnb3Sixw0XePqGyuAlKw9_gGQOzAmT0p6zQY1VsSzTROIG490G-Sk-CdAeAJS8z0eIgC9avXz2PZ4Esf5AnxH5k9IGX-nLaFnkGP28FdnM3nZMfD8-9OKkrS_uv6DU2uiWmdeZI1pIQknAigJUR2qAZDXa42xJfRfBqBmGA4Ugq-_aje4DzAX063CjHRFSzlWDTv189y2AOM3gCsXSP0UojFwq8KxdxREEj96X-5qebp93q59FevJJiMXmGDKRxwRiAONpXcTNwVXXbrSEerjybZUZRw_SOJxcb6Vmb2NREODqb13S-5bjFo11Lm8K40QBPmKjcc13RsAVb5g_D7Nc7wS3DSNSNxKIzMI8GF7hQPPVKRJ_Wb4_TwlEsPGlZ6HLXwEQ7u4F6KTh38aSvMW4a2Z8dOR9kONgRYdgltnPJ7Z6iUuUY_NHBdrX9q0CAm35R8-eUjOOu8XrX03CLsRLcAimCmZJEREev391yM4o2KLy-If6jBrJ0LGNSMNk0bC6_LGqzACyuZ6vltw84HpiKcPqmE4uXJxESg");
var content = new StringContent("{\r\n \"merchant_key\": \"$2y$10$w/ODdbTmfubcbUCUq/ia3OoJFMUmkM1UVNBiIQIuLfUlPmaLUT1he\",\r\n \"customer_number\": \"\"\r\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());