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

# Update account closure

> Update an account closure.




## OpenAPI

````yaml openapi.json patch /accounts/{account_id}/initiate_closure
openapi: 3.0.3
info:
  description: >-
    This is the official reference documentation for Synctera APIs. If you need
    something specific or have a question, <a class='text-blue-600'
    href='https://synctera.com/contact-us' target='_blank'
    rel='noreferrer'>contact us</a>.</p>
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  title: Synctera API
  version: 0.213.0
servers:
  - description: Sandbox (no real world financial impact)
    url: https://api-sandbox.synctera.com/v0
  - description: Production
    url: https://api.synctera.com/v0
security:
  - bearerAuth: []
tags:
  - description: Lookup merchant information
    name: Merchants
  - description: Requests to generate simulated webhooks
    name: Card Webhook Simulations
  - description: >-
      Account programs define configurations for payment rails and transaction
      capabilities across different account types.
    name: Account Programs
  - description: Simulate receiving ACH transactions and returns
    name: ACH Transaction Simulations
  - description: Requests for risk evaluation and decisioning
    name: Risk Evaluations
  - description: Requests to link and manage External Cards
    name: External Cards
  - description: |
      The disclosures resource is used to track the status of disclosures and
      ensure that all parties have been shown the necessary disclosures to meet
      regulatory obligations.
    name: Disclosures
  - description: Create and manage Cash Order and Cash Deposit transfers
    name: Cash Orders and Deposits (alpha)
  - description: Requests to initiate customer verification.
    name: KYC Verification (deprecated)
  - description: Request to create and manage users
    name: Users
  - description: See balance history
    name: BalanceHistory
  - description: >-
      Migration mappings associate resources from an old tenant identity with a
      new tenant identity.
    name: Migration Mappings
  - description: |
      The External Account resource is used for managing links to accounts
      that operate outside of the Synctera ecosystem.
    name: External Accounts
  - description: Requests to create and manage account products, including fees, interest.
    name: Account Products
  - description: Requests to create and manage webhooks
    name: Webhooks
  - description: Create and manage documents.
    name: Documents
  - description: >-
      Create and manage same currency and multi-currency international wire
      transfers
    name: International Wires (alpha)
  - description: Requests for transaction risk detection
    name: Transaction risk
  - description: >-
      Used to configure bank accounts for which synctera accounts are considered
      a "subledger" to
    name: Bank Account
  - description: Request to create and manage party groups and party group members
    name: Party Groups
  - description: Requests to manage addresses
    name: Addresses
  - description: Requests to manage monitoring subscriptions and alerts for customers.
    name: Monitoring
  - description: Requests to search and manage compliance searches
    name: Compliance Searches
  - description: Requests to create and manage customers
    name: Customers
  - description: |
      The internal account resource is used for managing links to internal
      accounts where the funds are managed by integrators.
    name: Internal Accounts
  - description: Create and manage spending controls
    name: Spend Controls
  - description: Retrieve user identity information
    name: Identity
  - description: Requests to manage banks
    name: Banks
  - description: |
      The Disclosures resource is used to track the status of disclosures and
      ensure that customers have been shown the necessary disclosures to meet
      regulatory obligations.
    name: Disclosures (deprecated)
  - description: Create and manage wire transfers
    name: Wires
  - description: Requests to issue and manage Cards
    name: Cards
  - description: Request to create and manage edd
    name: Trust
  - description: Request to enroll, renew, or cancel watchlist monitors
    name: Watchlist (deprecated)
  - description: Endpoints for modifying or fetching posting dates
    name: Posting Dates
  - description: Transaction lines API
    name: transactions
  - description: Request to create and manage accounts
    name: Accounts
  - description: Requests to create and manage notes
    name: Notes
  - description: Account Template
    name: Account Templates
  - description: API for effective balances
    name: effective_balances
  - description: Requests to create and manage personal ID configurations
    name: Personal ID Configuration
  - description: >
      A natural person (individual human) that is relevant to the Synctera
      platform in some way: e.g. a personal customer or a director/officer/owner
      of a business.
    name: Persons
  - description: >
      Represents the relationships between parties. A relationship can exist
      between personal customers, business customers, or non-customer
      persons/organizations.
    name: Relationships
  - description: >
      A legal entity (corporation, partnership, etc.) that is relevant to the
      Synctera platform in some way: a business customer or some other
      organization that has an ownership share in such a business customer.
    name: Businesses
  - description: Request to create and manage payment_schedules
    name: Cronut
  - description: Requests to manage partners
    name: Partners
  - description: Request to create and manage deposits using remote deposit capture
    name: Remote Check Deposit
  - description: Requests to create and manage API keys
    name: API Keys
  - description: Requests to create and manage ban rules
    name: Ban Rules
  - description: Admin API for Middesk configuration using the tenants API keys.
    name: Middesk
  - description: Request to create and manage exclusions
    name: Stately
  - description: Request to create and manage partner configurations
    name: Quickstart
  - description: Manage contacts for bank and fintech partners
    name: Contacts
  - description: Create and manage transactions
    name: Transactions
  - description: Request to create and manage rdc configurations
    name: RDC Config
  - description: Create and manage holds
    name: Hold
  - description: Requests to create and manage roles
    name: Roles
  - description: Simulate receiving Wire transactions and returns
    name: Wire Transaction Simulations
  - description: Requests to create licenses
    name: Licenses
  - description: Requests to Admins to grant permissions to user
    name: Request Permissions
  - description: Configure vendor secrets for egress requests
    name: Egress Gateway Vendor Secret CRUD API
  - description: Requests to screen parties against sanctions watchlists
    name: Sanctions Screening
  - description: Create and manage payments
    name: ACH
  - description: Requests to calculate and manage CRR
    name: CRR
  - description: Requests to search financial institutions
    name: Institutions (Beta)
  - description: Create and manage tenant configurations
    name: Tenant Configs
  - description: Create and manage sweep configurations
    name: Configs
  - description: >
      Represents the compliance rules that are used to verify certain kinds of
      money movement.
    name: Compliance Rules
  - description: Configure webhook secrets for egress requests
    name: Egress Gateway Webhook Secret CRUD API
  - description: Create and manage transactions
    name: Transactions (internal)
  - description: History
    name: History
  - description: Create and manage EFT Canada transfers
    name: EFT Canada (Beta)
  - description: Requests to generate simulated transactions
    name: Card Transaction Simulations
  - description: Requests to initiate customer verification.
    name: KYC/KYB Verifications
paths:
  /accounts/{account_id}/initiate_closure:
    summary: Accounts
    patch:
      tags:
        - Accounts
      summary: Update account closure
      description: |
        Update an account closure.
      operationId: updateAccountClosure
      parameters:
        - $ref: '#/components/parameters/idempotency_key'
        - $ref: '#/components/parameters/account_id_path'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/account_closure_update_request'
        description: Account to close
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/account_generic_response'
          description: Account to close
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '422':
          $ref: '#/components/responses/unprocessable_entity'
        '500':
          $ref: '#/components/responses/internal_server_error'
components:
  parameters:
    idempotency_key:
      description: >-
        An idempotency key is an arbitrary unique value generated by client to
        detect subsequent retries of the same request. It is recommended that a
        UUID or a similar random identifier be used as an idempotency key. A
        different key must be used for each request, unless it is a retry.
      in: header
      name: Idempotency-Key
      schema:
        example: 7d943c51-e4ff-4e57-9558-08cab6b963c7
        type: string
    account_id_path:
      description: Unique identifier for the account.
      in: path
      name: account_id
      required: true
      schema:
        example: 57826c51-e4ff-4e57-9558-08cab6b963c7
        format: uuid
        type: string
  schemas:
    account_closure_update_request:
      description: >-
        Account closing details when attempting to close an account and status
        is being changed to `IN_CLOSING`.
      properties:
        destination_id:
          description: internal/external/customer account ID, depending on payment_method
          format: uuid
          nullable: true
          type: string
        payment_method:
          $ref: '#/components/schemas/account_closure_payment_method'
      type: object
    account_generic_response:
      properties:
        access_status:
          $ref: '#/components/schemas/account_access_status'
        access_status_last_updated_time:
          description: >-
            Timestamp of the last modification of the access_status. RFC3339
            format.
          format: date-time
          readOnly: true
          type: string
        account_closure:
          $ref: '#/components/schemas/account_closure_response'
        account_number:
          description: Account number
          maxLength: 50
          readOnly: true
          type: string
        account_number_masked:
          description: >-
            The response will contain the bank fintech ID (3 or 6 digits) plus
            the last 4 digits, with the digits in between replaced with *
            characters. Shadow mode account numbers will not be masked.
          example: 123*****6789
          maxLength: 50
          readOnly: true
          type: string
        account_program_id:
          format: uuid
          type: string
          x-go-type: openapi_types.UUID
        account_purpose:
          description: Purpose of the account
          example: This account for the account holder's salary deposit.
          type: string
        account_template_id:
          description: |
            The account template used to create this account (if any).
            On creation, if not specified:
                * `account_type` is *required*.
                * If there is a single account template of the correct type,
                  that account template is automatically used.
                * Otherwise, the request is an error.
          format: uuid
          type: string
        account_type:
          $ref: '#/components/schemas/account_type'
        application_id:
          description: |
            The application ID for this account.
          format: uuid
          type: string
        auto_payment_period:
          description: >
            The number of days past the billing period to initiate an auto
            payment. Only applicable for accounts with type `CHARGE_SECURED`,
            where the account holder has opted in for auto payment
            functionality. This value must be lower than or equal to the
            `grace_period` setting on the account. If this value is 0, the auto
            payment will happen on the same day as the statement is generated.
            Auto payment only occurs if regular payments are not received on
            time.
          example: 20
          maximum: 28
          minimum: 0
          type: integer
        balance_ceiling:
          $ref: '#/components/schemas/balance_ceiling'
        balance_floor:
          $ref: '#/components/schemas/balance_floor'
        balances:
          description: A list of balances for account based on different type
          items:
            $ref: '#/components/schemas/balance'
          readOnly: true
          type: array
        bank_account_id:
          description: Identifier of the bank side account that this account is a part of
          readOnly: true
          type: string
        bank_routing:
          description: Bank routing number
          maxLength: 9
          readOnly: true
          type: string
        billing_period:
          $ref: '#/components/schemas/billing_period'
        business_ids:
          description: A list of the business IDs of the account holders.
          items:
            format: uuid
            type: string
          readOnly: true
          type: array
        close_date:
          description: >-
            The account close date. This is the bank's posting date when the
            account resource's status was changed to CLOSED or CHARGED_OFF.
          format: date
          readOnly: true
          type: string
        creation_time:
          description: Account creation timestamp in RFC3339 format
          format: date-time
          readOnly: true
          type: string
        credit_limit:
          description: >
            The credit limit for this line of credit account in cents. Minimum
            is 0.
          example: 2500
          format: int64
          minimum: 0
          type: integer
        currency:
          description: >-
            Account currency or account settlement currency. ISO 4217 alphabetic
            currency code. Default USD
          example: USD
          pattern: ^[A-Z]{3}$
          type: string
        customer_ids:
          description: A list of the customer IDs of the account holders.
          items:
            format: uuid
            type: string
          readOnly: true
          type: array
        customer_type:
          $ref: '#/components/schemas/customer_type'
        days_past_due:
          description: >-
            The number of days since the account went past due on their minimum
            payments.
          type: integer
        exchange_rate_type:
          description: Exchange rate type
          example: M, INTERBANK, CUST
          maxLength: 10
          type: string
        fee_product_ids:
          description: >-
            A list of fee account products that the current account associates
            with.
          items:
            format: uuid
            type: string
          nullable: true
          type: array
        funds_ownership:
          $ref: '#/components/schemas/funds_ownership'
        general_ledger_category:
          $ref: '#/components/schemas/general_ledger_category'
        general_ledger_type:
          $ref: '#/components/schemas/general_ledger_type'
        grace_period:
          $ref: '#/components/schemas/grace_period'
        iban:
          description: International bank account number
          maxLength: 34
          type: string
        id:
          description: Account ID
          format: uuid
          readOnly: true
          type: string
        in_closing_date:
          description: >-
            The account in-closing date. This is the bank's posting date when
            the account resource's status was changed to IN_CLOSING.
          format: date
          readOnly: true
          type: string
        interest_product_id:
          description: >-
            An interest account product that the current account associates
            with.
          format: uuid
          type: string
        is_account_pool:
          description: >-
            Account is investment (variable balance) account or a multi-balance
            account pool. Default false
          type: boolean
        is_ach_credit_enabled:
          description: >-
            A flag to indicate whether ACH credits are enabled. Both
            is_ach_enabled and is_ach_credit_enabled must be true for an ACH
            credit to be allowed.
          readOnly: true
          type: boolean
        is_ach_debit_enabled:
          description: >-
            A flag to indicate whether ACH debits are enabled. Both
            is_ach_enabled and is_ach_debit_enabled must be true for an ACH
            debit to be allowed.
          readOnly: true
          type: boolean
        is_ach_enabled:
          description: A flag to indicate whether ACH transactions are enabled.
          readOnly: true
          type: boolean
        is_card_credit_enabled:
          description: >-
            A flag to indicate whether card credits are enabled. Both
            is_card_enabled and is_card_credit_enabled must be true for a card
            credit to be allowed.
          readOnly: true
          type: boolean
        is_card_debit_enabled:
          description: >-
            A flag to indicate whether card debits are enabled. Both
            is_card_enabled and is_card_debit_enabled must be true for a card
            debit to be allowed.
          readOnly: true
          type: boolean
        is_card_enabled:
          description: A flag to indicate whether card transactions are enabled.
          readOnly: true
          type: boolean
        is_cash_credit_enabled:
          description: >-
            A flag to indicate whether cash credits are enabled. Both
            is_cash_enabled and is_cash_credit_enabled must be true for a cash
            credit to be allowed.
          readOnly: true
          type: boolean
        is_cash_debit_enabled:
          description: >-
            A flag to indicate whether cash debits are enabled. Both
            is_cash_enabled and is_cash_debit_enabled must be true for a cash
            debit to be allowed.
          readOnly: true
          type: boolean
        is_cash_enabled:
          description: A flag to indicate whether cash transactions are enabled.
          readOnly: true
          type: boolean
        is_check_credit_enabled:
          description: >-
            A flag to indicate whether check credits are enabled. Both
            is_check_enabled and is_check_credit_enabled must be true for a
            check credit to be allowed.
          readOnly: true
          type: boolean
        is_check_debit_enabled:
          description: >-
            A flag to indicate whether check debits are enabled. Both
            is_check_enabled and is_check_debit_enabled must be true for a check
            debit to be allowed.
          readOnly: true
          type: boolean
        is_check_enabled:
          description: A flag to indicate whether check transactions are enabled.
          readOnly: true
          type: boolean
        is_eft_ca_credit_enabled:
          description: >-
            A flag to indicate whether EFT Canada credits are enabled. Both
            is_eft_ca_enabled and is_eft_ca_credit_enabled must be true for an
            EFT Canada credit to be allowed.
          readOnly: true
          type: boolean
        is_eft_ca_debit_enabled:
          description: >-
            A flag to indicate whether EFT Canada debits are enabled. Both
            is_eft_ca_enabled and is_eft_ca_debit_enabled must be true for an
            EFT Canada debit to be allowed.
          readOnly: true
          type: boolean
        is_eft_ca_enabled:
          description: A flag to indicate whether EFT Canada transactions are enabled.
          readOnly: true
          type: boolean
        is_external_card_credit_enabled:
          description: >-
            A flag to indicate whether external card credits are enabled. Both
            is_external_card_enabled and is_external_card_credit_enabled must be
            true for an external card credit to be allowed.
          readOnly: true
          type: boolean
        is_external_card_debit_enabled:
          description: >-
            A flag to indicate whether external card debits are enabled. Both
            is_external_card_enabled and is_external_card_debit_enabled must be
            true for an external card debit to be allowed.
          readOnly: true
          type: boolean
        is_external_card_enabled:
          description: A flag to indicate whether external card transactions are enabled.
          readOnly: true
          type: boolean
        is_fednow_credit_enabled:
          description: >-
            A flag to indicate whether FedNow credits are enabled. Both
            is_fednow_enabled and is_fednow_credit_enabled must be true for a
            FedNow credit to be allowed.
          readOnly: true
          type: boolean
        is_fednow_debit_enabled:
          description: >-
            A flag to indicate whether FedNow debits are enabled. Both
            is_fednow_enabled and is_fednow_debit_enabled must be true for a
            FedNow debit to be allowed.
          readOnly: true
          type: boolean
        is_fednow_enabled:
          description: A flag to indicate whether FedNow transactions are enabled.
          readOnly: true
          type: boolean
        is_p2p_enabled:
          description: A flag to indicate whether P2P transactions are enabled.
          readOnly: true
          type: boolean
        is_sar_enabled:
          description: A flag to indicate whether SAR generation is enabled.
          readOnly: true
          type: boolean
        is_security:
          description: >-
            A flag to indicate whether this account is being used as security
            for another account.
          readOnly: true
          type: boolean
        is_synctera_pay_credit_enabled:
          description: >-
            A flag to indicate whether Synctera Pay credits are enabled. Both
            is_synctera_pay_enabled and is_synctera_pay_credit_enabled must be
            true for a Synctera Pay credit to be allowed.
          readOnly: true
          type: boolean
        is_synctera_pay_debit_enabled:
          description: >-
            A flag to indicate whether Synctera Pay debits are enabled. Both
            is_synctera_pay_enabled and is_synctera_pay_debit_enabled must be
            true for a Synctera Pay debit to be allowed.
          readOnly: true
          type: boolean
        is_synctera_pay_enabled:
          description: A flag to indicate whether Synctera Pay transactions are enabled.
          readOnly: true
          type: boolean
        is_system_auto_pay_enabled:
          description: A flag to indicate whether auto pay feature is enabled.
          type: boolean
        is_wire_credit_enabled:
          description: >-
            A flag to indicate whether wire credits are enabled. Both
            is_wire_enabled and is_wire_credit_enabled must be true for a wire
            credit to be allowed.
          readOnly: true
          type: boolean
        is_wire_debit_enabled:
          description: >-
            A flag to indicate whether wire debits are enabled. Both
            is_wire_enabled and is_wire_debit_enabled must be true for a wire
            debit to be allowed.
          readOnly: true
          type: boolean
        is_wire_enabled:
          description: A flag to indicate whether wire transactions are enabled.
          readOnly: true
          type: boolean
        last_updated_time:
          description: Timestamp of the last account modification in RFC3339 format
          format: date-time
          readOnly: true
          type: string
        metadata:
          description: User provided account metadata
          type: object
        minimum_payment:
          $ref: '#/components/schemas/minimum_payment'
        nickname:
          description: User provided account nickname
          type: string
        open_date:
          description: >-
            The account open date. This is the bank's posting date when the
            account resource was created.
          format: date
          readOnly: true
          type: string
        overdraft_limit:
          deprecated: true
          description: |
            This field is unused and will be removed in a future API version.
          format: int64
          minimum: 0
          type: integer
        restrictions:
          $ref: '#/components/schemas/account_restrictions'
        reward_product_ids:
          description: >-
            A list of reward account products that the current account
            associates with.
          items:
            format: uuid
            type: string
          nullable: true
          type: array
        security:
          $ref: '#/components/schemas/security'
        spend_control_ids:
          $ref: '#/components/schemas/spend_control_ids'
        spending_limits:
          $ref: '#/components/schemas/spending_limits'
        status:
          $ref: '#/components/schemas/account_status'
        stop_payments:
          items:
            $ref: '#/components/schemas/stop_payment'
          readOnly: true
          type: array
        swift_code:
          description: SWIFT code
          maxLength: 11
          minLength: 8
          type: string
        tenant:
          $ref: '#/components/schemas/tenant_id'
        vendor_info:
          $ref: '#/components/schemas/vendor_info_response'
      type: object
    account_closure_payment_method:
      description: >
        Payment method for the final payment if the account being closed carries
        a balance.
      enum:
        - ACH
        - BANK_DRAFT
        - INTERNAL_TRANSFER_TO_CUSTOMER_ACCOUNT
        - INTERNAL_TRANSFER_TO_INTERNAL_ACCOUNT
      nullable: true
      type: string
    account_access_status:
      description: >-
        Represents whether a customer has frozen their account. `FROZEN` is a
        customer-initiated state meaning that the account will reject all
        debits, typically used for a lost or stolen card.
      enum:
        - ACTIVE
        - FROZEN
      type: string
    account_closure_response:
      description: >-
        Account closing details when attempting to close an account and status
        is being changed to `IN_CLOSING`.
      properties:
        cases:
          description: Cases associated with the account closure
          items:
            $ref: '#/components/schemas/case'
          type: array
        destination_id:
          description: internal/external/customer account ID, depending on payment_method
          format: uuid
          nullable: true
          type: string
        payment_method:
          $ref: '#/components/schemas/account_closure_payment_method'
        reason:
          $ref: '#/components/schemas/account_closure_reason'
        reason_details:
          description: Additional details about the reason for closing the account
          type: string
        validation_responses:
          items:
            $ref: '#/components/schemas/account_closure_validation_response'
          type: array
      required:
        - destination_id
        - payment_method
        - reason
        - reason_details
      type: object
    account_type:
      description: >
        The type of the account. In lead mode, this always takes the value of
        the template. If not

        specified in shadow mode, CHECKING will be assumed. Below mentioned are
        the account types:

        * SAVING: Savings account

        * CHECKING: Checking account

        * PREPAID: Prepaid account

        * LINE_OF_CREDIT: Line of Credit account

        * CREDIT_CARD: Credit Card account

        * CHARGE_SECURED: Secured Charge account, e.g. for use in a Smart Charge
        Card offering

        * CHARGE_UNSECURED: (alpha) Unsecured Charge account

        * REVOLVING_CREDIT_SECURED: Secured Revolving Credit account

        * REVOLVING_CREDIT_UNSECURED: Unsecured Revolving Credit account

        * GENERAL_LEDGER: General Ledger account (alpha - cannot yet be
        created). In production, these can only be created or updated by a
        Synctera administrator.
      enum:
        - CHARGE_SECURED
        - CHARGE_UNSECURED
        - CHECKING
        - CREDIT_CARD
        - GENERAL_LEDGER
        - LINE_OF_CREDIT
        - PREPAID
        - REVOLVING_CREDIT_SECURED
        - REVOLVING_CREDIT_UNSECURED
        - SAVING
      title: Account Type
      type: string
    balance_ceiling:
      properties:
        balance:
          description: Maximum balance in the account's currency. Unit in cents.
          format: int64
          minimum: 0
          type: integer
        linked_account_id:
          description: >
            ID of linked backing account for just-in-time (JIT) funding of
            transactions to maintain the balance ceiling
          format: uuid
          type: string
        overflow_account_id:
          deprecated: true
          description: >
            ID of linked backing account for just-in-time (JIT) funding of
            transactions to maintain the balance ceiling

            This attribute is a deprecated alias for linked_account_id.
          format: uuid
          type: string
      required:
        - balance
      type: object
    balance_floor:
      properties:
        balance:
          description: Minimum balance in the account's currency. Unit in cents.
          format: int64
          type: integer
        linked_account_id:
          description: >
            ID of linked backing account for just-in-time (JIT) funding of
            transactions to maintain the balance floor
          format: uuid
          type: string
        overdraft_account_id:
          deprecated: true
          description: >
            ID of linked backing account for just-in-time (JIT) funding of
            transactions to maintain the balance floor

            This attribute is a deprecated alias for linked_account_id.
          format: uuid
          type: string
      required:
        - balance
      type: object
    balance:
      properties:
        balance:
          description: balance in ISO 4217 minor currency units. Unit in cents.
          example: 2399
          format: int64
          readOnly: true
          type: integer
        type:
          $ref: '#/components/schemas/balance_type'
      required:
        - balance
        - type
      type: object
    billing_period:
      description: |
        The scheme for determining an account's billing period.
      properties:
        frequency:
          $ref: '#/components/schemas/billing_frequency'
        start_date:
          description: >
            The first day of the first billing cycle for this account. For a
            monthly billing cycle, this would determine the day of the month
            each billing cycle will start on. Note that, although this is
            returned as a UTC timestamp, the date always corresponds to the
            bank's calendar, and therefore the time and timezone should be
            ignored.
          example: '2022-01-01T00:00:00Z'
          format: date-time
          type: string
      required:
        - frequency
        - start_date
      type: object
    customer_type:
      description: Customer type
      enum:
        - BUSINESS
        - PERSONAL
      readOnly: true
      title: Customer Type
      type: string
    funds_ownership:
      description: >
        An account's funds ownership indicates which organization owns the funds
        in the account. For example, some GENERAL_LEDGER accounts have funds
        owned by the bank, even though the account is in the fintech tenant.
        Fintechs are not able to perform money movement on accounts where the
        bank or platform owns the funds. This read-only property is determined
        by the account_type and general_ledger_type.
      enum:
        - BANK
        - FINTECH
        - PLATFORM
      title: Funds Ownership
      type: string
    general_ledger_category:
      description: >-
        The category of the general ledger account. This read-only property is
        determined by the general_ledger_type.
      enum:
        - CORE
        - PROFIT_AND_LOSS
        - RESERVE
        - SETTLEMENT
        - SUSPENSE
        - TREASURY
      type: string
    general_ledger_type:
      description: >-
        The type of general ledger account. This is required when creating a
        general ledger account.
      enum:
        - ACH_SETTLEMENT
        - ACH_SUSPENSE
        - ALLOCATED_SUSPENSE
        - BANK_DRAFT
        - BILLING_EXPENSE
        - BILLING_REVENUE
        - CARD_AFT_PREFUNDING
        - CARD_OCT_SETTLEMENT
        - CARD_SETTLEMENT
        - CASH_SETTLEMENT
        - CASH_SUSPENSE
        - CHECK_SETTLEMENT
        - DISPUTE_WRITE_OFF_PNL
        - EFT_CA_SETTLEMENT
        - EFT_CA_SUSPENSE
        - EXTERNAL_CARD_AFT_SETTLEMENT
        - EXTERNAL_CARD_OCT_SETTLEMENT
        - FEDNOW_SETTLEMENT
        - FEES
        - FRAUD_LOSSES
        - FUNDING_ACCOUNTS
        - GENERAL_PNL
        - INTEREST_PAYOUT
        - INTERNATIONAL_WIRE_SETTLEMENT
        - IN_STORE_CASH_SETTLEMENT
        - LOC_INTEREST_INCOME
        - LOC_INVESTOR_PORTFOLIO
        - LOC_REPURCHASE
        - MONEY_IN_AND_OUT
        - NEGATIVE_BALANCE
        - NETWORK_ADJUSTMENT
        - NETWORK_CHARGEBACK
        - NEW_FUNDING_ACCOUNT
        - PROVISIONAL_CREDIT_PNL
        - RESERVE
        - REWARDS
        - SC_INVESTOR_PORTFOLIO
        - SC_REPURCHASE
        - SYNCTERA_PAY_SUSPENSE
        - USC_INTEREST_INCOME
        - USC_INVESTOR_PORTFOLIO
        - USC_REPURCHASE
        - WIRE_SETTLEMENT
        - WIRE_SUSPENSE
        - WRITE_OFF
      type: string
    grace_period:
      description: >
        The number of days past the billing period to allow for payment before
        it is considered due. This directly determines the due date for a
        payment.
      minimum: 1
      type: integer
    minimum_payment:
      description: >
        The scheme for calculating the minimum payment due for outstanding
        balances in a billing period.
      discriminator:
        mapping:
          FULL:
            $ref: '#/components/schemas/minimum_payment_type_full'
          RATE_OR_AMOUNT:
            $ref: '#/components/schemas/minimum_payment_type_rate_or_amount'
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/minimum_payment_type_rate_or_amount'
        - $ref: '#/components/schemas/minimum_payment_type_full'
      type: object
    account_restrictions:
      description: Conditions that restrict the use of the account.
      properties:
        is_account_out_of_area:
          description: >
            A flag to indicate whether any of the account holders of the account
            are out of the supported countries. Can only be set by the Synctera
            platform.
          type: boolean
        is_delinquent:
          description: >
            A flag to indicate whether a credit account is greater than 30 days
            past due on minimum payments. Delinquent accounts will be unable to
            spend until overdue amount is paid. Can only be set by the Synctera
            platform.
          type: boolean
        is_past_due:
          description: >
            A flag to indicate whether a credit account is past due on minimum
            payments. Can only be set by the Synctera platform.
          type: boolean
        is_revoked:
          description: >
            A flag to indicates whether a credit account has been revoked
            (greater than 90 days past due). Revoked accounts will be unable to
            spend and no longer accrue interest. Can only be set by the Synctera
            platform.
          type: boolean
      type: object
    security:
      properties:
        linked_account_id:
          description: >
            ID of linked backing account for use as a security, e.g. for use in
            a Smart Charge Card

            offering. Must be of type CHECKING or SAVING.
          format: uuid
          type: string
      required:
        - linked_account_id
      type: object
    spend_control_ids:
      description: List of spend control IDs to control spending for the account
      items:
        example: 7d943c51-e4ff-4e57-9558-08cab6b963c7
        format: uuid
        type: string
      maxItems: 100
      type: array
    spending_limits:
      deprecated: true
      description: >-
        Account spending limits is unused and has been deprecated. Instead use
        the spend controls API.
      properties:
        day:
          $ref: '#/components/schemas/spending_limit_with_time'
        description:
          description: User provided description on the spending limits
          type: string
        lifetime:
          $ref: '#/components/schemas/spending_limit_with_time'
        month:
          $ref: '#/components/schemas/spending_limit_with_time'
        transaction:
          description: Individual transaction limit
          properties:
            amount:
              description: Maximum amount allowed. Unit in cents.
              format: int64
              minimum: 0
              type: integer
          type: object
        week:
          $ref: '#/components/schemas/spending_limit_with_time'
      type: object
    account_status:
      description: >
        The status of the account.


        | Status | Description | Transactable |

        |------|-----------|-----|

        | ACCOUNT_NEVER_ACTIVE | Account was never activated by the customer | N
        |

        | ACCOUNT_NOT_DESIRED | A credit account was created for a customer, but
        the customer did not accept the account | N |

        | ACTIVATED_NOT_DISBURSED | A credit account was created for the
        customer, but the funds have not been paid out or used | N |

        | ACTIVE_OR_DISBURSED | The account is active and transactable | Y |

        | APPLICATION_SUBMITTED | Deprecated status | N |

        | AWAITING_FIXING | Account is awaiting fixing | N |

        | CHARGED_OFF | The account has been charged off and is closed | N |

        | CLOSED | Accounts must be zeroed out before being closed.  Closed
        accounts cannot transact | N |

        | DELINQUENT | Synctera will update a credit account to delinquent if
        the customer has not paid within their expected billing cycle | N |

        | FAILED_KYC | We were unable to verify the identity of the account
        holder: they have not passed know-your-customer (KYC) checks | N |

        | IN_CLOSING | The account is in the process of being closed. An account
        with the IN_CLOSING status may only be updated to CLOSED. Updates to
        other statuses are prohibited. | N |

        | RESTRICTED | Synctera will update accounts to restricted of the
        account holder has not successfully passed KYC | N |

        | SUSPENDED | Account has been suspected of fraudulent activity and is
        blocked from further transactions | N |
      enum:
        - ACCOUNT_NEVER_ACTIVE
        - ACCOUNT_NOT_DESIRED
        - ACTIVATED_NOT_DISBURSED
        - ACTIVE_OR_DISBURSED
        - APPLICATION_SUBMITTED
        - AWAITING_FIXING
        - CHARGED_OFF
        - CLOSED
        - DELINQUENT
        - FAILED_KYC
        - IN_CLOSING
        - RESTRICTED
        - SUSPENDED
      title: Account Status
      type: string
    stop_payment:
      properties:
        dispute_id:
          description: ID of the dispute that created the stop payment
          format: uuid
          type: string
        expires_on:
          description: >-
            The date when this stop payment is no longer valid. This is only for
            business accounts.
          format: date-time
          type: string
        originator_name:
          description: Name of the originator
          type: string
        stop_payment_id:
          format: uuid
          type: string
        transaction_id:
          description: >-
            If this stop payment was created from a disputed transaction,
            transaction_id references the posted transaction.
          format: uuid
          type: string
      required:
        - originator_name
        - stop_payment_id
      type: object
    tenant_id:
      description: >
        The id of the tenant containing the resource. This is relevant for
        Fintechs that have multiple workspaces.
      example: abcdef_ghijkl
      type: string
    vendor_info_response:
      description: Vendor information for external account management systems
      properties:
        vendor_data:
          $ref: '#/components/schemas/vendor_data_response'
        vendor_type:
          $ref: '#/components/schemas/vendor_type'
      required:
        - vendor_data
        - vendor_type
      type: object
    error:
      description: >-
        Synctera error responses in API v0 follow [RFC
        7807](https://datatracker.ietf.org/doc/html/rfc7807). Following that
        standard, the field for a machine-readable "error code" in API v0 is
        `type`.

        In our future API v1, we are phasing out RFC 7807 and adopting a custom
        error format. That format will be documented in our API v1 spec. But you
        may see some v0 error responses with a machine-readable `code` field
        while we are making the transition from v0 to v1.
      properties:
        code:
          description: >-
            An optional “sneak preview” of our future API v1 error responses.
            This is provided to give integrators a chance to work with our
            future error codes. Error codes for the same error may change
            between v0 and v1.
          example: BAD_REQUEST_BODY
          type: string
        detail:
          description: |
            A human-readable string explaining this particular error.
          example: 'missing required fields: first_name, dob'
          type: string
        status:
          description: the HTTP status code for this response
          example: 400
          type: integer
        title:
          description: >
            A human-readable string for this general category of error, which
            corresponds 1-to-1 with error types (`title` is the human-readable
            version of `type`). There can be multiple distinct titles for the
            same HTTP status code, and the same `title` can result in many
            different `detail` strings.

            This field will be removed in API v1.
          example: Bad Request Body
          type: string
        type:
          description: >
            A machine-readable string that identifies the error for programmatic
            use. This is a URI, i.e. a globally unique identifier. It is _not_
            necessarily a URL, so do not expect it to resolve to a web page. You
            can use this whole string as an error code, or just everything after
            the last slash.

            This field will be removed in API v1.
          example: https://dev.synctera.com/errors/bad-request-body
          type: string
      title: Standard error response (RFC 7807 problem report)
      type: object
    case:
      properties:
        case_id:
          description: Case ID
          type: string
        case_reason:
          description: Case Reason
          type: string
      required:
        - case_id
        - case_reason
      type: object
    account_closure_reason:
      description: >
        The enumerated reason for closing the account. This is a required field
        when closing an account; the given value will be validated against the
        caller's permissions.

        * `BANK_REQUEST_CHARGE_OFF` – A charge-off is when a creditor declares
        an uncollected debt a loss and removes it from its balance sheet. The
        account will be closed to new charges and may be sent to a collection
        agency. * `BANK_REQUEST_WRITE_OFF` - A write-off is when a bank declares
        an uncollected debt a loss and removes it from its balance sheet. The
        account will be closed to new charges.
      enum:
        - BANK_REQUEST_CHARGE_OFF
        - BANK_REQUEST_FRAUD
        - BANK_REQUEST_INACTIVITY
        - BANK_REQUEST_REDEEMED_OR_REINSTATED_REPOSSESSION
        - BANK_REQUEST_REGULATORY_REASONS
        - BANK_REQUEST_WRITE_OFF
        - CUSTOMER_REQUEST_CREDIT_CARD_LOST_OR_STOLEN
        - CUSTOMER_REQUEST_REFINANCE
        - CUSTOMER_REQUEST_TRANSFER
        - CUSTOMER_REQUEST_VOLUNTARILY_SURRENDERED
        - PROGRAM_SHUT_DOWN_BANK
        - PROGRAM_SHUT_DOWN_FINTECH
      example: BANK_REQUEST_REGULATORY_REASONS
      type: string
    account_closure_validation_response:
      description: Account closure validation response
      properties:
        details:
          type: object
        message:
          description: Validation message
          example: Cards decoupled from account
          type: string
        name:
          description: Name
          example: cards
          type: string
        validated:
          description: Validation result
          example: true
          type: boolean
      required:
        - details
        - message
        - name
        - validated
      type: object
    balance_type:
      description: >
        * `ACCOUNT_BALANCE`: The posted balance of the account. For a banking
        account, e.g.
          `CHECKING` or `SAVING`, this is a measure of the sum of credits minus debits for all
          posted transactions. For a lending account, e.g. `CHARGE_SECURED` or `LINE_OF_CREDIT`,
          this is a measure of the sum of debits minus credits for all posted transactions. This
          value can be negative.

        * `AVAILABLE_BALANCE`: The available balance of the account, which is
        the amount available
          to spend, or the spending power. For a banking account, e.g. `CHECKING` or `SAVING`, this
          is a measure of the account balance minus any pending debits. For an unsecured lending
          account, e.g. `CHARGE_UNSECURED` or `LINE_OF_CREDIT`, this is a measure of available
          credit, which is its credit limit minus the account balance, minus any pending debits.
          For a `CHARGE_SECURED` account, it equals the `AVAILABLE_BALANCE` of the linked
          security account. This value will never be negative.

        * `ACCRUED_INTEREST_MTD`: The amount of accrued but unposted interest.
        This value may
          fluctuate, as new transactions can affect interest amounts. Treat accrued interest as
          pending for the billing month until it is posted at the end of the billing period.

        * `PAYMENTS_RECEIVED_MTD`: The amount of payment received to date for
        the billing month.
      enum:
        - ACCOUNT_BALANCE
        - ACCRUED_INTEREST_MTD
        - AVAILABLE_BALANCE
        - PAYMENTS_RECEIVED_MTD
      type: string
    billing_frequency:
      description: >
        The frequency of billing cycles. Along with the start date, this will
        determine the start and end of each cycle.
      enum:
        - ANNUALLY
        - BI_WEEKLY
        - DAILY
        - MONTHLY
        - SEMI_MONTHLY
        - WEEKLY
      type: string
    minimum_payment_type_full:
      properties:
        type:
          $ref: '#/components/schemas/minimum_payment_type'
      required:
        - type
      type: object
    minimum_payment_type_rate_or_amount:
      properties:
        min_amount:
          description: >
            The minimum amount to charge as a minimum payment, in cents. For
            example, to set the minimum to $30, set this value to 3000. Note:
            despite setting this value, the minimum payment will never be
            greater than the statement balance.
          format: int64
          type: integer
        rate:
          description: >
            The percentage of the balance to use, in basis points. For example,
            to set 12.5% of the balance, set this value to 1250.
          type: integer
        type:
          $ref: '#/components/schemas/minimum_payment_type'
      required:
        - min_amount
        - rate
        - type
      type: object
    spending_limit_with_time:
      description: Limit over a specific time period.
      properties:
        amount:
          description: Maximum amount allowed within the time range. Unit in cents.
          format: int64
          minimum: 0
          type: integer
        transactions:
          description: Maximum number of transactions allowed within the time range
          format: int64
          minimum: 0
          type: integer
      type: object
    vendor_data_response:
      description: Vendor-specific data
      properties:
        loanpro:
          $ref: '#/components/schemas/loanpro_vendor_data_response'
      type: object
    vendor_type:
      description: The type of vendor managing this account
      enum:
        - LOANPRO
      example: LOANPRO
      type: string
    minimum_payment_type:
      description: >
        * RATE_OR_AMOUNT: Describes a minimum payment scheme where the amount
        calculated is either a portion
          of the balance due, or a fixed, minimum amount, whichever is greater. For example, if
          set to 1.00% and $30, the minimum payment will be calculated as 1.00% of the balance, or
          $30, whichever is greatest. However, the minimum payment will never exceed the statement
          balance.
        * FULL: Describes a minimum payment scheme where the amount calculated
        is the entire account
          balance at the end of the statement period.

        Note that the choice of minimum payment type is constrained by the
        account type.
      enum:
        - FULL
        - RATE_OR_AMOUNT
      type: string
    loanpro_vendor_data_response:
      allOf:
        - $ref: '#/components/schemas/base_loanpro_vendor_data'
        - properties:
            daily_archive:
              $ref: '#/components/schemas/loanpro_daily_archive'
          type: object
      description: LoanPro-specific vendor data for account
      required:
        - cash_advance_bucket_id
        - loc_id
        - loc_product_id
        - purchases_bucket_id
        - tenant_id
    base_loanpro_vendor_data:
      properties:
        cash_advance_bucket_id:
          description: LoanPro cash advance bucket ID
          example: 67890
          format: int64
          type: integer
        loc_id:
          description: LoanPro line of credit account ID
          example: 12345
          format: int64
          type: integer
        loc_product_id:
          description: LoanPro line of credit product ID
          example: 67890
          format: int64
          type: integer
        purchases_bucket_id:
          description: LoanPro purchases bucket ID
          example: 12345
          format: int64
          type: integer
        tenant_id:
          description: LoanPro tenant ID
          example: '1'
          type: string
      type: object
    loanpro_daily_archive:
      description: Daily snapshot data from LoanPro (enriched at read time)
      properties:
        archive_date:
          description: Date of this snapshot
          example: '2024-01-15'
          format: date
          type: string
        bucket_interest_rates:
          description: Interest rates for each transaction bucket
          items:
            $ref: '#/components/schemas/loanpro_bucket_interest_rate'
          type: array
      readOnly: true
      type: object
    loanpro_bucket_interest_rate:
      description: Interest rate for a transaction bucket
      properties:
        bucket_display_name:
          description: Human-readable display name for the bucket
          example: Purchases
          type: string
        bucket_label:
          description: >
            Bucket label identifier. Common values include purchase,
            cash_advances,

            and balance_transfer, but custom bucket labels may be configured in
            LoanPro.
          example: purchase
          type: string
        rate_bps:
          description: Interest rate in basis points (1800 = 18.00% APR)
          example: 1800
          type: integer
      type: object
  responses:
    unauthorized:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/error'
      description: Unauthorized
    forbidden:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/error'
      description: Forbidden error
    not_found:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/error'
      description: Resource not found
    unprocessable_entity:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/error'
      description: Unprocessable entity request response
    internal_server_error:
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/error'
      description: Internal server error
  securitySchemes:
    bearerAuth:
      bearerFormat: api_key
      scheme: bearer
      type: http

````