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

# Create Customer Subscription

> Create a customer subscription for a customer.



## OpenAPI

````yaml swagger-001.json POST /v1/customers/{Customer}/subscriptions
openapi: 3.0.4
info:
  title: Ecrypt API
  description: Ecrypt API
  termsOfService: https://ecrypt.com
  contact:
    name: Dev Support
    url: https://developer.ecrypt.com
    email: devsupport@ecrypt.com
  version: v1
servers:
  - url: https://api.ecrypt.com
    description: Live
security:
  - x-api-key: []
paths:
  /v1/customers/{Customer}/subscriptions:
    post:
      tags:
        - Customers Subscription
      summary: Create Customer Subscription
      description: Create a customer subscription for a customer.
      parameters:
        - name: Customer
          in: path
          description: "`Customer` is the Ecrypt customer identifier.\r\n\r\nExample: 00000000-0000-0000-0000-000000000000"
          required: true
          schema:
            maxLength: 64
            minLength: 8
            pattern: ^[0-9A-Za-z-]*$
            type: string
            default: 00000000-0000-0000-0000-000000000000
          example: 00000000-0000-0000-0000-000000000000
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/Ecrypt.Gateway.Api.Core.Model.Customers.CustomerSubscriptionCreateRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/Ecrypt.Gateway.Api.Core.Model.Customers.CustomerSubscriptionCreateRequest
          application/*+json:
            schema:
              $ref: >-
                #/components/schemas/Ecrypt.Gateway.Api.Core.Model.Customers.CustomerSubscriptionCreateRequest
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Ecrypt.Gateway.Api.Core.Model.Customers.CustomerSubscriptionCreateResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ecrypt.Gateway.Api.Core.Model.BadRequest'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '429':
          description: Too Many Requests
components:
  schemas:
    Ecrypt.Gateway.Api.Core.Model.Customers.CustomerSubscriptionCreateRequest:
      required:
        - payment
      type: object
      properties:
        id:
          type: string
          nullable: true
          readOnly: true
        subscriptionId:
          type: string
        start:
          type: string
          format: date-time
          nullable: true
        skipFirstPayment:
          type: boolean
        payment:
          $ref: '#/components/schemas/Ecrypt.Gateway.Api.Core.Model.Customers.Payment'
      additionalProperties: false
      nullable: true
    Ecrypt.Gateway.Api.Core.Model.Customers.CustomerSubscriptionCreateResponse:
      required:
        - requestId
      type: object
      properties:
        customerSubscription:
          $ref: >-
            #/components/schemas/Ecrypt.Gateway.Api.Core.Model.Customers.CustomerSubscriptionCreateRequest
        requestId:
          maxLength: 100
          minLength: 1
          type: string
          default: '000000000000000000000'
        errors:
          type: array
          items:
            $ref: >-
              #/components/schemas/Ecrypt.Gateway.Api.Core.Model.ResponseBaseError
          nullable: true
      additionalProperties: false
      nullable: true
    Ecrypt.Gateway.Api.Core.Model.BadRequest:
      required:
        - requestId
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Ecrypt.Gateway.Api.Core.Model.BadRequestError'
          nullable: true
        requestId:
          maxLength: 100
          minLength: 1
          type: string
          default: '000000000000000000000'
      additionalProperties: false
      nullable: true
    Ecrypt.Gateway.Api.Core.Model.Customers.Payment:
      required:
        - stored
      type: object
      properties:
        stored:
          $ref: '#/components/schemas/Ecrypt.Gateway.Api.Core.Model.Customers.Stored'
      additionalProperties: false
      nullable: true
    Ecrypt.Gateway.Api.Core.Model.ResponseBaseError:
      type: object
      properties:
        type:
          type: string
        message: {}
      additionalProperties: false
      nullable: true
    Ecrypt.Gateway.Api.Core.Model.BadRequestError:
      type: object
      properties:
        type:
          type: string
        message: {}
      additionalProperties: false
      nullable: true
    Ecrypt.Gateway.Api.Core.Model.Customers.Stored:
      required:
        - wallet
      type: object
      properties:
        wallet:
          minLength: 1
          type: string
        initiatedBy:
          type: string
          nullable: true
      additionalProperties: false
      nullable: true
  securitySchemes:
    x-api-key:
      type: apiKey
      description: Authorization by x-api-key inside request's header
      name: x-api-key
      in: header

````