API anahtarı oluştur
curl --request POST \
--url https://identity-sandbox.payven.com.tr/api/v1/tenants/me/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json; ver=1.0' \
--data '
{
"display_name": "<string>",
"contact_email": "<string>",
"merchant_id": "<string>",
"plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"daily_limit_override": 123,
"monthly_limit_override": 123,
"rate_limit_override": 123,
"allowed_ips": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://identity-sandbox.payven.com.tr/api/v1/tenants/me/api-keys"
payload = {
"display_name": "<string>",
"contact_email": "<string>",
"merchant_id": "<string>",
"plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"daily_limit_override": 123,
"monthly_limit_override": 123,
"rate_limit_override": 123,
"allowed_ips": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json; ver=1.0"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json; ver=1.0'},
body: JSON.stringify({
display_name: '<string>',
contact_email: '<string>',
merchant_id: '<string>',
plan_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
daily_limit_override: 123,
monthly_limit_override: 123,
rate_limit_override: 123,
allowed_ips: '<string>',
expires_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://identity-sandbox.payven.com.tr/api/v1/tenants/me/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://identity-sandbox.payven.com.tr/api/v1/tenants/me/api-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => '<string>',
'contact_email' => '<string>',
'merchant_id' => '<string>',
'plan_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'daily_limit_override' => 123,
'monthly_limit_override' => 123,
'rate_limit_override' => 123,
'allowed_ips' => '<string>',
'expires_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json; ver=1.0"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://identity-sandbox.payven.com.tr/api/v1/tenants/me/api-keys"
payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"contact_email\": \"<string>\",\n \"merchant_id\": \"<string>\",\n \"plan_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"daily_limit_override\": 123,\n \"monthly_limit_override\": 123,\n \"rate_limit_override\": 123,\n \"allowed_ips\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json; ver=1.0")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://identity-sandbox.payven.com.tr/api/v1/tenants/me/api-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json; ver=1.0")
.body("{\n \"display_name\": \"<string>\",\n \"contact_email\": \"<string>\",\n \"merchant_id\": \"<string>\",\n \"plan_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"daily_limit_override\": 123,\n \"monthly_limit_override\": 123,\n \"rate_limit_override\": 123,\n \"allowed_ips\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://identity-sandbox.payven.com.tr/api/v1/tenants/me/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json; ver=1.0'
request.body = "{\n \"display_name\": \"<string>\",\n \"contact_email\": \"<string>\",\n \"merchant_id\": \"<string>\",\n \"plan_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"daily_limit_override\": 123,\n \"monthly_limit_override\": 123,\n \"rate_limit_override\": 123,\n \"allowed_ips\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"api_key": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"keycloak_client_id": "<string>",
"display_name": "<string>",
"contact_email": "<string>",
"merchant_id": "<string>",
"plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan_code": "<string>",
"plan_name": "<string>",
"daily_limit_override": 123,
"monthly_limit_override": 123,
"rate_limit_override": 123,
"effective_daily_limit": 123,
"effective_monthly_limit": 123,
"effective_rate_limit": 123,
"allowed_ips": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"is_active": true,
"created": "2023-11-07T05:31:56Z"
},
"secret": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "https://docs.payven.com.tr/errors/invalid_token",
"title": "Geçersiz token",
"status": 401,
"code": "invalid_token",
"detail": "Access token geçersiz veya süresi dolmuş — refresh edin."
}{
"type": "https://docs.payven.com.tr/errors/forbidden",
"title": "Yetki yok",
"status": 403,
"code": "forbidden",
"detail": "Bu rol bu kaynağı göremez."
}{
"type": "https://docs.payven.com.tr/errors/idempotency_key_in_use",
"title": "Idempotency-Key çakışması",
"status": 409,
"code": "idempotency_key_in_use",
"detail": "Bu Idempotency-Key daha önce farklı bir istek gövdesi ile kullanıldı."
}{
"type": "https://docs.payven.com.tr/errors/bank_declined",
"title": "Banka işlemi reddetti",
"status": 422,
"code": "bank_declined",
"detail": "Yetersiz bakiye (banka kodu: 51)",
"provider_error_code": "51"
}{
"type": "https://docs.payven.com.tr/errors/rate_limit_exceeded",
"title": "İstek limiti aşıldı",
"status": 429,
"code": "rate_limit_exceeded"
}{
"type": "https://docs.payven.com.tr/errors/internal_server_error",
"title": "Sunucu hatası",
"status": 500,
"code": "internal_server_error"
}{
"type": "https://docs.payven.com.tr/errors/connector_unavailable",
"title": "Konnektör erişilemez",
"status": 503,
"code": "connector_unavailable"
}TenantApiKeys
API anahtarı oluştur
POST
/
api
/
v1
/
tenants
/
me
/
api-keys
API anahtarı oluştur
curl --request POST \
--url https://identity-sandbox.payven.com.tr/api/v1/tenants/me/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json; ver=1.0' \
--data '
{
"display_name": "<string>",
"contact_email": "<string>",
"merchant_id": "<string>",
"plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"daily_limit_override": 123,
"monthly_limit_override": 123,
"rate_limit_override": 123,
"allowed_ips": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://identity-sandbox.payven.com.tr/api/v1/tenants/me/api-keys"
payload = {
"display_name": "<string>",
"contact_email": "<string>",
"merchant_id": "<string>",
"plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"daily_limit_override": 123,
"monthly_limit_override": 123,
"rate_limit_override": 123,
"allowed_ips": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json; ver=1.0"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json; ver=1.0'},
body: JSON.stringify({
display_name: '<string>',
contact_email: '<string>',
merchant_id: '<string>',
plan_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
daily_limit_override: 123,
monthly_limit_override: 123,
rate_limit_override: 123,
allowed_ips: '<string>',
expires_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://identity-sandbox.payven.com.tr/api/v1/tenants/me/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://identity-sandbox.payven.com.tr/api/v1/tenants/me/api-keys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'display_name' => '<string>',
'contact_email' => '<string>',
'merchant_id' => '<string>',
'plan_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'daily_limit_override' => 123,
'monthly_limit_override' => 123,
'rate_limit_override' => 123,
'allowed_ips' => '<string>',
'expires_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json; ver=1.0"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://identity-sandbox.payven.com.tr/api/v1/tenants/me/api-keys"
payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"contact_email\": \"<string>\",\n \"merchant_id\": \"<string>\",\n \"plan_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"daily_limit_override\": 123,\n \"monthly_limit_override\": 123,\n \"rate_limit_override\": 123,\n \"allowed_ips\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json; ver=1.0")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://identity-sandbox.payven.com.tr/api/v1/tenants/me/api-keys")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json; ver=1.0")
.body("{\n \"display_name\": \"<string>\",\n \"contact_email\": \"<string>\",\n \"merchant_id\": \"<string>\",\n \"plan_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"daily_limit_override\": 123,\n \"monthly_limit_override\": 123,\n \"rate_limit_override\": 123,\n \"allowed_ips\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://identity-sandbox.payven.com.tr/api/v1/tenants/me/api-keys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json; ver=1.0'
request.body = "{\n \"display_name\": \"<string>\",\n \"contact_email\": \"<string>\",\n \"merchant_id\": \"<string>\",\n \"plan_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"daily_limit_override\": 123,\n \"monthly_limit_override\": 123,\n \"rate_limit_override\": 123,\n \"allowed_ips\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"api_key": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"keycloak_client_id": "<string>",
"display_name": "<string>",
"contact_email": "<string>",
"merchant_id": "<string>",
"plan_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan_code": "<string>",
"plan_name": "<string>",
"daily_limit_override": 123,
"monthly_limit_override": 123,
"rate_limit_override": 123,
"effective_daily_limit": 123,
"effective_monthly_limit": 123,
"effective_rate_limit": 123,
"allowed_ips": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"is_active": true,
"created": "2023-11-07T05:31:56Z"
},
"secret": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "https://docs.payven.com.tr/errors/invalid_token",
"title": "Geçersiz token",
"status": 401,
"code": "invalid_token",
"detail": "Access token geçersiz veya süresi dolmuş — refresh edin."
}{
"type": "https://docs.payven.com.tr/errors/forbidden",
"title": "Yetki yok",
"status": 403,
"code": "forbidden",
"detail": "Bu rol bu kaynağı göremez."
}{
"type": "https://docs.payven.com.tr/errors/idempotency_key_in_use",
"title": "Idempotency-Key çakışması",
"status": 409,
"code": "idempotency_key_in_use",
"detail": "Bu Idempotency-Key daha önce farklı bir istek gövdesi ile kullanıldı."
}{
"type": "https://docs.payven.com.tr/errors/bank_declined",
"title": "Banka işlemi reddetti",
"status": 422,
"code": "bank_declined",
"detail": "Yetersiz bakiye (banka kodu: 51)",
"provider_error_code": "51"
}{
"type": "https://docs.payven.com.tr/errors/rate_limit_exceeded",
"title": "İstek limiti aşıldı",
"status": 429,
"code": "rate_limit_exceeded"
}{
"type": "https://docs.payven.com.tr/errors/internal_server_error",
"title": "Sunucu hatası",
"status": 500,
"code": "internal_server_error"
}{
"type": "https://docs.payven.com.tr/errors/connector_unavailable",
"title": "Konnektör erişilemez",
"status": 503,
"code": "connector_unavailable"
}Authorizations
Identity servisinden alinan Keycloak JWT. Format: Authorization: Bearer <token>. Token alma: POST /api/v1/auth/{slug}/token
Headers
Body
application/json; ver=1.0text/json; ver=1.0application/*+json; ver=1.0
⌘I