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

# Create a scheduled payment

> Create a scheduled payment.



## OpenAPI

````yaml openapi/nexus/v1.yaml POST /scheduled_payments
openapi: 3.0.0
info:
  contact:
    name: Nexus API
    url: https://www.mx.com
  version: 1.0.0
  title: Nexus API
  description: >-
    Legacy clients can use Nexus API for all their connectivity needs. If you
    are a new client refer to our Platform API. Review our [Nexus API
    Guides](/nexus) for more information.
servers:
  - url: https://int-data.moneydesktop.com/
  - url: https://data.moneydesktop.com/
security:
  - sessionToken: []
tags:
  - name: accounts
  - name: beats
  - name: budgets
  - name: categories
  - name: extended transaction history
  - name: goals
  - name: holdings
  - name: identity
  - name: insights
  - name: institutions
  - name: jobs
  - name: member credentials
  - name: members
  - name: merchants
  - name: microdeposits
  - name: monthly cash flow profile
  - name: notifications
  - name: scheduled payments
  - name: sessions
  - name: spending plan
  - name: taggings
  - name: tags
  - name: transaction rules
  - name: transactions
  - name: user
  - name: verification
paths:
  /scheduled_payments:
    post:
      tags:
        - scheduled payments
      summary: Create a scheduled payment
      description: Create a scheduled payment.
      operationId: createScheduledPayment
      requestBody:
        required: true
        content:
          application/vnd.mx.nexus.v1+json:
            schema:
              $ref: '#/components/schemas/ScheduledPaymentRequestBody'
      responses:
        '200':
          description: OK
          content:
            application/vnd.mx.nexus.v1+json:
              schema:
                $ref: '#/components/schemas/ScheduledPaymentResponseBody'
components:
  schemas:
    ScheduledPaymentRequestBody:
      properties:
        scheduled_payment:
          $ref: '#/components/schemas/ScheduledPaymentRequest'
      type: object
    ScheduledPaymentResponseBody:
      properties:
        scheduled_payment:
          $ref: '#/components/schemas/ScheduledPaymentResponse'
      type: object
    ScheduledPaymentRequest:
      properties:
        amount:
          type: integer
          description: The amount of the scheduled_payment.
          example: 10.97
        description:
          description: >-
            A human-readable description of the scheduled_payment, e.g., Power
            bill.
          type: string
          example: Power bill
        is_completed:
          description: >-
            Indicates whether the scheduled_payment has been paid or not. This
            field is only applicable to one-time transactions.
          type: boolean
          example: false
        is_recurring:
          description: Indicates whether the scheduled_payment is expected to repeat.
          type: boolean
          example: true
        merchant_guid:
          description: >-
            The unique identifier for the merchant identified in the
            scheduled_payment.
          type: string
          example: MCH-5005cd15-c3e5-0e69-ec98-c95147860a45
        occurs_on:
          description: >-
            The date on which the payment is scheduled to occur, given in ISO
            8601 format without a timestamp.
          type: string
          example: '2018-12-13T00:00:00.000Z'
        recurrence_day:
          description: The day of the month where the next payment is expected to occur.
          type: integer
          example: 3
        recurrence_type:
          description: >-
            The repeatable pattern for the scheduled_payment, given as an
            integer.
          type: integer
          example: 3
        transaction_type:
          description: >-
            Indicates whether the transaction is a credit or a debit. 1 =
            CREDIT, 2 = DEBIT.
          type: number
          example: 2
        transaction_type_name:
          description: >-
            Indicates whether the transaction is a credit or a debit. 1 =
            CREDIT, 2 = DEBIT.
          type: string
          example: DEBIT
      required:
        - amount
        - description
        - is_recurring
        - occurs_on
    ScheduledPaymentResponse:
      properties:
        amount:
          type: integer
          description: The amount of the scheduled_payment.
          example: 10.97
        created_at:
          description: >-
            Date and time the scheduled_payment was created, represented in ISO
            8601 format with timestamp (e.g., 2015-04-13T12:01:23-00:00).
          type: string
          example: '2015-04-13T12:01:23-00:00'
        description:
          description: >-
            A human-readable description of the scheduled_payment, e.g., Power
            bill.
          type: string
          example: Power bill
        guid:
          description: >-
            The unique identifier for the scheduled_payment, such as a recurring
            utility bill or streaming subscription. Defined by MX.
          type: string
          example: SCH-e386a323-e452-47f2-b2fd-1ac3c18533de
        is_completed:
          description: >-
            Indicates whether the scheduled_payment has been paid or not. This
            field is only applicable to one-time transactions.
          type: boolean
          example: false
        is_recurring:
          description: Indicates whether the scheduled_payment is expected to repeat.
          type: boolean
          example: true
        merchant_guid:
          description: >-
            The unique identifier for the merchant identified in the
            scheduled_payment.
          type: string
          example: MCH-5005cd15-c3e5-0e69-ec98-c95147860a45
        occurs_on:
          description: >-
            The date on which the payment is scheduled to occur, given in ISO
            8601 format without a timestamp.
          type: string
          example: '2018-12-13T00:00:00.000Z'
        recurrence_day:
          description: The day of the month where the next payment is expected to occur.
          type: integer
          example: 3
        recurrence_type:
          description: >-
            The repeatable pattern for the scheduled_payment, given as an
            integer.
          type: integer
          example: 3
        recurrence_type_name:
          description: The repeatable pattern for the scheduled_payment, given as a string.
          type: string
          example: EVERY_MONTH
        transaction_type:
          description: >-
            Indicates whether the transaction is a credit or a debit. 1 =
            CREDIT, 2 = DEBIT.
          type: integer
          example: 2
        transaction_type_name:
          description: >-
            Indicates whether the transaction is a credit or a debit. 1 =
            CREDIT, 2 = DEBIT.
          type: string
          example: DEBIT
        updated_at:
          description: >-
            Date and time the scheduled_payment was last updated, represented in
            ISO 8601 format with timestamp (e.g. 2015-04-13T12:01:23-00:00).
          type: string
          example: '2015-04-13T12:01:23.000Z'
        user_guid:
          description: >-
            The unique identifier for the user associated with a
            scheduled_payment. Scheduled payments are attached to the user_guid,
            not individual accounts held by the user. Defined by MX.
          type: string
          example: USR-11141024-90b3-1bce-cac9-c06ced52ab4c
  securitySchemes:
    sessionToken:
      description: >
        ### MX Session Token 

        - Request an API token using the read API token endpoint in the MX SSO
        API.

        - Exchange an API token for a session token. 
          - A session token is obtained by sending a POST request to /sessions
          - The session token will be used in each request made for the user. It should be passed in an `MD-SESSION-TOKEN` HTTP header as shown below.
          - This session token is valid for 30 minutes from the time it was created. The 30 minute expiration counter is refreshed with each call.
          - If you send a request with an expired session token you'll receive an error code of `4011`.

        ```

        curl -i https://int-data.moneydesktop.com/accounts \

        -H 'MD-SESSION-TOKEN:
        CWforZl1Vn2vC_v6H4rnQRT1DoWpDouJAV-_5TBmiQRAtA8rsOG_BoajTiOSsL0A3bd-bmHXlA-eQzc9ywItKg'
        \

        -H 'Content-Type: application/vnd.mx.nexus.v1+json' \

        -H 'Accept: application/vnd.mx.nexus.v1+json'

        ```


        In documentation code examples, replace `<API_KEY_VALUE>` with the
        session token.
      type: apiKey
      name: MD-SESSION-TOKEN
      in: header

````