Ir al contenido

Cancelar suscripción

No cobra más. Es definitivo.

POSThttps://api.kuti.pe/v1/subscriptions/{id}/cancel
Los cobros de periodos que seguían sin pagarse se anulan. Los ya pagados se conservan. Una suscripción cancelada no se reanuda. Emite subscription.cancelled.

Path

Campo
Descripción
id
stringrequerido
Id de la suscripción en el path (sub_…).Ej: sub_01J8Z3K4M5N6P7Q8R9S0T1U2V3

Language

Credentials

Header

Authorization

Secret key de developer · ejemplos con SDK oficial

API Request
$ npm install @kuti-pe/node
import { KutiClient } from "@kuti-pe/node";

const kuti = new KutiClient({ secretKey: process.env.KUTI_SECRET_KEY! });

const result = await kuti.subscriptions.cancel("sub_01J8Z3K4M5N6P7Q8R9S0T1U2V3");
console.log(result.status);
SDK oficial · guía en /sdks
Response

Elige un ejemplo de respuesta:

application/json
200OK
{
  "success": true,
  "data": {
    "id": "sub_01J8Z3K4M5N6P7Q8R9S0T1U2V3",
    "merchant_id": "mer_01J8Z3K4M5N6P7Q8R9S0T1U2V3",
    "livemode": false,
    "customer": {
      "id": "cus_01J8Z3K4M5N6P7Q8R9S0T1U2V3",
      "name": "María López",
      "email": "maria@example.pe",
      "phone": "+51987654567"
    },
    "description": "Plan Pro",
    "billing_mode": "fixed",
    "amount": {
      "amount": "99.00",
      "currency": "PEN"
    },
    "setup_url": null,
    "items": [
      {
        "description": "Plan Pro",
        "unit_amount": "99.00",
        "quantity": 1,
        "amount": "99.00"
      }
    ],
    "frequency": "MONTHLY",
    "interval": 1,
    "day_of_month": 5,
    "last_day_of_month": false,
    "day_of_week": null,
    "start_date": "2026-10-05",
    "end_date": null,
    "charge_time": "09:00",
    "next_charge_at": null,
    "status": "CANCELLED",
    "payment_method": {
      "id": "pm_01J8Z3K4M5N6P7Q8R9S0T1U2V3",
      "type": "YAPE",
      "phone_last4": "4567",
      "status": "ACTIVE"
    },
    "retry_policy": {
      "interval_days": [
        1,
        3,
        5
      ],
      "on_exhausted": "past_due"
    },
    "latest_cycle": {
      "id": "subc_01J8Z3K4M5N6P7Q8R9S0T1U2V3",
      "billing_period": "2026-10",
      "due_date": "2026-10-05",
      "amount": {
        "amount": "99.00",
        "currency": "PEN"
      },
      "status": "PAID",
      "attempts": 1,
      "last_failure_code": null,
      "next_attempt_at": null,
      "payment_intent_id": "pi_01J8Z3K4M5N6P7Q8R9S0T1U2V5",
      "checkout_url": null,
      "paid_at": "2026-10-05T14:00:03.000Z"
    },
    "external_reference": "cliente-4821",
    "metadata": {},
    "cancelled_at": "2026-10-20T16:11:09.000Z",
    "created_at": "2026-10-05T14:00:00.000Z",
    "updated_at": "2026-10-05T14:00:03.000Z"
  }
}