Aboneliği İptal Et
POST
/v1/subscriptions/{id}/cancelOptionalAboneliği hemen (atPeriodEnd=false) veya mevcut dönemin sonunda (atPeriodEnd=true) iptal eder.
Kimlik Doğrulama
İmza Deseni
HMAC-SHA256(secretKey, "{timestamp}\nPOST\n/v1/subscriptions/{id}/cancel\n{sha256(body)}")| Başlık | Değer | Açıklama |
|---|---|---|
X-Api-Key | pk_live_a1b2c3d4e5f6g7h8 | Merchant public API key |
X-Signature | {hmac_sha256_hex} | Hex HMAC-SHA256 request signature |
X-Timestamp | 2026-04-13T10:00:00Z | ISO 8601 UTC request time (±5 min) |
İstek Parametreleri
| Ad | Tür | Zorunlu | Açıklama |
|---|---|---|---|
atPeriodEnd | boolean | Zorunlu | Cancel now (false) or at period end (true) |
reason | string | İsteğe Bağlı | Cancellation reason |
İstek Örneği
JSONİstek Gövdesi
{
"atPeriodEnd": true,
"reason": "Customer requested"
}Yanıt Parametreleri
| Alan | Tür | Örnek |
|---|---|---|
id | string | "sub_5e6f70819a2b" |
status | string | "active" |
cancelAtPeriodEnd | boolean | true |
Yanıt Örneği
JSONYanıt
{
"id": "sub_5e6f70819a2b",
"status": "active",
"cancelAtPeriodEnd": true
}Durum Kodları
200Success
201Created
400Bad Request
401Unauthorized
404Not Found
429Rate Limited
DeneSahte
POSThttps://api.pay.sandbox.kvell.group