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

# Enable or Disable a Virtual Account

This endpoint allows you to temporarily enable or disable a virtual account. Use it to suspend a specific account from receiving new funds (disable) or to reactivate it so it can accept payments again (enable). This is useful for managing customer accounts during compliance reviews, pausing subscriptions, or other operational controls.


## OpenAPI

````yaml openapi/localpayment.json PUT /api/virtual-account/{externalId}/activation/{status}/
openapi: 3.1.0
info:
  version: '1.0'
  title: Localpayment
  contact:
    name: Support
    url: mailto:support@localpayment.com
servers:
  - url: https://api.stage.localpayment.com
    description: Stage
security:
  - token: []
paths:
  /api/virtual-account/{externalId}/activation/{status}/:
    put:
      summary: Enable or Disable a Virtual Account
      operationId: update-virtual-account-status
      parameters:
        - name: Authorization
          in: header
          description: >-
            Bearer access token for authentication. This token is obtained from
            the [Get Access Token](/reference/get-token) or [Refresh Access
            Token](/reference/refresh-token) endpoints.
          required: true
          schema:
            type: string
        - name: status
          in: path
          description: '`enable` or `disable`.'
          required: true
          schema:
            type: string
            enum:
              - enable
              - disable
            examples:
              - enable
        - name: externalId
          in: path
          description: >-
            The unique identifier of the virtual account you want to manage.
            This must be the exact externalId value you provided when creating
            the account. Use this identifier to specify the target account for
            operations such as enabling or disabling it.
          required: true
          schema:
            type: string
            pattern: '[a-zA-Z0-9\- ]+'
            examples:
              - 53025bf4-4c87-4b4f-8fea-b47004440f37
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  currency:
                    type: string
                    enum:
                      - ARS
                      - BRL
                      - CLP
                      - USD
                      - MXN
                      - PEN
                    description: '[currency code](/reference/currency-codes).'
                  externalId:
                    type: string
                    description: >-
                      The unique identifier for the virtual account. This is the
                      same externalId supplied in your request, confirming the
                      operation was performed on the correct account.
                  internalId:
                    type: string
                    description: Localpayment transaction identifier.
                  accountNumber:
                    type: string
                    description: Localpayment account number.
                  beneficiary:
                    type: object
                    title: beneficiary
                    description: "The individual or entity that will receive the funds paid into this virtual account. The beneficiary is the final recipient of the money and is not necessarily the legal owner or holder of the virtual account itself.\r\n"
                    properties:
                      type:
                        type: string
                        enum:
                          - COMPANY
                          - INDIVIDUAL
                        description: Beneficiary type.
                      name:
                        type: string
                        description: Beneficiary name.
                      document:
                        type: object
                        description: Beneficiary documentation.
                        properties:
                          type:
                            type: string
                            description: >-
                              The type of [identity document
                              types](/reference/identity-document-types), such
                              as a National Identity Number, Social Security
                              Number, or Driver's License, depending on the
                              country of issuance.
                            examples:
                              - RUC
                          id:
                            type: string
                            description: >-
                              Identity document number (usually a number). This
                              must be a valid number according to the rules for
                              the specific document type.
                            examples:
                              - '1791234561009'
                        examples:
                          - type: RUC
                            id: '1791234561009'
                      lastName:
                        type: string
                        description: Beneficiary's last name.
                      fullName:
                        type: string
                        description: Beneficiary's full name.
                      bank:
                        type: object
                        properties:
                          branch:
                            type: object
                            description: Bank branch details.
                            properties:
                              code:
                                type: string
                                description: Branch code.
                          account:
                            type: object
                            description: Beneficiary's bank account details.
                            properties:
                              number:
                                type: string
                                description: Account number.
                              aliases:
                                type: array
                                description: >-
                                  Array of account aliases (e.g., unique
                                  identifiers for the account).
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      description: >-
                                        The type of alias (e.g.,
                                        `RandomKeyCode`).
                                    value:
                                      type: string
                                      description: Alias value.
                              owner:
                                type: object
                                description: Account owner's document details.
                                properties:
                                  document:
                                    type: object
                    examples:
                      - type: COMPANY
                        name: string
                        document:
                          type: RUC
                          id: '1791234561009'
                        lastName: string
                        fullName: string
                        bank:
                          branch: {}
                          account:
                            number: string
                            aliases:
                              - type: string
                                value: string
                            owner:
                              document: {}
                  status:
                    type: object
                    title: status
                    description: Operation status.
                    properties:
                      code:
                        type: string
                        description: '[Status code](/reference/validate-identity-document).'
                      description:
                        type: string
                        description: >-
                          [Status
                          description](/reference/validate-identity-document).
                      detail:
                        type: string
                        description: Additional status information.
                  errors:
                    type: array
                    description: >-
                      Array of errors that occurred during the transaction. If
                      the transaction was successful, this array will be empty.
                    items:
                      type: object
                x-examples:
                  Example 1:
                    currency: MXN
                    externalId: e36ef959-12d4-4cf0-b00c-99dc51798f4b
                    internalId: c09095fb-6a0e-47ff-9143-9d9452b0f290
                    accountNumber: '{{accountNumber}}'
                    beneficiary:
                      type: INDIVIDUAL
                      name: FirtName
                      document:
                        type: RFC
                        id: EXTF900101NI1
                      bank:
                        branch: {}
                        account:
                          number: '646011319800023800'
                          aliases: []
                          owner:
                            document: {}
                      fullName: FirtName LastName
                      lastName: LastName
                    status:
                      code: '200'
                      description: COMPLETED
                      detail: Virtual account has been created
                    errors: []
              examples:
                200 - Virtual account has been created.:
                  value:
                    currency: MXN
                    externalId: e36ef929-c2d4-fcf0-b30c-99dc51798f4b
                    internalId: c09095fb-6a0e-47af-9f43-3d9452b0f290
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    beneficiary:
                      type: INDIVIDUAL
                      name: John
                      document:
                        type: RFC
                        id: EXTF900101NI1
                      bank:
                        branch: {}
                        account:
                          number: '646011319800023123'
                          aliases: []
                          owner:
                            document: {}
                      fullName: John Doe
                      lastName: Doe
                    status:
                      code: '200'
                      description: COMPLETED
                      detail: Virtual account has been created
                    errors: []
                300 - Virtual account disabled.:
                  value:
                    currency: MXN
                    externalId: e36eff59-22d4-ccf0-bf0c-99dc51798f4b
                    internalId: c09095fb-6a4e-17cf-9343-9d9452b0f290
                    accountNumber: '{{yourLocalpaymentAccountNumber}}'
                    beneficiary:
                      type: INDIVIDUAL
                      name: John
                      document:
                        type: RFC
                        id: EXTF900101NI1
                      bank:
                        branch: {}
                        account:
                          number: '646011319800023123'
                          aliases: []
                          owner:
                            document: {}
                      fullName: John Doe
                      lastName: Doe
                    status:
                      code: '300'
                      description: DISABLED
                      detail: Virtual account disabled
                    errors: []
        '400':
          description: Bad Request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  timestamp:
                    type: string
                    description: Service execution time.
                  status:
                    type: integer
                    description: Error status code.
                  error:
                    type: string
                    description: Error description.
                  message:
                    type: string
                    description: Message with additional information.
                  path:
                    type: string
                    description: Service path.
                x-examples:
                  Example 1:
                    timestamp: '2025-01-06T23:55:22.121+00:00'
                    status: 400
                    error: Bad Request.
                    message: >-
                      Status activation not recognize. Please use 'disable' or
                      'enable'
                    path: >-
                      /virtual-account/e36ef959-12d4-4cf0-b00c-99dc51798f4b/activation/:status
              examples:
                400 - Status activation not recognize.:
                  value:
                    timestamp: '2025-01-06T23:55:22.121+00:00'
                    status: 400
                    error: Bad Request.
                    message: >-
                      Status activation not recognize. Please use 'disable' or
                      'enable'
                    path: >-
                      /virtual-account/e36ef159-b2d4-4af0-b02c-99dc51798f4b/activation/:status
                400 - Virtual Account doesn't exist.:
                  value:
                    timestamp: '2025-01-07T00:03:14.639+00:00'
                    status: 400
                    error: Bad Request.
                    message: Virtual Account doesn't exist
                    path: >-
                      /virtual-account/e36ef959-12d4-4cf0-b00c-99dc51798f4b2/activation/disable
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                    description: Additional information of the response.
                  code:
                    type: string
                    description: Status code.
                  messages:
                    type: array
                    description: Message list.
                    items:
                      type: object
                      properties:
                        token_class:
                          type: string
                          description: Token class.
                        token_type:
                          type: string
                          description: Token type.
                        message:
                          type: string
                          description: Message with additional information.
                x-examples:
                  Example 1:
                    detail: Given token not valid for any token type
                    code: token_not_valid
                    messages:
                      - token_class: AccessToken
                        token_type: access
                        message: Token is invalid or expired
              examples:
                401 - Token is invalid or expired:
                  value:
                    detail: Given token not valid for any token type
                    code: token_not_valid
                    messages:
                      - token_class: AccessToken
                        token_type: access
                        message: Token is invalid or expired
      security:
        - token: []
      servers:
        - url: https://api.stage.localpayment.com
          description: Stage
components:
  securitySchemes:
    token:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.