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

# Initiate Subscription Deduction

> Merchant-initiated deduction against a subscription order. Provide either `subscriptionOrderNo` or `merchantSubscriptionOrderNo`. `merchantDeductNo` must be unique per merchant for idempotency.

## Overview

This page documents the `POST /open/institution/v1/order/deduct` endpoint. The full schema, parameters, and examples are rendered from the linked OpenAPI definition above.

## Notes

* Authentication uses the standard GatePay signed headers.
* This page documents the institution Open Platform path.
* For shared signing rules, see [/api-reference/version/100/en/common/securityAndSignature](/api-reference/version/100/en/common/securityAndSignature).


## OpenAPI

````yaml /api-reference/version/100/en/openapi/institution/subscription/orderDeduct-openapi.json POST /open/institution/v1/order/deduct
openapi: 3.1.0
info:
  title: GatePay API
  description: GatePay Payment Platform API Documentation
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://openplatform.gateapi.io/pay-subscription
security: []
paths:
  /open/institution/v1/order/deduct:
    post:
      summary: Initiate subscription deduction
      description: >-
        Merchant-initiated deduction against a subscription order. Provide
        either `subscriptionOrderNo` or `merchantSubscriptionOrderNo`.
        `merchantDeductNo` must be unique per merchant for idempotency.
      parameters:
        - $ref: '#/components/parameters/X-GatePay-Certificate-ClientId'
        - $ref: '#/components/parameters/X-GatePay-Signature'
        - $ref: '#/components/parameters/X-GatePay-Timestamp'
        - $ref: '#/components/parameters/X-GatePay-Nonce'
      requestBody:
        description: Deduction request body
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MerchantDeductRequest'
            examples:
              basicExample:
                summary: Basic example
                value:
                  subscriptionOrderNo: '70778338049917032'
                  merchantDeductNo: DEDUCT_20260420_001
                  amount: 10.5
                  currency: USDT
                  description: Periodic deduction
        required: true
      responses:
        '200':
          description: Request accepted (see `data.status` for deduction outcome)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderDeductApiResponse'
              examples:
                successResponse:
                  summary: Success response
                  value:
                    code: '0'
                    message: ''
                    data:
                      deductOrderNo: '70778338049917033'
                      merchantDeductNo: DEDUCT_20260420_001
                      status: SUCCESS
                      amount: '10.50000000'
                      currency: USDT
                      totalDeducted: '10.50000000'
                      remainingAmount: '89.50000000'
                      deductTime: 1773989575000
                    success: true
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      description: Merchant client ID issued by GatePay
      schema:
        type: string
        example: 4186d0c6-6a35-55a9-8dc6-5312769dbff8
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: HMAC-SHA256 signature for request integrity
      schema:
        type: string
        example: >-
          672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8a2ec24c97fa6fc5d1533dd6e968863747e1d86a45e562cbe899f9ed7e9ca7f77
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: Timestamp in milliseconds; must be within 5 minutes of server time
      schema:
        type: string
        example: '1672905655498'
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: Random nonce to prevent replay
      schema:
        type: string
        example: '9578'
  schemas:
    MerchantDeductRequest:
      type: object
      required:
        - merchantDeductNo
        - amount
        - currency
      properties:
        subscriptionOrderNo:
          type: string
          description: >-
            Platform subscription order number (provide either this or
            `merchantSubscriptionOrderNo`)
        merchantSubscriptionOrderNo:
          type: string
          description: >-
            Merchant subscription order number (provide either this or
            `subscriptionOrderNo`)
        merchantDeductNo:
          type: string
          description: >-
            Merchant deduction reference, globally unique per merchant for
            idempotency
        amount:
          type: number
          description: >-
            Deduction amount; must be greater than 0 and align with the
            subscription order
        currency:
          type: string
          description: Currency; must match the subscription order
        description:
          type: string
          maxLength: 100
          description: Description shown to the user, up to 100 characters
    OrderDeductApiResponse:
      type: object
      properties:
        code:
          type: string
          description: Response code; 0 means success
          example: '0'
        message:
          type: string
          description: Response message; empty when successful
          example: ''
        success:
          type: boolean
          description: Whether the API call succeeded
          example: true
        data:
          $ref: '#/components/schemas/MerchantDeductResult'
    MerchantDeductResult:
      type: object
      description: Deduction result payload
      properties:
        deductOrderNo:
          type: string
          description: Platform deduction order number
        merchantDeductNo:
          type: string
          description: Merchant deduction reference
        status:
          type: string
          description: 'Deduction status: `SUCCESS`, `PROCESSING`, or `FAILED`'
        amount:
          type: string
          description: Amount deducted in this request
        currency:
          type: string
          description: Currency
        totalDeducted:
          type: string
          description: Cumulative deducted amount including this attempt
        remainingAmount:
          type: string
          description: Remaining deductible amount; may be omitted when there is no cap
        deductTime:
          type: integer
          format: int64
          description: Deduction time (Unix epoch milliseconds)

````