1. Kayıtlı Kart ile Ödeme
Sipay API Documentation
TR
  • EN
  • TR
  • Genel Bakış
    • IP Kısıtlaması
    • Başlangıç
    • Test Kartları
  • Kimlik Doğrulama
    • Token Oluşturma
      POST
  • Taksitler & Komisyonlar
    • Taksit Bilgisi Sorgulama
      POST
    • Komisyon Bilgisi Sorgulama
      POST
    • Üye İşyeri Taksit Bilgisi Sorgulama
      POST
  • Non-3DS Ödeme
    • Non-3DS Ödeme Akışı
    • Non-3DS Kart Ödemesi
      POST
    • Non-3DS Tekrarlayan Ödeme
      POST
    • Non-3DS Sigorta Ödemesi
      POST
    • Non-3DS Ön Provizyon Ödemesi
      POST
    • Ödeme Onaylama
      POST
  • 3D Secure Ödemesi
    • 3D Secure Ödeme Akışı
    • 3D Secure Kart Ödemesi
      POST
    • 3D Secure Tekrarlayan Ödeme
      POST
    • 3D Secure Ön Provizyon Ödemesi
      POST
    • Ödeme Tamamlama
      POST
    • Ödeme Onaylama
      POST
    • 3D Secure Tarım Ödemesi
      POST
  • Sipay ile Non-3DS ve 3D Ödeme
    • Purchase Link Örneği
    • Sipay ile Non-3DS ve 3D Secure Ödeme
  • Ödeme Durumu Sorgulama
    • Durum Sorgulama
  • Kayıtlı Kart ile Ödeme
    • Kart Kaydetme
      POST
    • 3D Secure Kart Token ile Ödeme
      POST
    • Kayıtlı Kart Bilgilerini Sorgulama
      GET
    • Kayıtlı Kart Düzenleme
      POST
    • Kayıtlı Kart Silme
      POST
    • Non-3DS Kart Token ile Ödeme
      POST
  • HASH
    • Hash Oluşturma
    • Hash Doğrulama
  • Tekrarlayan Ödeme
    • Tekrarlayan Ödeme Sorgulama
    • Tekrarlayan Ödeme Plan Süreci
    • Tekrarlayan Ödeme Planı Güncelleme
  • İade
    • İade
  • Para Dağıtımı
    • Banka Hesabına Para Aktarımı
  • Webhook
    • Webhook
  • Hata Durum Kodları
    • Durum Kodları
  • Plugin
    • Magento v1
    • Magento v2
    • Opencart
    • Presta
    • Woocommerce
    • Shopify
  1. Kayıtlı Kart ile Ödeme

Non-3DS Kart Token ile Ödeme

Testing
POST
/ccpayment/api/payByCardTokenNonSecure
payByCardTokenNonSecure uç noktası (endpoint), üye işyerlerinin Sipay ödeme entegrasyon sistemi üzerinde daha önce kaydedilmiş bir card_token kullanarak Non-Secure ödeme işlemi başlatmasını sağlar.
Bu akışta hassas kart bilgilerinin yeniden girilmesine veya gönderilmesine gerek kalmaz. Ödeme isteğinde card_token bilgisi iletilmelidir.
Üye işyeri, ödeme sayfasını yüklemeden önce API yanıtındaki işlem durumunu kontrol etmelidir. API yanıtına göre sepet ve sipariş durumu güncellenmelidir.

Hash key istekte gönderilmelidir.
Örnek hash key değerleri, seçilen programlama diline karşılık gelen yan taraftaki request form alanında bulunabilir.
Hash algoritmasına ait örnek implementasyon istekte yer almaktadır.

Hash Parametreleri#

hash algorithm içerisinde kullanılacak parametreler ve sıralaması aşağıdaki gibidir.
total
installment
currency_code
merchant_key
invoice_id
app_secret

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/jsonRequired

Examples

Responses

🟢200Başarılı
application/json
Bodyapplication/json

🔵36Başarısız
⚪68Başarısız
⚪13Başarısız
Request Request Example
Shell
JavaScript
Java
Swift
#!/usr/bin/env bash

 

generate_hash_key() {
  local total="$1"
  local installment="$2"
  local currency_code="$3"
  local merchant_key="$4"
  local invoice_id="$5"
  local app_secret="$6"

 

  local data="${total}|${installment}|${currency_code}|${merchant_key}|${invoice_id}"

 

  local rand1
  rand1=$(openssl rand -hex 16)
  local iv
  iv=$(printf "%s" "$rand1" | openssl sha1 | awk '{print $2}' | cut -c1-16)

 

  local password
  password=$(printf "%s" "$app_secret" | openssl sha1 | awk '{print $2}')

 

  local rand2
  rand2=$(openssl rand -hex 16)
  local salt
  salt=$(printf "%s" "$rand2" | openssl sha1 | awk '{print $2}' | cut -c1-4)

 

  local salt_with_password
  salt_with_password=$(printf "%s" "${password}${salt}" | openssl sha256 | awk '{print $2}' | cut -c1-32)

 

  # Python kodunda key ve iv doğrudan ASCII byte olarak veriliyor.
  local key_hex
  key_hex=$(printf "%s" "$salt_with_password" | xxd -p -c 256)

 

  local iv_hex
  iv_hex=$(printf "%s" "$iv" | xxd -p -c 256)

 

  local encrypted_base64
  encrypted_base64=$(printf "%s" "$data" | openssl enc -aes-256-cbc -K "$key_hex" -iv "$iv_hex" -base64)

 

  local msg_encrypted_bundle="${iv}:${salt}:${encrypted_base64}"
  msg_encrypted_bundle="${msg_encrypted_bundle//\//__}"

 

  echo "$msg_encrypted_bundle"
}

 

total="100"
installment="1"
currency_code="TRY"
merchant_key="merchant_key"
invoice_id="invoice_id"
app_secret="app_secret"

 

result=$(generate_hash_key "$total" "$installment" "$currency_code" "$merchant_key" "$invoice_id" "$app_secret")
echo "$result"
Response Response Example
200 - Success
{
    "status_code": 100,
    "status_description": "Payment process successful",
    "data": {
        "sipay_status": 1,
        "order_no": "VP17697618245351216",
        "order_id": "VP17697618245351216",
        "invoice_id": "565655656556465456465465444",
        "sipay_payment_method": 1,
        "credit_card_no": "450803****4509",
        "transaction_type": "Auth",
        "payment_status": 1,
        "payment_method": 1,
        "error_code": 100,
        "error": "",
        "auth_code": "P48905",
        "merchant_commission": 0.1,
        "user_commission": 0,
        "merchant_commission_percentage": 2,
        "merchant_commission_fixed": 0,
        "installment": 1,
        "amount": 5,
        "payment_reason_code": "",
        "payment_reason_code_detail": "",
        "hash_key": "a006758962dc3aae:e360:C91EOLvl__WRy__kccvBNIWhbeVT26WViFh4839NdkfgoyO1uXnV3o2+g+Mf__jU72JGCmu3cHIUkms8Q2OU611gQ==",
        "original_bank_error_code": "",
        "original_bank_error_description": "",
        "host_reference_id": "603000435621"
    }
}
Previous
Kayıtlı Kart Silme
Next
Hash Oluşturma
Built with