Cancelar uma assinatura

Changed on

Cancela imediatamente uma assinatura ativa.

A assinatura passa para o status CANCELLED e nenhuma cobrança futura será gerada. Esta operação é irreversível.

post/subscriptions/cancel

Request

  • Base URL
    https://api.abacatepay.com/v2
  • URL
    https://api.abacatepay.com/v2/subscriptions/cancel
  • Auth
    HTTP bearer

Request body

idstring required

Identificador único da assinatura a ser cancelada

Example request

{
  "id": "subs_abc123xyz"
}

Response

Assinatura cancelada com sucesso.

errorstring nullable
successboolean

Se a requisição obteve sucesso ou não.

Example response

{
  "data": {
    "id": "subs_abc123xyz",
    "checkoutId": "bill_abc123xyz",
    "customerId": "cust_abc123xyz",
    "amount": 10000,
    "status": "ACTIVE",
    "method": "CARD",
    "coupons": [],
    "retryPolicy": {
      "maxRetry": 3,
      "retryEvery": 1
    },
    "createdAt": "2024-11-04T18:38:28.573Z",
    "updatedAt": "2024-11-04T18:38:28.573Z"
  },
  "success": true
}

Changes

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • info

      removed the EXPIRED enum value from the / response property for the response status

    • info

      removed the FAILED enum value from the / response property for the response status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status