vellTRDocs
API ReferencePaymentsCreate Payment Session

Create Payment Session

POST/v1/payments/sessionsCore

Create a hosted-checkout session. The session holds the amount, description, and redirect URLs; the buyer completes the card (or TR QR) flow on the Kvell hosted page. Set mode="qr" to mint a BKM/TCMB TR QR payment instead of a card checkout.

Authentication

Signature Pattern

HMAC-SHA256(secretKey, "{timestamp}\nPOST\n/v1/payments/sessions\n{sha256(body)}")
HeaderValueDescription
X-Api-Keypk_live_a1b2c3d4e5f6g7h8Merchant public API key
X-Signature{hmac_sha256_hex}Hex HMAC-SHA256 request signature (see below)
X-Timestamp2026-04-13T10:00:00ZISO 8601 UTC request time, validated within ±5 min

Request Parameters

NameTypeRequiredDescription
transactionIdstringRequiredUnique merchant transaction id (idempotency fence, unique per merchant)
amountintegerOptionalAmount in kuruş (1/100 TRY). >=100 for mode="payment"/"qr"; omit for mode="card_update_only"
currencystringRequiredISO 4217, always "TRY" in Phase 1
descriptionstringOptionalTransaction description shown on the checkout page
returnUrlstringRequiredRedirect URL after the buyer finishes (success or failure)
callbackUrlstringOptionalOverride the store default webhook URL for this payment
installmentEnabledbooleanOptionalShow the installment picker on the hosted page
customerIdstringOptionalBind the session to a saved customer (enables save-card)
modestringOptional"payment" (default) | "card_update_only" | "qr"
splitsarrayOptionalMarketplace split config [{submerchantId, amountMinor}] — payment mode only

Request Example

JSONRequest Body
{
  "transactionId": "ORDER-2026-001",
  "amount": 15000,
  "currency": "TRY",
  "description": "Order #1234",
  "returnUrl": "https://merchant.example.com/return"
}

Response Parameters

FieldTypeExample
sessionIdstring"3f1c9a2e-6b4d-4e8a-9c1f-2a7b8c9d0e1f"
checkoutUrlstring"https://pay.kvell.group/s/3f1c9a2e-6b4d-…
expiresAtstring"2026-04-13T10:30:00Z"
merchantIdstring"mrc_8a1b2c3d4e5f"
amountinteger15000
currencystring"TRY"
statusstring"active"

Response Example

JSONResponse
{
  "sessionId": "3f1c9a2e-6b4d-4e8a-9c1f-2a7b8c9d0e1f",
  "checkoutUrl": "https://pay.kvell.group/s/3f1c9a2e-6b4d-4e8a-9c1f-2a7b8c9d0e1f",
  "expiresAt": "2026-04-13T10:30:00Z",
  "merchantId": "mrc_8a1b2c3d4e5f",
  "amount": 15000,
  "currency": "TRY",
  "status": "active"
}

Status Codes

200Success
201Created
400Bad Request
401Unauthorized
404Not Found
429Rate Limited
Try itMock
POSThttps://api.pay.sandbox.kvell.group