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

# Subscription

> This webhook event is sent to the configured partner URL when the subscription has a status change. Subscription status can be `PENDING`, `ENDING_EXPIRED`, `TRIAL`, `ACTIVE`, `PAUSED`, `EXPIRED`, `CANCELLED`, `FAILED`.



## OpenAPI

````yaml /api-reference/webhooks/webhooks.json post /subscription/merchant_defined_callbackurl
openapi: 3.0.3
info:
  title: Webhooks
  description: API's to add and get webhook information.
  version: 1.0.0
servers:
  - url: https://webhook.site
    description: Merchant defined callback URL for testing purposes
security:
  - ApiKeyAuth: []
    SignatureAuth: []
paths:
  /subscription/merchant_defined_callbackurl:
    post:
      tags:
        - Webhook
      summary: Subscription
      description: >-
        This webhook event is sent to the configured partner URL when the
        subscription has a status change. Subscription status can be `PENDING`,
        `ENDING_EXPIRED`, `TRIAL`, `ACTIVE`, `PAUSED`, `EXPIRED`, `CANCELLED`,
        `FAILED`.
      operationId: subscriptionWebhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                callbackType:
                  type: string
                  example: SUBSCRIPTION
                status:
                  type: string
                  example: >-
                    ACTIVE, PENDING, PENDING_EXPIRED, TRIAL, PAUSED, EXPIRED,
                    CANCELLED, FAILED
                quoteAmount:
                  type: string
                  example: '48'
                tbId:
                  type: string
                  example: 667946642f968332ee9a68e5
                timestamp:
                  type: string
                  format: date-time
                  example: '2024-08-01T18:57:34.872Z'
                currentPeriodStart:
                  type: string
                  format: date-time
                  example: '2024-08-01T13:00:00.000Z'
                currentPeriodEnd:
                  type: string
                  format: date-time
                  example: '2024-08-02T13:00:00.000Z'
            example:
              callbackType: SUBSCRIPTION
              status: ACTIVE
              quoteAmount: '48'
              tbId: 667946642f968332ee9a68e5
              timestamp: '2024-08-01T18:57:34.872Z'
              currentPeriodStart: '2024-08-01T13:00:00.000Z'
              currentPeriodEnd: '2024-08-02T13:00:00.000Z'
      responses:
        '200':
          description: Webhook received successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ack:
                    type: boolean
                    example: true
              example:
                ack: true
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Merchant API Key
    SignatureAuth:
      type: apiKey
      in: header
      name: x-signature
      description: Generated request signature

````

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