> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tagada.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel a renewal cycle

> Waits for a running try; a paid try wins.



## OpenAPI

````yaml /payments-api/openapi.json post /v1/renewal-cycles/{id}/cancel
openapi: 3.1.0
info:
  title: TagadaPay Payments API
  version: '2026-11-01'
servers:
  - url: https://api.tagada.io
security: []
paths:
  /v1/renewal-cycles/{id}/cancel:
    post:
      tags:
        - renewal_cycles
      summary: Cancel a renewal cycle
      description: Waits for a running try; a paid try wins.
      operationId: renewalCycles.cancel
      parameters:
        - in: path
          name: id
          required: true
          schema:
            pattern: ^rcy_[0-9a-hjkmnp-tv-z]{26}$
            type: string
        - description: Required for platform keys; refused for secret/publishable keys.
          in: header
          name: payments-account
          required: false
          schema:
            description: Required for platform keys; refused for secret/publishable keys.
            type: string
        - in: header
          name: payments-version
          required: false
          schema:
            enum:
              - '2026-11-01'
            type: string
        - in: header
          name: idempotency-key
          required: true
          schema:
            maxLength: 255
            minLength: 1
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RenewalCycleCommand'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenewalCycle'
          description: Renewal cycle with its tries.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenewalCycleApiError'
          description: >-
            parameter_invalid, parameter_missing, amount_out_of_range,
            payment_method_not_usable
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenewalCycleApiError'
          description: authentication_required
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenewalCycleApiError'
          description: permission_denied
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenewalCycleApiError'
          description: resource_not_found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenewalCycleApiError'
          description: >-
            idempotency_key_reused, idempotency_key_in_progress, cycle_not_open,
            notice_not_due, try_refused_by_law
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenewalCycleApiError'
          description: rate_limited
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenewalCycleApiError'
          description: internal_error
        '501':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenewalCycleApiError'
          description: not_implemented
      security:
        - bearerAuth: []
components:
  schemas:
    RenewalCycleCommand:
      additionalProperties: false
      properties: {}
      type: object
    RenewalCycle:
      properties:
        amount:
          description: Integer amount in the currency minor unit.
          maximum: 2147483647
          minimum: 0
          type: integer
        card_update_until:
          format: date-time
          type:
            - string
            - 'null'
        concluded_at:
          format: date-time
          type:
            - string
            - 'null'
        created_at:
          format: date-time
          type: string
        currency:
          type: string
        customer:
          type: string
        due_at:
          format: date-time
          type: string
        ending:
          enum:
            - cancel
            - pause
            - null
          type:
            - string
            - 'null'
        id:
          pattern: ^rcy_[0-9a-hjkmnp-tv-z]{26}$
          type: string
        mode:
          enum:
            - live
            - test
          type: string
        next_try_at:
          format: date-time
          type:
            - string
            - 'null'
        notice_sent_at:
          format: date-time
          type:
            - string
            - 'null'
        object:
          enum:
            - renewal_cycle
          type: string
        outcome_reason:
          type:
            - string
            - 'null'
        payment_method:
          type: string
        period_ref:
          type: string
        policy_version:
          type:
            - string
            - 'null'
        status:
          enum:
            - scheduled
            - trying
            - waiting_retry
            - waiting_card_update
            - waiting_customer
            - waiting_merchant
            - succeeded
            - failed
            - canceled
          type: string
          x-extensible-enum:
            - scheduled
            - trying
            - waiting_retry
            - waiting_card_update
            - waiting_customer
            - waiting_merchant
            - succeeded
            - failed
            - canceled
        store:
          type: string
        subscription_group_id:
          type:
            - string
            - 'null'
        subscription_id:
          type:
            - string
            - 'null'
        test_clock:
          pattern: ^clk_[0-9a-hjkmnp-tv-z]{26}$
          type:
            - string
            - 'null'
        tries:
          items:
            properties:
              amount:
                description: Integer amount in the currency minor unit.
                maximum: 2147483647
                minimum: 0
                type: integer
              payment:
                type: string
              priced:
                type: boolean
              processor:
                type:
                  - string
                  - 'null'
              retry:
                minimum: 0
                type: integer
              state:
                enum:
                  - trying
                  - paid
                  - declined
                  - skipped
                type: string
              switched:
                type: boolean
            required:
              - payment
              - processor
              - amount
              - retry
              - switched
              - priced
              - state
            type: object
          type: array
      required:
        - id
        - object
        - mode
        - store
        - customer
        - subscription_id
        - subscription_group_id
        - period_ref
        - amount
        - currency
        - payment_method
        - status
        - due_at
        - next_try_at
        - card_update_until
        - notice_sent_at
        - ending
        - outcome_reason
        - tries
        - policy_version
        - test_clock
        - created_at
        - concluded_at
      type: object
    RenewalCycleApiError:
      properties:
        error:
          properties:
            code:
              $ref: '#/components/schemas/RenewalCycleErrorCode'
            details:
              $ref: '#/components/schemas/RenewalCycleErrorDetails'
            message:
              type: string
            param:
              type:
                - string
                - 'null'
            request_id:
              type: string
            type:
              enum:
                - invalid_request_error
                - authentication_error
                - permission_error
                - conflict_error
                - rate_limit_error
                - api_error
                - unavailable_error
              type: string
          required:
            - type
            - code
            - message
            - param
            - request_id
          type: object
      required:
        - error
      type: object
    RenewalCycleErrorCode:
      enum:
        - amount_out_of_range
        - authentication_required
        - cycle_exists_for_period
        - cycle_not_open
        - cycle_open_for_subject
        - idempotency_key_in_progress
        - idempotency_key_reused
        - internal_error
        - no_active_policy
        - not_implemented
        - notice_not_due
        - parameter_invalid
        - parameter_missing
        - payment_method_not_usable
        - payments_api_disabled
        - period_claimed_by_v2
        - period_left_to_v2
        - period_refused
        - permission_denied
        - rate_limited
        - resource_not_found
        - store_not_on_payments_api
        - stored_credential_missing
        - try_refused_by_law
      type: string
      x-extensible-enum:
        - amount_out_of_range
        - authentication_required
        - cycle_exists_for_period
        - cycle_not_open
        - cycle_open_for_subject
        - idempotency_key_in_progress
        - idempotency_key_reused
        - internal_error
        - no_active_policy
        - not_implemented
        - notice_not_due
        - parameter_invalid
        - parameter_missing
        - payment_method_not_usable
        - payments_api_disabled
        - period_claimed_by_v2
        - period_left_to_v2
        - period_refused
        - permission_denied
        - rate_limited
        - resource_not_found
        - store_not_on_payments_api
        - stored_credential_missing
        - try_refused_by_law
    RenewalCycleErrorDetails:
      additionalProperties: {}
      properties:
        credential_reason:
          enum:
            - inactive_instrument
            - customer_mismatch
            - credential_revoked
            - no_off_session_agreement
            - no_network_transaction_id
            - no_chargeable_token
            - billed_by_integration
            - not_a_card
            - wallet_without_processor_token
            - not_routable
            - null
          type:
            - string
            - 'null'
        cycle_id:
          pattern: ^rcy_[0-9a-hjkmnp-tv-z]{26}$
          type: string
        earliest_at:
          format: date-time
          type:
            - string
            - 'null'
        first_seen:
          description: True only for the first refused offer of this subject and period.
          type: boolean
        reason:
          enum:
            - store_not_on_payments_api
            - period_claimed_by_v2
            - billed_by_integration
            - period_in_v2_dunning
            - credential_v2_only
            - inactive_instrument
            - customer_mismatch
            - credential_revoked
            - no_off_session_agreement
            - no_network_transaction_id
            - no_chargeable_token
            - not_a_card
            - wallet_without_processor_token
            - not_routable
            - law
            - minimum_wait
            - advice_code
            - card_budget
            - tombstone
            - payments_api_disabled
          type: string
      type: object
  securitySchemes:
    bearerAuth:
      description: >-
        Secret, platform or publishable API key. Platform keys require
        Payments-Account.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.