DOCS
Panel Giriş Başvurun

Pazaryeri Entegrasyonu

Ödeme Profili Yönetimi

Ödeme profili; komisyon oranları, işlem ücretleri, ödeme günleri ve valör kurallarını içeren yapılandırma setidir. Farklı satıcı gruplarına farklı profiller atayabilirsiniz.

Ödeme Profili Nedir?

Pazaryeri, satıcılarıyla farklı ödeme profillerinde çalışabilir — örneğin premium satıcılara %2, standart satıcılara %5, yeni satıcılara %7 komisyon uygulayabilirsiniz.

Valör Hesaplama Tipleri

Profilde tanımlanan valör tipi, satıcıya ödemenin ne zaman yapılacağını belirler:

KodTipAçıklama
WWEEKLYHaftalık — haftanın belirli gününde ödeme yapılır
HHALF_MONTHLYYarım aylık — ayda iki kez ödeme yapılır
MMONTHLYAylık — ayın belirli gününde ödeme yapılır
TTRANSACTIONİşlem tarihi temelli — işlemden N gün sonra ödeme yapılır
DDELIVERYTeslim tarihi temelli — teslimattan N gün sonra ödeme yapılır

Teslim tarihi bazlı (D) profillerde satıcıya ödeme, teslimat tarihi bildirilmeden yapılmaz — her işlemin teslimatını UpdateDeliveryDate servisiyle bildirmeniz gerekir.

CreatePaymentProfile

TESTPOST https://apitest.paynkolay.com.tr/marketplace/v1/paymentprofile

PRODPOST https://api.paynkolay.com.tr/marketplace/v1/paymentprofile

İstek — JSON
{
  "profileExternalId": "IslemValor1",
  "apiSecretKey": "sx_value_here",
  "name": "Premium Satıcı Profili",
  "mpCommissionRate": 5.00,
  "mpCost": 0.50,
  "paymentDay": null,
  "valorDateCount": 1,
  "valorCalculationType": "T",
  "active": true
}
ParametreTipZorunluAçıklama
profileExternalIdStringTekil dış ID — kendi sisteminizdeki ID
apiSecretKeyStringPazaryerine ait SX değeri
nameStringProfil adı
mpCommissionRateBigDecimalPazaryeri komisyon oranı (%)
mpCostBigDecimalİşlem başına sabit ücret (TL)
paymentDayInteger✅*Ödeme günü (1-7, pazartesi=1) — haftalık/aylık profillerde zorunlu
valorDateCountIntegerPara transferi için bekleme süresi (gün)
valorCalculationTypeStringValör tipi: W, H, M, T, D
activeBooleanProfil aktif mi? (varsayılan: true)
Yanıt — JSON
{
  "data": {
    "profileExternalId": "IslemValor1",
    "marketplaceCode": "MP12345",
    "name": "Premium Satıcı Profili",
    "mpCommissionRate": 5.00,
    "mpCost": 0.50,
    "paymentDay": "per",
    "valorDateCount": 1,
    "active": true,
    "createDate": "2025-01-15T10:30:00Z",
    "updateDate": "2025-01-15T10:30:00Z"
  },
  "success": true,
  "responseCode": "200",
  "responseMessage": "SUCCESS"
}

Örnekteki profil, işlem yapıldıktan 1 gün sonra ödeme yapan işlem-temelli (T) bir profildir. Yanıtta profil, marketplaceCode ve tarih alanlarıyla birlikte döner.

GetPaymentProfileById

TESTPOST https://apitest.paynkolay.com.tr/marketplace/v1/paymentprofile/get

PRODPOST https://api.paynkolay.com.tr/marketplace/v1/paymentprofile/get

İstek — JSON
{
  "profileExternalId": "IslemValor1"
}
Yanıt — JSON
{
  "data": {
    "profileExternalId": "IslemValor1",
    "marketplaceCode": "MP12345",
    "name": "Premium Satıcı Profili",
    "mpCommissionRate": 5.00,
    "mpCost": 0.50,
    "paymentDay": "per",
    "valorDateCount": 1,
    "active": true,
    "createDate": "2025-01-15T10:30:00Z",
    "updateDate": "2025-01-15T10:30:00Z"
  },
  "success": true,
  "responseCode": "200",
  "responseMessage": "SUCCESS"
}

UpdatePaymentProfile

TESTPOST https://apitest.paynkolay.com.tr/marketplace/v1/paymentprofile/update

PRODPOST https://api.paynkolay.com.tr/marketplace/v1/paymentprofile/update

Güncellemede tüm parametreler gönderilmelidir; değiştirmek istemediğiniz alanları mevcut değerleriyle yollayın.

İstek — JSON
{
  "profileExternalId": "IslemValor1",
  "apiSecretKey": "sx_value_here",
  "name": "Güncellenmiş Premium Profil",
  "mpCommissionRate": 4.50,
  "mpCost": 0.30,
  "paymentDay": null,
  "valorDateCount": 2,
  "valorCalculationType": "T",
  "active": true
}
Yanıt — JSON
{
  "data": {
    "profileExternalId": "IslemValor1",
    "marketplaceCode": "MP12345",
    "name": "Güncellenmiş Premium Profil",
    "mpCommissionRate": 4.50,
    "mpCost": 0.30,
    "paymentDay": "per",
    "valorDateCount": 2,
    "active": true,
    "createDate": "2025-01-15T10:30:00Z",
    "updateDate": "2025-01-16T14:20:00Z"
  },
  "success": true,
  "responseCode": "200",
  "responseMessage": "SUCCESS"
}

DeletePaymentProfileById

TESTPOST https://apitest.paynkolay.com.tr/marketplace/v1/paymentprofile/delete

PRODPOST https://api.paynkolay.com.tr/marketplace/v1/paymentprofile/delete

Aktif satıcılara atanmış profilleri silemezsiniz — önce satıcıları başka bir profile geçirmeniz gerekir.

İstek — JSON
{
  "profileExternalId": "IslemValor1"
}
Yanıt — JSON
{
  "data": null,
  "success": true,
  "responseCode": "200",
  "responseMessage": "SUCCESS"
}

GetAllPaymentProfileByApiSecretKey

TESTPOST https://apitest.paynkolay.com.tr/marketplace/v1/paymentprofile/list

PRODPOST https://api.paynkolay.com.tr/marketplace/v1/paymentprofile/list

ParametreTipZorunluAçıklama
apiSecretKeyStringPazaryerine ait SX değeri
activeBooleantrue = sadece aktif, false = sadece pasif, null = tümü
İstek — JSON
{
  "apiSecretKey": "sx_value_here",
  "active": true
}
Yanıt — JSON
{
  "data": [
    {
      "profileExternalId": "Premium1",
      "marketplaceCode": "MP12345",
      "name": "Premium Satıcı Profili",
      "mpCommissionRate": 5.00,
      "mpCost": 0.50,
      "paymentDay": "per",
      "valorDateCount": 1,
      "active": true,
      "createDate": "2025-01-15T10:30:00Z",
      "updateDate": "2025-01-15T10:30:00Z"
    },
    {
      "profileExternalId": "Standard1",
      "marketplaceCode": "MP12345",
      "name": "Standart Satıcı Profili",
      "mpCommissionRate": 7.00,
      "mpCost": 1.00,
      "paymentDay": "per",
      "valorDateCount": 3,
      "active": true,
      "createDate": "2025-01-10T09:15:00Z",
      "updateDate": "2025-01-10T09:15:00Z"
    }
  ],
  "success": true,
  "responseCode": "200",
  "responseMessage": "SUCCESS"
}

Örnek Profil Kurguları

Premium Satıcı
  • %3 komisyon, işlem ücreti yok
  • valorDateCount: 1 — ertesi gün ödeme
  • valorCalculationType: "T"
Standart Satıcı
  • %5 komisyon + 0.50 TL işlem ücreti
  • valorDateCount: 3
  • valorCalculationType: "T"
Haftalık Ödemeli
  • %5 komisyon
  • paymentDay: 1 — her pazartesi
  • valorCalculationType: "W"
Teslimat Sonrası
  • %4 komisyon
  • Teslimattan 2 gün sonra ödeme
  • valorCalculationType: "D" + UpdateDeliveryDate

Uçtan Uca Örnek

Beş servisi tek sınıfta toplayan çalışır Node.js örneği:

PaymentProfileManager — Node.js (axios)
const axios = require('axios');

class PaymentProfileManager {
  constructor(apiSecretKey, merchantSecretKey, baseURL) {
    this.apiSecretKey = apiSecretKey;
    this.merchantSecretKey = merchantSecretKey;
    this.baseURL = baseURL;
  }

  async createProfile(profileData) {
    const response = await axios.post(
      `${this.baseURL}/paymentprofile`,
      {
        ...profileData,
        apiSecretKey: this.apiSecretKey
      }
    );
    return response.data;
  }

  async getProfile(profileExternalId) {
    const response = await axios.post(
      `${this.baseURL}/paymentprofile/get`,
      { profileExternalId }
    );
    return response.data;
  }

  async updateProfile(profileData) {
    const response = await axios.post(
      `${this.baseURL}/paymentprofile/update`,
      {
        ...profileData,
        apiSecretKey: this.apiSecretKey
      }
    );
    return response.data;
  }

  async deleteProfile(profileExternalId) {
    const response = await axios.post(
      `${this.baseURL}/paymentprofile/delete`,
      { profileExternalId }
    );
    return response.data;
  }

  async listProfiles(activeOnly = null) {
    const response = await axios.post(
      `${this.baseURL}/paymentprofile/list`,
      {
        apiSecretKey: this.apiSecretKey,
        active: activeOnly
      }
    );
    return response.data;
  }
}

// Kullanım
const manager = new PaymentProfileManager(
  process.env.API_SECRET_KEY,
  process.env.MERCHANT_SECRET_KEY,
  'https://apitest.paynkolay.com.tr/marketplace/v1'
);

// Profil oluştur
const newProfile = await manager.createProfile({
  profileExternalId: "PROFILE_001",
  name: "Test Profili",
  mpCommissionRate: 5.00,
  mpCost: 0.50,
  valorDateCount: 2,
  valorCalculationType: "T",
  active: true
});

Son güncelleme: 10 Eylül 2026

v1 · Versiyonlar