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

# Create Card Subscription

> Create a new card-based subscription order with standing instructions (SI).



## OpenAPI

````yaml POST /pg/subscriptions/card/
openapi: 3.0.0
info:
  title: Eximpe Payment Gateway API
  description: >-
    API for payment processing and order management through Eximpe payment
    gateway. This specification includes v1, v2, and v3 API versions.
  license:
    name: Proprietary
  version: 2.0.0
servers:
  - url: https://api-pacb-uat.eximpe.com
    description: Payment Gateway Sandbox URL
security:
  - clientAuth: []
    clientSecretAuth: []
    apiVersionHeader: []
tags:
  - name: Card Tokens
  - name: Merchants
  - name: Orders
  - name: Payment Links
  - name: Payments
  - name: Refunds
  - name: Settlements
  - name: Subscriptions
paths:
  /pg/subscriptions/card/:
    post:
      tags:
        - Subscriptions
      summary: Create Card Subscription
      description: >-
        Create a new card-based subscription order with standing instructions
        (SI).
      operationId: v1_post_pg_subscriptions_card_
      requestBody:
        description: >-
          Card subscription creation request. Accepts the same fields as Create
          Order (S2S Card) plus a standing_instruction block.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/v1_CreateSubscriptionRequest'
            example:
              amount: '1000.00'
              collection_mode: s2s
              currency: INR
              reference_id: SUBCARD001
              buyer:
                name: John Doe
                email: john.doe@example.com
                phone: '+919876543210'
                address:
                  line_1: 123 Main Street
                  line_2: Apt 4B
                  city: Mumbai
                  state: Maharashtra
                  postal_code: '400001'
                ip_address: 192.168.1.100
                user_agent: >-
                  Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
                  (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36
              product:
                name: Monthly Subscription Plan
                description: Monthly subscription for premium services
                hs_code: '98051000'
                hs_code_description: Subscription services
                type_of_goods: service
              invoice:
                number: INVCARD001
                date: '2025-12-15'
              standing_instruction:
                billing_amount: '1000.00'
                billing_currency: INR
                billing_cycle: MONTHLY
                billing_interval: 1
                payment_start_date: '2026-01-15'
                payment_end_date: '2027-01-15'
                billing_date: 1
                billing_limit: AFTER
                billing_rule: MAX
                remarks: Monthly subscription for premium services
              mop_type: credit_card
              card_details:
                number: '4111111111111111'
                cardholder_name: John Doe
                expiry_month: 12
                expiry_year: 2027
                cvv: '123'
                network: VISA
                nickname: My Credit Card
      responses:
        '201':
          description: Card Subscription created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1_CreateSubscriptionResponse'
              example:
                success: true
                message: Card Subscription created successfully
                data:
                  order_id: 550e8400-e29b-41d4-a716-446655440000
                  subscription_type: CARD_RECURRING
                  subscription_id: 660e8400-e29b-41d4-a716-446655440001
                  acstemplate: <html>...</html>
                  subscription:
                    billing_cycle: MONTHLY
                    billing_interval: 1
                    payment_start_date: '2024-01-01'
                    payment_end_date: '2024-12-31'
                    status: PENDING
        '400':
          description: Validation / business errors
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1_ErrorResponse'
        '500':
          description: Internal / configuration error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1_ErrorResponse'
              example:
                success: false
                error:
                  code: ERR_SERVICE_ERROR_000
                  message: Payment gateway error
                  details:
                    error: An unexpected error occurred. Please try again later
        '503':
          description: PayU upstream failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1_ErrorResponse'
      security:
        - clientAuth: []
          clientSecretAuth: []
          merchantAuth: []
          apiVersionHeader: []
components:
  schemas:
    v1_CreateSubscriptionRequest:
      allOf:
        - $ref: '#/components/schemas/v1_CreateOrderRequest'
        - type: object
          properties:
            collection_mode:
              type: string
              description: Payment collection mode (must be 's2s' for subscriptions)
              enum:
                - s2s
            mop_type:
              type: string
              description: Method of payment
              enum:
                - CREDIT_CARD
                - DEBIT_CARD
            standing_instruction:
              $ref: '#/components/schemas/v1_StandingInstruction'
    v1_CreateSubscriptionResponse:
      type: object
      required:
        - success
        - message
        - data
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          type: object
          properties:
            order_id:
              type: string
            subscription_type:
              type: string
            intent_uri:
              type: string
            acstemplate:
              type: string
            subscription_id:
              type: string
            subscription:
              $ref: '#/components/schemas/v1_StandingInstruction'
    v1_ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          enum:
            - false
          description: >-
            Indicates if the request was successful. Always false for error
            responses.
        error:
          $ref: '#/components/schemas/v1_ErrorDetails'
    v1_CreateOrderRequest:
      type: object
      required:
        - amount
        - currency
        - reference_id
        - buyer
        - product
      properties:
        amount:
          type: string
          description: Amount in decimal format (e.g., "100.00")
          pattern: ^\d+\.\d{2}$
        currency:
          type: string
          description: 3-letter ISO currency code (e.g., INR, USD)
          pattern: ^[A-Z]{3}$
        reference_id:
          type: string
          description: Unique identifier for the order
        return_url:
          type: string
          format: uri
          description: URL to redirect after payment
        collection_mode:
          type: string
          description: Payment collection mode
          enum:
            - hosted_payment
            - s2s
        mop_type:
          type: string
          description: Method of payment type (e.g., UPI)
          enum:
            - upi
            - credit_card
            - net_banking
            - debit_card
            - qr
        upi_flow_type:
          type: string
          description: >-
            UPI flow type (required when collection_mode is s2s and mop_type is
            UPI)
          enum:
            - intent
            - collection
        buyer:
          $ref: '#/components/schemas/v1_Buyer'
        product:
          $ref: '#/components/schemas/v1_Product'
        invoice:
          $ref: '#/components/schemas/v1_Invoice'
        card_details:
          $ref: '#/components/schemas/v1_CardDetails'
    v1_StandingInstruction:
      type: object
      description: Standing instruction configuration for a subscription
      properties:
        billing_amount:
          type: string
          description: Billing amount per cycle
        billing_currency:
          type: string
          description: Currency for billing amount (provide the ISO code)
        billing_cycle:
          type: string
          description: Billing cycle
          enum:
            - ONCE
            - ADHOC
            - DAILY
            - WEEKLY
            - MONTHLY
            - YEARLY
        billing_interval:
          type: integer
          description: >-
            Number of billing cycle units between each recurring payment. For
            example, if billing_cycle is MONTHLY and billing_interval is 2,
            payments recur every 2 months. If billing_cycle is DAILY and
            billing_interval is 7, payments recur every 7 days. If billing_cycle
            is YEARLY and billing_interval is 1, payments recur every year.
        payment_start_date:
          type: string
          format: date
          description: Subscription start date (YYYY-MM-DD)
        payment_end_date:
          type: string
          format: date
          description: Subscription end date (YYYY-MM-DD)
        billing_date:
          type: integer
          description: Day of month for billing
        billing_limit:
          type: string
          description: Billing limit rule (e.g. BEFORE, AFTER)
        billing_rule:
          type: string
          description: Billing rule (e.g. MAX)
        remarks:
          type: string
          description: Subscription remarks
        status:
          type: string
          description: Subscription status
    v1_ErrorDetails:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Error code (e.g., ERR_ORDER_002)
        message:
          type: string
          description: Error message
        details:
          type: object
          description: Detailed validation error information with field-specific errors
          additionalProperties:
            type: string
            description: Error message for the specific field
    v1_Buyer:
      type: object
      required:
        - name
        - address
        - email
        - phone
      properties:
        name:
          type: string
          description: Buyer's full name
        email:
          type: string
          format: email
          description: Buyer's email address
        phone:
          type: string
          description: Buyer's phone number with country code
          pattern: ^\+[1-9]\d{1,14}$
        address:
          $ref: '#/components/schemas/v1_Address'
        ip_address:
          type: string
          description: Buyer's IP address (required for card payments)
        user_agent:
          type: string
          description: Buyer's browser user agent (required for card payments)
    v1_Product:
      type: object
      required:
        - name
        - type_of_goods
      properties:
        name:
          type: string
          description: Product name
        description:
          type: string
          description: Product description
        hs_code:
          type: string
          description: Harmonized System code, required for physical goods
        hs_code_description:
          type: string
          description: Description of the HS code
        type_of_goods:
          type: string
          description: Type of goods (e.g., physical_goods)
          enum:
            - physical_goods
            - digital_goods
            - service
    v1_Invoice:
      type: object
      properties:
        number:
          type: string
          description: Invoice number
        date:
          type: string
          format: date
          description: Invoice date in YYYY-MM-DD format
    v1_CardDetails:
      type: object
      required:
        - number
        - cardholder_name
        - expiry_month
        - expiry_year
        - cvv
        - network
        - identifier
      properties:
        nickname:
          type: string
          description: Card nickname for easy identification
        number:
          type: string
          description: Card number (will be tokenized for security)
          pattern: ^[0-9]{13,19}$
        cardholder_name:
          type: string
          description: Name on the card
        expiry_month:
          type: string
          description: Card expiry month (MM format)
          pattern: ^(0[1-9]|1[0-2])$
        expiry_year:
          type: string
          description: Card expiry year (YYYY format)
          pattern: ^[0-9]{4}$
        cvv:
          type: string
          description: Card verification value
          pattern: ^[0-9]{3,4}$
        network:
          type: string
          description: Card network (e.g., visa, mastercard)
          enum:
            - visa
            - mastercard
            - amex
            - discover
            - rupay
        identifier:
          type: string
          description: Unique identifier for the card
    v1_Address:
      type: object
      required:
        - line_1
        - city
        - state
        - postal_code
      properties:
        line_1:
          type: string
          description: Address line 1
        line_2:
          type: string
          description: Address line 2
        city:
          type: string
          description: City name
        state:
          type: string
          description: State name
        postal_code:
          type: string
          description: Postal/ZIP code
  securitySchemes:
    clientAuth:
      type: apiKey
      name: X-Client-ID
      in: header
      description: >-
        **Client Application ID** - Your unique application identifier used to
        authenticate API requests. You can find your Client ID in the Developer
        Settings section of the merchant dashboard.
      x-displayName: Client ID
      x-example: your-client-id
    clientSecretAuth:
      type: apiKey
      name: X-Client-Secret
      in: header
      description: >-
        **Client Secret Key** - Your secret key used alongside the Client ID for
        secure authentication. Keep this confidential and never expose it in
        client-side code. Available in the Developer Settings section of the
        merchant dashboard.
      x-displayName: Client Secret
      x-example: your-client-secret
    apiVersionHeader:
      type: apiKey
      name: X-API-Version
      in: header
      description: >-
        **API Version** - Specifies which version of the API to use (e.g.,
        '1.X.X', '2.X.X', or '3.X.X'). This header allows you to control which
        API version your integration uses. Default version information is
        available in the Developer Settings.
      x-displayName: API Version
      x-example: 3.0.0
    merchantAuth:
      type: apiKey
      name: X-Merchant-ID
      in: header
      description: >-
        **Merchant Identifier** - The unique ID for the merchant account. This
        is required for PSP (Payment Service Provider) merchants who manage
        multiple merchant accounts. You can find merchant IDs in the Merchant
        Management section of the dashboard.
      x-displayName: Merchant ID
      x-example: your-merchant-id

````