curl -X POST https://vpos-sandbox.payven.com.tr/api/v1/payments/order-link \
-H "Authorization: Bearer $PAYVEN_TOKEN" \
-H "Idempotency-Key: order-1001" \
-d '{ ...payload... }'const res = await fetch(
"https://vpos-sandbox.payven.com.tr/api/v1/payments/order-link",
{
method: "POST",
headers: {
Authorization: `Bearer ${accessToken}`,
"Idempotency-Key": "order-1001",
"Content-Type": "application/json",
},
body: JSON.stringify({ /* payload */ }),
},
);
const data = await res.json();import httpx
res = httpx.post(
"https://vpos-sandbox.payven.com.tr/api/v1/payments/order-link",
headers={
"Authorization": f"Bearer {access_token}",
"Idempotency-Key": "order-1001",
},
json={ ... },
)
data = res.json()var req = new HttpRequestMessage(HttpMethod.Post, "https://vpos-sandbox.payven.com.tr/api/v1/payments/order-link");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
req.Headers.Add("Idempotency-Key", "order-1001");
// Content = JsonContent.Create(payload);
var resp = await http.SendAsync(req);req, _ := http.NewRequest("POST", "https://vpos-sandbox.payven.com.tr/api/v1/payments/order-link", nil)
req.Header.Set("Authorization", "Bearer "+accessToken)
req.Header.Set("Idempotency-Key", "order-1001")
// req.Body = bytes.NewReader(payloadJSON)
resp, _ := http.DefaultClient.Do(req)$ch = curl_init("https://vpos-sandbox.payven.com.tr/api/v1/payments/order-link");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $accessToken",
"Idempotency-Key: order-1001",
],
CURLOPT_POSTFIELDS => json_encode(\$payload),
]);
$data = json_decode(curl_exec($ch), true);HttpResponse<String> response = Unirest.post("https://vpos-sandbox.payven.com.tr/api/v1/payments/order-link")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 15000,\n \"currency\": \"TRY\",\n \"installment\": 6,\n \"callback_url\": \"<string>\",\n \"return_url\": \"<string>\",\n \"description\": \"Sipariş #1001\",\n \"external_id\": \"ORDER-1001\",\n \"customer_email\": \"musteri@example.com\",\n \"customer_phone\": \"<string>\",\n \"extra_properties\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vpos-sandbox.payven.com.tr/api/v1/payments/order-link")
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'
request.body = "{\n \"amount\": 15000,\n \"currency\": \"TRY\",\n \"installment\": 6,\n \"callback_url\": \"<string>\",\n \"return_url\": \"<string>\",\n \"description\": \"Sipariş #1001\",\n \"external_id\": \"ORDER-1001\",\n \"customer_email\": \"musteri@example.com\",\n \"customer_phone\": \"<string>\",\n \"extra_properties\": {}\n}"
response = http.request(request)
puts response.read_body{
"transaction_id": "8e3f5c12-9a7b-4c8d-bc4e-2c963f66afa6",
"status": "completed",
"is_success": true,
"message": "İşlem başarıyla tamamlandı",
"error_code": "bank_declined",
"provider_error_code": "51",
"extra_properties": {}
}{
"type": "https://docs.payven.com.tr/errors/bad_request",
"title": "Geçersiz istek",
"status": 400,
"code": "bad_request",
"detail": "amount.amount alanı zorunlu.",
"correlation_id": "9f1c8e76-2a3b-4f12-9c8d-12cb24a8a8a8"
}{
"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"
}Pay-by-link oluştur
Kart bilgisi almadan, müşteriye SMS / e-posta / WhatsApp ile paylaşılabilen bir ödeme linki üretir. Müşteri Payven Hosted Checkout sayfasında kart bilgisini girer (PCI-DSS SAQ A kapsamına uygun).
Sonuç webhook ile gelir: payment.completed / payment.failed.
curl -X POST https://vpos-sandbox.payven.com.tr/api/v1/payments/order-link \
-H "Authorization: Bearer $PAYVEN_TOKEN" \
-H "Idempotency-Key: order-1001" \
-d '{ ...payload... }'const res = await fetch(
"https://vpos-sandbox.payven.com.tr/api/v1/payments/order-link",
{
method: "POST",
headers: {
Authorization: `Bearer ${accessToken}`,
"Idempotency-Key": "order-1001",
"Content-Type": "application/json",
},
body: JSON.stringify({ /* payload */ }),
},
);
const data = await res.json();import httpx
res = httpx.post(
"https://vpos-sandbox.payven.com.tr/api/v1/payments/order-link",
headers={
"Authorization": f"Bearer {access_token}",
"Idempotency-Key": "order-1001",
},
json={ ... },
)
data = res.json()var req = new HttpRequestMessage(HttpMethod.Post, "https://vpos-sandbox.payven.com.tr/api/v1/payments/order-link");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
req.Headers.Add("Idempotency-Key", "order-1001");
// Content = JsonContent.Create(payload);
var resp = await http.SendAsync(req);req, _ := http.NewRequest("POST", "https://vpos-sandbox.payven.com.tr/api/v1/payments/order-link", nil)
req.Header.Set("Authorization", "Bearer "+accessToken)
req.Header.Set("Idempotency-Key", "order-1001")
// req.Body = bytes.NewReader(payloadJSON)
resp, _ := http.DefaultClient.Do(req)$ch = curl_init("https://vpos-sandbox.payven.com.tr/api/v1/payments/order-link");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer $accessToken",
"Idempotency-Key: order-1001",
],
CURLOPT_POSTFIELDS => json_encode(\$payload),
]);
$data = json_decode(curl_exec($ch), true);HttpResponse<String> response = Unirest.post("https://vpos-sandbox.payven.com.tr/api/v1/payments/order-link")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 15000,\n \"currency\": \"TRY\",\n \"installment\": 6,\n \"callback_url\": \"<string>\",\n \"return_url\": \"<string>\",\n \"description\": \"Sipariş #1001\",\n \"external_id\": \"ORDER-1001\",\n \"customer_email\": \"musteri@example.com\",\n \"customer_phone\": \"<string>\",\n \"extra_properties\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://vpos-sandbox.payven.com.tr/api/v1/payments/order-link")
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'
request.body = "{\n \"amount\": 15000,\n \"currency\": \"TRY\",\n \"installment\": 6,\n \"callback_url\": \"<string>\",\n \"return_url\": \"<string>\",\n \"description\": \"Sipariş #1001\",\n \"external_id\": \"ORDER-1001\",\n \"customer_email\": \"musteri@example.com\",\n \"customer_phone\": \"<string>\",\n \"extra_properties\": {}\n}"
response = http.request(request)
puts response.read_body{
"transaction_id": "8e3f5c12-9a7b-4c8d-bc4e-2c963f66afa6",
"status": "completed",
"is_success": true,
"message": "İşlem başarıyla tamamlandı",
"error_code": "bank_declined",
"provider_error_code": "51",
"extra_properties": {}
}{
"type": "https://docs.payven.com.tr/errors/bad_request",
"title": "Geçersiz istek",
"status": 400,
"code": "bad_request",
"detail": "amount.amount alanı zorunlu.",
"correlation_id": "9f1c8e76-2a3b-4f12-9c8d-12cb24a8a8a8"
}{
"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
Body
Pay-by-link oluşturma isteği. SMS/e-posta ile paylaşılan ödeme linki üretir.
Tutar — kuruş cinsinden.
15000
ISO 4217 para birimi.
"TRY"
İzin verilen maksimum taksit.
6
Ödeme tamamlandığında server-to-server callback için HTTPS URL'iniz.
Müşterinin ödeme sonrası yönlendirileceği sayfa.
Linkte gösterilecek açıklama.
"Sipariş #1001"
Sizin sipariş kimliğiniz.
"ORDER-1001"
Müşteri e-postası.
"musteri@example.com"
Show child attributes
Show child attributes
Response
OK
- Option 1
- Option 2
Yazma operasyonlarından (POST /payments, /refund, /void, /capture) dönen sonuç.
Payven tarafından atanan benzersiz işlem kimliği. Sorgulama / aksiyon endpoint'lerinde URL parametresi olarak kullanılır.
"8e3f5c12-9a7b-4c8d-bc4e-2c963f66afa6"
İşlemin mevcut durumu: pending, pending_3ds, authorized, completed, failed, voided, refunded, partially_refunded.
"completed"
Operasyon başarılı mı? Geçiş döneminde tutuluyor — yeni kodlarda HTTP status kodunu konuşturun (2xx başarı, 4xx/5xx hata).
true
İnsan-okur durum mesajı.
"İşlem başarıyla tamamlandı"
Yalnızca başarısız işlemlerde dolar — Payven canonical hata kodu.
"bank_declined"
Yalnızca başarısız işlemlerde dolar — bankanın orijinal yanıt kodu.
"51"
Banka-spesifik ek alanlar: auth_code, host_reference, provider_transaction_id, processed_at vb.
Show child attributes
Show child attributes