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

# Paystubs.updated webhook

> The `paystubs.updated` webhook is sent when there is any change to a property value of the [paystub object](/api-reference/paystubs/overview).

For example, after a payment is sent the paystub object's `status` value changes from `scheduled` to `completed`.




## OpenAPI

````yaml openAPI/paystubs-webhooks-updated.yaml post /v2/webhooks
openapi: 3.0.0
info:
  title: Paystubs Webhooks API
  version: 1.0.0
  description: >
    API for managing Paystubs webhooks.

    Sent when paystubs are added or updated.


    If you need to access to paystubs as soon as they are available:


    *   The `paystubs.partially_synced` webhook is sent when paystubs going back
    a specified number of days prior (starting from the date when the account
    was added) have been retrieved during initial data retrieval for a newly
    connected account.

    *   The `paystubs.fully_synced` webhook is sent when all paystubs have been
    retrieved during initial data retrieval for a newly connected account.
servers: []
security:
  - basicAuth: []
paths:
  /v2/webhooks:
    post:
      summary: Example subscription
      description: >
        The `paystubs.updated` webhook is sent when there is any change to a
        property value of the [paystub
        object](/api-reference/paystubs/overview).


        For example, after a payment is sent the paystub object's `status` value
        changes from `scheduled` to `completed`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaystubsUpdatedSubscriptionRequest'
            examples:
              paystubs_updated_subscription:
                summary: paystubs.updated subscription
                value:
                  events:
                    - paystubs.updated
                  name: name-for-the-webhook-subscription
                  url: https://your-webhook-backend.com
                  secret: optional-secret
      responses:
        '200':
          description: Successful subscription
          content:
            application/json:
              schema:
                type: object
                properties:
                  event:
                    type: string
                    enum:
                      - paystubs.updated
                    description: The type of event being triggered.
                  name:
                    type: string
                    description: The name of the webhook subscription.
                  data:
                    type: object
                    properties:
                      account:
                        type: string
                        format: uuid
                        description: The unique identifier of the account.
                      user:
                        type: string
                        format: uuid
                        description: >-
                          The unique identifier of the user associated with the
                          paystubs.
                      available_from:
                        type: string
                        format: date-time
                        description: The timestamp when paystubs became available.
                      available_to:
                        type: string
                        format: date-time
                        description: The timestamp until when paystubs are available.
                      available_count:
                        type: integer
                        description: The total number of available paystubs.
                      updated_count:
                        type: integer
                        description: The number of updated paystubs.
                      updated_paystubs:
                        type: array
                        items:
                          type: string
                          format: uuid
                        description: A list of unique identifiers for the updated paystubs.
                      updated_from:
                        type: string
                        format: date-time
                        description: The timestamp from which the paystubs were updated.
                      updated_to:
                        type: string
                        format: date-time
                        description: The timestamp until which the paystubs were updated.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
components:
  schemas:
    PaystubsUpdatedSubscriptionRequest:
      type: object
      description: Request body for subscribing to the `paystubs.updated` webhook.
      properties:
        events:
          type: array
          items:
            type: string
            enum:
              - paystubs.updated
          description: |
            List of events to subscribe to. Must include `paystubs.updated`.
            Value is `paystubs.updated`
        name:
          type: string
          description: |
            Your name for the webhook subscription.
            Name used for the webhook subscription.
        url:
          type: string
          description: >-
            Where you want to receive webhook delivery. This can be either a
            backend URL that you manage, or a URL provided by a webhook
            management service. Argyle handles URL encoding for webhook URLs.
            Send the URL in its normal, unencoded form. URL where you want to
            receive webhook delivery.
        secret:
          type: string
          nullable: true
          description: |
            Optional secret used to verify webhooks.
            Secret used to verify webhooks.
      required:
        - events
        - name
        - url
      example:
        events:
          - paystubs.updated
        name: name-for-the-webhook-subscription
        url: https://your-webhook-backend.com
        secret: optional-secret
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Username = api_key_id, Password = api_key_secret

````