Ödeme Yöntemi Yazma — payment-methods/create · update · delete ✓ Canlı

Ödeme yöntemi tanımlarını yazar (oluştur/güncelle/sil). Alan adları payment-methods/list okuma şekliyle simetriktir. Sahiplik/idempotency/hata/echo kuralları katalog yazma ile ortaktır.

← API Uçları · Ortak kurallar · Scope: payment_methods:write.

payment-methods/create

POST /plugin-api/payment-methods/create
{
  "title": "Multinet",               // ZORUNLU (2..100)
  "description": "Yemek kartı",      // ops (<=500)
  "cash": false,                     // ops — nakit yöntemi mi (default false)
  "noreport": false,                 // ops — rapor dışı mı (default false)
  "idempotencyKey": "pm-1"           // ops
}

Yöntemi kullanabilecek personel listesi API'den yazılamaz — yeni yöntem kısıtsız oluşur, atama panelden.

payment-methods/update

POST /plugin-api/payment-methods/update
{ "id": "ab-12", "description": "Yemek kartı (POS)" }   // {id} + title/description/cash/noreport'tan en az biri

{ id } + title/description/cash/noreport'tan en az biri. Sahiplik kontrollü (notOwned).

payment-methods/delete

POST /plugin-api/payment-methods/delete
{ "id": "ab-12" }
// 200 → { "success": true, "data": { "id": "ab-12", "deleted": true } }

Sahiplik kontrollü.

Yanıt şekli (create/update)

payment-methods/list ile aynı şekil: { id, title, description, cash, noreport }.