# Card expiry and renewal

Notification that a card is about to expire, a card Expired or a Card was renewed.

Endpoint: POST /managed_cards/expiries/watch
Version: v2

## Header parameters:

  - `call-ref` (string)
    A call reference generated by the caller and unique to the caller to provide correlation between the caller and system with a maximum length of 255

  - `published-timestamp` (integer, required)
    The timestamp, expressed in Epoch timestamp using millisecond precision, when this event was published.

  - `signature` (string, required)
    The signature to verify the authenticity of this request.  This is the base64 hash (HmacSHA256) of the `published-timestamp` using your API key.

  - `signature-v2` (string, required)
    The signature to verify the authenticity of this request.  This is the base64 hash (HmacSHA256) of the `call-ref + payload + published-timestamp` using your API key.

## Request fields (application/json):

  - `id` (object, required)

  - `id.id` (string, required)

  - `id.type` (string, required)
    Enum: "managed_cards", "managed_accounts"

  - `eventType` (string, required)
    Enum: "CARD_ABOUT_TO_EXPIRE", "CARD_EXPIRED", "CARD_RENEWED"

  - `state` (object, required)

  - `state.state` (string, required)
    The state of the instrument indicating what it can and cannot do as follows:
- ACTIVE: The instrument is in an active state and can be used in transactions.
- BLOCKED: The instrument is temporarily blocked and cannot be used. Any funds on the instrument are also frozen. The `blockedReason` provides more information as to why it was blocked.
- DESTROYED: The instrument has been permanently destroyed. The `destroyReason` provides more information as to why it was destroyed.
- NOT_ENABLED: The instrument is not enabled for use, since the linked user has not completed all necessary verification steps.
    Enum: "ACTIVE", "BLOCKED", "DESTROYED", "NOT_ENABLED"

  - `state.blockedReason` (string)
    The reason why the instrument has been blocked:
- USER: The root, or an authorised user, of the identity owning the instrument has temporarily blocked the instrument.
- SYSTEM: The platform or an administrator of the platform has temporarily blocked the instrument.
- LOST: The instrument has been blocked because it was marked as lost.
- SINGLE_SPEND: The instrument has been automatically blocked after its first successful transaction (single-spend card).
    Enum: "USER", "SYSTEM", "LOST", "SINGLE_SPEND"

  - `state.destroyedReason` (string)
    The reason why the instrument has been destroyed:
- SYSTEM: The platform or an administrator of the platform has destroyed the instrument.
- USER: The root, or an authorised user, of the identity owning the instrument has destroyed the instrument.
- LOST: The instrument was automatically destroyed as it was marked as lost.
- STOLEN: The instrument was automatically destroyed as it was marked as stolen.
- EXPIRED: The instrument was automatically destroyed as it expired.
- COMPROMISED: The instrument was automatically destroyed as it was marked as compromised.
- SINGLE_SPEND: The instrument was automatically destroyed as it was a single-spend card that was used.
    Enum: "SYSTEM", "USER", "LOST", "STOLEN", "EXPIRED", "COMPROMISED", "SINGLE_SPEND"

  - `cardType` (string, required)
    Enum: "VIRTUAL", "PHYSICAL"

  - `expiryMmyy` (string)
    The end date of this card, in MMYY format.

  - `renewalType` (string, required)
    Indicates how the card will be handled once it is close to expiring.
- RENEW: The card will be automatically renewed, keeping the same card number but with a new expiry date and CVV.
- NO_RENEW: Once the expiry date is reached, the card is destroyed.
    Enum: "RENEW", "NO_RENEW"

  - `renewalTimestamp` (string)
    The timestamp when the card will be renewed, expressed in Epoch timestamp using millisecond precision.

