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

# Outgoing token event webhook endpoint

> This is not an endpoint. This is the description of a request that is sent to subscribed webhooks upon token creation or update.

<Card title="Download OpenAPI specification" href="https://enfuce-public-resources.s3.eu-central-1.amazonaws.com/public/api/mycore/external/issuer/events/external/token-event.openapi.json" horizontal />


## OpenAPI

````yaml json-files/token-event.openapi.json post /token
openapi: 3.0.3
info:
  description: >
    All date-time fields adhere to the ISO 8601 standard unless specified
    otherwise.

    For example: 2024-05-31T06:55:17Z
  title: Issuer Token Event API
  version: 1.0.0
servers: []
security: []
tags:
  - name: Issuer event webhooks
paths:
  /token:
    post:
      tags:
        - Issuer event webhooks
      summary: Outgoing token event webhook endpoint
      description: >-
        This is not an endpoint. This is the description of a request that is
        sent to subscribed webhooks upon token creation or update.
      operationId: tokenEvent
      requestBody:
        description: Token event
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TokenEvent'
      responses:
        '204':
          description: Event processed successfully.
        '500':
          description: Error while processing event. Event will be retried.
components:
  schemas:
    TokenEvent:
      type: object
      properties:
        tokenUniqueReferenceId:
          $ref: '#/components/schemas/TokenUniqueReferenceId'
        tokenRequestorId:
          $ref: '#/components/schemas/TokenRequestorId'
        tokenRequestor:
          $ref: '#/components/schemas/TokenRequestor'
        status:
          $ref: '#/components/schemas/TokenStatus'
        tokenSuffix:
          $ref: '#/components/schemas/TokenSuffix'
        dPan:
          $ref: '#/components/schemas/DPan'
        deletedFromConsumerApp:
          $ref: '#/components/schemas/DeletedFromConsumerApp'
        authorizationDecision:
          $ref: '#/components/schemas/AuthorizationDecisionColor'
        cardId:
          allOf:
            - $ref: '#/components/schemas/Id'
          description: The id of the card associated with the token.
        deviceInfo:
          $ref: '#/components/schemas/DeviceInfo'
        createdAt:
          allOf:
            - $ref: '#/components/schemas/Created'
          description: The timestamp when the token was created by the TSP.
        updatedAt:
          allOf:
            - $ref: '#/components/schemas/Updated'
          description: The timestamp of the most recent update to the token’s status.
        updateCount:
          $ref: '#/components/schemas/UpdateCount'
    TokenUniqueReferenceId:
      type: string
      description: >
        A unique identifier for the token assigned by the Token Service Provider
        (TSP) (eg. Visa or MC)

        to manage the lifecycle of the token.
      minLength: 1
      maxLength: 64
      pattern: ^[A-Za-z0-9_-]+$
      example: DWSPMC00000000010906a349d9ca4eb1a4d53e3c90a11d9c
    TokenRequestorId:
      type: string
      description: >-
        Identifier used by merchants or wallet providers to request tokens from
        the TSP.
      example: '212345678'
    TokenRequestor:
      type: string
      enum:
        - APPLE_PAY
        - GOOGLE_PAY
        - SAMSUNG_PAY
        - OTHER
      example: APPLE_PAY
      description: >
        Code of the wallet provider or merchant that requested the token
        (APPLE_PAY /GOOGLE_PAY/SAMSUNG_PAY/OTHER).

        OTHER is used for tokens not linked to a wallet provider, such as
        merchant tokens (credential-on-file,

        subscription payments) or cloud tokens (e.g., Mastercard APANs).
    TokenStatus:
      type: string
      enum:
        - ACTIVE
        - DEACTIVATED
        - INACTIVE
        - SUSPENDED
      example: ACTIVE
      description: |
        Current status of the token:
        - ACTIVE - Available for payments
        - DEACTIVATED - Permanently deactivated
        - INACTIVE - Waiting for activation
        - SUSPENDED - Temporarily not available for payments
    TokenSuffix:
      type: string
      description: >-
        The last 4 digits of the tokenised PAN (DPAN) used for display and
        identification purposes.
      example: '7890'
    DPan:
      type: string
      description: >
        The Device Primary Account Number (DPAN) represents the tokenised card
        number assigned by the payment network (Visa,

        Mastercard, etc.) when a card is added to a digital wallet. It replaces
        the original funding PAN (FPAN) in wallet

        transactions.
      example: '5412345678901234'
    DeletedFromConsumerApp:
      type: boolean
      description: If the token was deleted from the consumer app
    AuthorizationDecisionColor:
      type: string
      enum:
        - GREEN
        - YELLOW
        - ORANGE
        - RED
      example: YELLOW
      description: The wallets common name for authorization decision.
    Id:
      type: string
      format: uuid
      description: Unique identifier of a resource.
      example: 20218aae-b15e-406c-9e9f-23735cd86a48
    DeviceInfo:
      type: object
      description: Device information.
      properties:
        deviceName:
          type: string
          description: >-
            User-defined name of the device provided by the wallet or operating
            system.
          example: My Phone
        deviceType:
          type: string
          description: |
            Indicates the type of device on which the token is provisioned.
            Typical values include PHONE, WATCH, TABLET, or WEARABLE.
          example: PHONE
        operatingSystem:
          type: string
          description: >
            Operating system running on the device. Typical values include IOS,
            ANDROID, or WATCHOS.
          example: ANDROID
    Created:
      type: string
      format: date-time
      description: The date and time when the card was created.
    Updated:
      type: string
      format: date-time
      description: The date and time when the object/entity was updated last time.
    UpdateCount:
      type: integer
      description: The version number of the entity.
      example: 1

````