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

# Create Subscription Order

> Create subscription order

## Overview

This page documents the `POST /open/v1/order/create` 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 standard merchant endpoint.
* 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/subscription/orderCreate-openapi.json POST /open/v1/order/create
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/v1/order/create:
    post:
      summary: Create Subscription Order
      description: Create subscription order
      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: Create subscription order request parameters
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubscriptionOrderRequest'
            examples:
              basicExample:
                summary: Basic Example
                value:
                  merchantSubscriptionOrderNo: test01
                  planNo: '2033844612305932300'
                  callbackUrl: https://gate.com
        required: true
      responses:
        '200':
          description: Create subscription order successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSubscriptionPlanResponse'
              examples:
                successResponse:
                  summary: Success Response
                  value:
                    code: '0'
                    message: ''
                    data:
                      merchantSubscriptionOrderNo: test01
                      subscriptionOrderNo: '82971423789155022'
                      subscriptionLink: >-
                        https://119.28.35.132:13555/zh/web3-subscribe?subscriptionOrderNo=82971423789155022
                    success: true
components:
  parameters:
    X-GatePay-Certificate-ClientId:
      name: X-GatePay-Certificate-ClientId
      in: header
      required: true
      description: Merchant client ID, obtained from GatePay platform application
      schema:
        type: string
        example: 4186d0c6-6a35-55a9-8dc6-5312769dbff8
    X-GatePay-Signature:
      name: X-GatePay-Signature
      in: header
      required: true
      description: HMAC-SHA256 signature, used to verify request legitimacy
      schema:
        type: string
        example: >-
          672d5650dcc9bb22ebf25fa16c28d03c0e159d742a9176d4340a5da326d75dc8a2ec24c97fa6fc5d1533dd6e968863747e1d86a45e562cbe899f9ed7e9ca7f77
    X-GatePay-Timestamp:
      name: X-GatePay-Timestamp
      in: header
      required: true
      description: >-
        Timestamp (milliseconds), time difference with server cannot exceed 5
        minutes
      schema:
        type: string
        example: '1672905655498'
    X-GatePay-Nonce:
      name: X-GatePay-Nonce
      in: header
      required: true
      description: Random number, used to prevent replay attacks
      schema:
        type: string
        example: '9578'
  schemas:
    CreateSubscriptionOrderRequest:
      type: object
      required:
        - merchantSubscriptionOrderNo
      properties:
        merchantSubscriptionOrderNo:
          type: string
          description: >-
            Merchant subscription order number, globally unique identifier for
            merchant
          example: MSUB_20240312_001
        merchantPlanNo:
          type: string
          description: Merchant subscription plan number (choose one with planNo)
          example: MPLAN_20240101_001
        planNo:
          type: string
          description: Platform subscription plan number (choose one with merchantPlanNo)
          example: PLAN_ABC123
        callbackUrl:
          type: string
          description: >-
            Page URL to redirect after successful subscription, length not
            exceeding 128 bytes
          maxLength: 128
          example: https://www.example.com/subscription/success
      oneOf:
        - required:
            - merchantPlanNo
        - required:
            - planNo
    CreateSubscriptionPlanResponse:
      type: object
      properties:
        code:
          type: string
          description: Response code, 0 indicates success
          example: '0'
        message:
          type: string
          description: Response description, empty when successful
          example: ''
        success:
          type: boolean
          description: Whether the request was successful
          example: true
        data:
          type: object
          description: Response data
          properties:
            merchantSubscriptionOrderNo:
              type: string
              description: Merchant subscription order number
              example: MSUB_20240312_001
            subscriptionOrderNo:
              type: string
              description: Platform subscription order number
              example: SUB_ABC123456
            subscriptionLink:
              type: string
              description: >-
                Subscription page link, used for users to initiate subscription
                authorization
              example: https://pay.example.com/subscription/authorize?token=xxxxxx

````