> ## 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.

# Single Payment Subscription

> This API is used to create a new invoice on an ACTIVE subscription, that can be shared with a customer.



## OpenAPI

````yaml /api-reference/subscriptions/subs.json post /subscription/v1.0/singlePaymentSubscription
openapi: 3.0.3
info:
  title: Subscription API
  description: API for creating and managing subscription sessions and payments.
  version: 1.0.0
servers:
  - url: https://sandbox-api.transactbridge.com
    description: Sandbox Environment
  - url: https://api.transactbridge.com
    description: Production Environment
security:
  - ApiKeyAuth: []
    SignatureAuth: []
paths:
  /subscription/v1.0/singlePaymentSubscription:
    post:
      tags:
        - Subscription
      summary: Single Payment Subscription
      description: >-
        This API is used to create a new invoice on an ACTIVE subscription, that
        can be shared with a customer.
      operationId: singlePaymentSubscription
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - subscriptionId
                - returnUrl
                - items
                - referenceId
              properties:
                subscriptionId:
                  type: string
                  format: MongoId
                  description: This is transact bridge subscription Id
                referenceId:
                  type: string
                  format: referenceId
                  description: >-
                    This is a partner-generated ID to map a subscription.
                    Partners can use this to query the subscriptions as well.
                    This cannot be the same for two subscriptions.
                returnUrl:
                  type: string
                  description: >-
                    This URL is needed to redirect the user after the session is
                    completed.
                  example: https://example.com/payment/success
                mandatePay:
                  type: boolean
                  default: false
                  description: >-
                    If marked as **`true`** then the invoice will be paid
                    through the current mandate.
                  example: false
                payMethod:
                  type: array
                  description: >-
                    If payMethod parameter is sent by the partner then on the
                    payment page for the customer only that payment method will
                    be visible to user.
                  items:
                    type: string
                    enum:
                      - UPI
                      - NB
                      - CC
                      - DC
                  example:
                    - UPI
                    - CC
                dayUntillDue:
                  type: string
                  description: >-
                    Period of time from the issue date after which **`DUE`**
                    invoice is converted into **`OVERDUE`** status
                  example: '7'
                reAttempt:
                  type: array
                  description: >-
                    To configure how the reattempt for failed invoices be
                    processed.
                  items:
                    type: object
                items:
                  type: array
                  description: Items the customer wants to buy.
                  items:
                    type: object
                    required:
                      - productReferenceId
                      - name
                      - quantity
                      - amount
                    properties:
                      productReferenceId:
                        type: string
                        format: referenceId
                        description: >-
                          If the product is already created use the refereneId
                          of that product.
                      name:
                        type: string
                        description: >-
                          Name of the product the customer wants to buy. Name is
                          not mandatory if productReferenceId is passed.
                      quantity:
                        type: number
                        description: Number of products the customer wants to buy.
                      amount:
                        type: number
                        description: Price of the product.
                      description:
                        type: string
                        description: >-
                          Description of the product.

                          Description in the items object allows HTML syntax for
                          customer view. Use so that the description on the
                          product page is better from a UI perspective. We break
                          and show the description like unlisted items.
      responses:
        '200':
          description: Contains the subscriptionId and URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/singlePaymentSubscription'
components:
  schemas:
    singlePaymentSubscription:
      type: object
      properties:
        status:
          type: string
          description: The response from the API
        sub_status:
          type: string
          description: Used for internal purposes only
        data:
          type: object
          description: Contains the subscriptionId and URL.
          properties:
            subscriptionId:
              type: string
              description: Transact Bridge subscription Id
            url:
              type: string
              description: URL to redirect the user after the session is completed.
  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.