---
updatedAt: 2026-06-26T15:22:26.000Z
---

Fetch the complete documentation index at: https://developers.pismo.io/pismo-docs/llms.txt. Use this file to discover all available pages before exploring further.

# Open deposit account

Creates or locates a transaction banking account and attaches a validated deposit product in a single request. When the operation succeeds, the Pismo platform generates the [Deposit account opened](https://developers.pismo.io/events/docs/deposit-product-deposit-account-opened-1) and [Account attached](https://developers.pismo.io/events/docs/deposit-product-account-attach-1) events.

This endpoint supports two scenarios:

* **Existing account**: Provide both `account.account_id` and `account.external_account_id`. The Pismo platform locates the account via the transaction banking API and validates the IDs. If there is a mismatch, the request fails with a `400` error.

* **New account**: Provide `account.external_account_id` and the `account_creation` object. The Pismo platform creates a new transaction banking account and attaches the deposit product. If the transaction banking API returns `409` because the account already exists, the Pismo platform locates the existing account and proceeds with product attachment.

**Note**: The deposit product must exist, be of type `deposit`, and have an `ACTIVE` status.


# OpenAPI definition

```json
{
  "openapi": "3.1.3",
  "info": {
    "title": "Banking - Interest-bearing accounts",
    "version": "1.0.0",
    "description": "API for interest-bearing account functionality",
    "contact": {
      "name": "API Support",
      "url": "https://developers.pismo.io/support/"
    },
    "license": {
      "name": "Copyright Pismo"
    }
  },
  "servers": [
    {
      "url": "https://sandbox.pismolabs.io/savings-products",
      "description": "Sandbox API server for testing"
    }
  ],
  "tags": [
    {
      "name": "Deposit account open",
      "description": "Endpoints that create deposit accounts and attach products in a single operation"
    }
  ],
  "components": {
    "parameters": {
      "authorizationTokenHeader": {
        "name": "AuthorizationToken",
        "in": "header",
        "schema": {
          "type": "string"
        },
        "required": true,
        "description": "Account token. Token encoded with a Pismo account ID. Tokens can expire quickly, which can result in a 401 Unauthorized error.\n",
        "example": 1234
      }
    },
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Error type code",
            "example": "EIBACC0003"
          },
          "details": {
            "type": "string",
            "description": "Error details",
            "example": "error EIBACC0008: Validation error [(Field 'Order' is invalid)]"
          },
          "message": {
            "description": "Error message",
            "example": "Bad Request",
            "type": "string"
          }
        }
      },
      "PayoutAccount": {
        "type": "object",
        "description": "The payout account defines where outbound payments are sent, and it is used in two operational contexts.<br>\n\n* **Capitalization flow**: When the capitalization mode is set to `PAYOUT`, the capitalized interest is directed to this account. If the mode is `REINVEST`, the payout account is not involved because the interest is added to the principal instead.\n* **Maturity instruction flow**: At maturity, this account receives principal or interest whenever the maturity instructions specify `PAY` for either `maturity_instructions.principal` or `maturity_instructions.interest`. This flow always relies on the payout account, regardless of how capitalization is configured.\n\nBoth flows reference the same payout account settings. Choosing `REINVEST` for capitalization does not remove or disable the payout account, and it remains fully available for maturity‑related payments.\n",
        "properties": {
          "label": {
            "type": "string",
            "description": "Label to identify the account\n",
            "example": "My payout account"
          },
          "type": {
            "type": "string",
            "description": "Payout account type, either `INTERNAL` or `EXTERNAL`\n",
            "enum": [
              "INTERNAL",
              "EXTERNAL"
            ],
            "example": "INTERNAL"
          },
          "internal_account_id": {
            "type": "number",
            "description": "Internal account ID for the account that receives the payments.\nRequired for type `INTERNAL` and not allowed for `EXTERNAL`.\n",
            "example": 123456
          },
          "external_account": {
            "type": "object",
            "description": "Contains user-defined key-value pairs that identify the external account receiving the payments.\nNote that external account information is client-provided.\n\nRequired for type `EXTERNAL` and not allowed for `INTERNAL`.\n",
            "example": {
              "key": "value"
            }
          }
        }
      },
      "MaturityPeriod": {
        "type": "object",
        "description": "Defines when the deposit matures. There are three usage modes:\n\n* **Relative period**: Sends `unit` + `value` (e.g. `MONTHS` + `6`).\n* **Explicit date**: Sends `calendar_maturity_date` (e.g. `2027-06-15`).\n* **Default**: Omits the field or sends `{}`. The product's configured default maturity term (`PRODUCT_DEFAULT_MATURITY_DATE_DAYS`, typically `10950` days ≈ 30 years) is applied.\n\n**NOTE**: `calendar_maturity_date` and `unit`/`value` are mutually exclusive, sending both in the same request returns a `400` validation error.\n\nThe response returns exactly what was sent in the request:\n* Send `unit` + `value` returns `unit` + `value`\n* Send `calendar_maturity_date` returns `calendar_maturity_date`\n* Send nothing (default fallback applied) returns `unit=DAYS` and `value` equal to the product's configured `PRODUCT_DEFAULT_MATURITY_DATE_DAYS`\n",
        "properties": {
          "unit": {
            "$ref": "#/components/schemas/MaturityPeriodUnit"
          },
          "value": {
            "$ref": "#/components/schemas/MaturityPeriodValue"
          },
          "calendar_maturity_date": {
            "$ref": "#/components/schemas/CalendarMaturityDate"
          }
        }
      },
      "MaturityPeriodUnit": {
        "type": "string",
        "description": "Time unit for the relative maturity period. It's used together with `value` and cannot coincide with `calendar_maturity_date`.\n\n- `DAYS`: Uses `value` directly. Example: `value=90` → 90 days.\n- `WEEKS`: Multiplies `value` by 7. Example: `value=4` → 28 days.\n- `MONTHS`: Calculates calendar-month with end-of-month (EOM) clamping when the target day does not exist. Example: `2024-01-31` + 1 month = `2024-02-29` (leap year) or `2025-02-28` (non-leap year).\n- `YEARS`: Calculates calendar-year, for example: `2024-02-29` + 1 year = `2025-02-28`. Note that there is no Feb 29 in 2025.\n\nFor `WEEKS`, `MONTHS`, and `YEARS`, the resulting calendar date is converted back to a day count to validate against the product's configured minimum or maximum term.\n",
        "enum": [
          "DAYS",
          "WEEKS",
          "MONTHS",
          "YEARS"
        ],
        "example": "MONTHS"
      },
      "MaturityPeriodValue": {
        "type": "integer",
        "description": "Number of time units until maturity. Must be greater than `0`. Mutually exclusive with `calendar_maturity_date`.\n",
        "minimum": 1,
        "example": 6
      },
      "CalendarMaturityDate": {
        "type": "string",
        "format": "date",
        "description": "Maturity date. Format is `YYYY-MM-DD`. The date must be a future date.\n\nThis date cannot coincide with `unit`/`value`, sending both in the same request returns a `400` validation error.\n",
        "example": "2027-06-15"
      },
      "DepositConfigs": {
        "type": "object",
        "properties": {
          "maturity_period": {
            "$ref": "#/components/schemas/MaturityPeriod"
          },
          "payout_account": {
            "$ref": "#/components/schemas/PayoutAccount"
          },
          "interest_capitalization_mode": {
            "type": "string",
            "enum": [
              "PAYOUT",
              "REINVEST"
            ],
            "default": "PAYOUT",
            "description": "Controls the treatment of capitalized interest.<br>\n\n* `PAYOUT` is the default behavior. In this mode, the capitalized amount is sent to the configured payout_account. If no payout account exists, the amount stays in the base account.\n* `REINVEST` instructs the Pismo platform to add the capitalized amount to the principal through the interest engine. The new principal becomes the foundation for the next accrual cycle.\n\nThis setting affects only the capitalization process. The maturity instruction flow always uses `payout_account`, regardless of the value of this field.\n\nIf the field is not provided, it is omitted from the attachment and the Pismo platform applies `PAYOUT` at runtime.\n",
            "example": "REINVEST"
          },
          "overrides": {
            "$ref": "#/components/schemas/AttachmentOverridesRequest"
          }
        }
      },
      "AttachmentOverridesRequest": {
        "type": "object",
        "description": "Per-attachment overrides applied on top of the product defaults. All sub-fields are optional.\nThis object contains the per‑attachment overrides that supplement the product defaults. All sub‑fields are optional. Omitting a section causes the Pismo platform to follow the normal fallback sequence, moving from the account level to the program and then to the product defaults. Each penalty type provides `waived` as a required field, optional type‑specific fields, and an optional `valid_until` to schedule the revert.\n",
        "properties": {
          "maturity_instructions": {
            "$ref": "#/components/schemas/MaturityInstructionsOverrideRequest"
          },
          "renewal_term": {
            "$ref": "#/components/schemas/RenewalTermOverrideRequest"
          },
          "penalties": {
            "$ref": "#/components/schemas/PenaltiesOverrideRequest"
          }
        }
      },
      "MaturityInstructionsOverrideRequest": {
        "type": "object",
        "description": "Overrides the deposit’s behavior at maturity. If a field is omitted, the Pismo platform uses the value defined at the higher‑level configuration that governs this deposit.\n",
        "properties": {
          "principal": {
            "type": "string",
            "enum": [
              "ROLLOVER",
              "PAY"
            ],
            "description": "Specifies how the principal is handled once the deposit matures.",
            "example": "ROLLOVER"
          },
          "interest": {
            "type": "string",
            "enum": [
              "ROLLOVER",
              "PAY"
            ],
            "description": "Specifies how the interest is handled once the deposit matures.",
            "example": "PAY"
          },
          "reason": {
            "type": "string",
            "maxLength": 100,
            "description": "Optional audit-trail reason.",
            "example": "Customer preference at onboarding"
          }
        }
      },
      "RenewalTermOverrideRequest": {
        "type": "object",
        "description": "Specifies the recurring rollover term, not to be confused with the initial `maturity_period`.\n\nYou must provide either `unit` with `value` or `renewal_calendar_maturity_date`.\n\nA `ROLLOVER` configuration in principal or interest is required.\n\nWhen you pass `renewal_calendar_maturity_date`, the Pismo platform converts the interval from today into a day count and stores it at attach time in normalized form: `{unit: DAYS, value: <calculated>}`.\n",
        "properties": {
          "unit": {
            "type": "string",
            "enum": [
              "DAYS",
              "WEEKS",
              "MONTHS",
              "YEARS"
            ],
            "description": "Time unit of the renewal term. Required together with `value` when calendar form is not used.",
            "example": "MONTHS"
          },
          "value": {
            "type": "integer",
            "minimum": 1,
            "description": "Number of units. Required together with `unit` when calendar form is not used.",
            "example": 6
          },
          "renewal_calendar_maturity_date": {
            "type": "string",
            "format": "date",
            "description": "Explicit calendar date (`YYYY-MM-DD`), the date must be a future date, and does not coincide with `unit`+`value`.",
            "example": "2027-05-22"
          }
        }
      },
      "PenaltiesOverrideRequest": {
        "type": "object",
        "description": "Per-type penalty overrides. Each type independently uses three-state semantics:\nomit (inherit) · `{waived: true}` (exempt) · `{waived: false, <fields>}` (customize).\n",
        "properties": {
          "reason": {
            "type": "string",
            "maxLength": 100,
            "description": "Optional audit-trail reason for the entire penalties block.",
            "example": "Q4 2026 VIP retention package"
          },
          "grace_period": {
            "$ref": "#/components/schemas/GracePeriodOverrideRequest"
          },
          "early_withdrawal_after_opening": {
            "$ref": "#/components/schemas/EarlyWithdrawalAfterOpeningOverrideRequest"
          },
          "withdrawal_fee": {
            "$ref": "#/components/schemas/WithdrawalFeeOverrideRequest"
          },
          "tiered_interest_forfeiture": {
            "$ref": "#/components/schemas/TieredInterestForfeitureOverrideRequest"
          },
          "subsequent_withdrawals": {
            "$ref": "#/components/schemas/SubsequentWithdrawalsOverrideRequest"
          }
        }
      },
      "GracePeriodOverrideRequest": {
        "type": "object",
        "description": "Grace period override. Type-specific fields are optional pointers, when omitted, the Pismo platform follows the normal fallback sequence, moving from the account level to the program and then to the product defaults.",
        "required": [
          "waived"
        ],
        "properties": {
          "waived": {
            "type": "boolean",
            "description": "`true` = fully exempt; `false` = penalty active (customize via the fields below)."
          },
          "duration_days": {
            "type": "integer",
            "minimum": 0
          },
          "penalty_interest_days": {
            "type": "integer",
            "minimum": 0
          },
          "valid_until": {
            "type": "string",
            "format": "date-time",
            "description": "Schedules the revert of this override via EventBridge. This value must be a future date and follows the ISO 8601 standard."
          }
        }
      },
      "EarlyWithdrawalAfterOpeningOverrideRequest": {
        "type": "object",
        "description": "Override for early withdrawal after account opening.",
        "required": [
          "waived"
        ],
        "properties": {
          "waived": {
            "type": "boolean"
          },
          "applicable_within_days": {
            "type": "integer",
            "minimum": 0
          },
          "penalty_interest_days": {
            "type": "integer",
            "minimum": 0
          },
          "valid_until": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "WithdrawalFeeOverrideRequest": {
        "type": "object",
        "description": "Withdrawal fee override.",
        "required": [
          "waived"
        ],
        "properties": {
          "waived": {
            "type": "boolean"
          },
          "type": {
            "type": "string",
            "enum": [
              "PERCENTAGE",
              "FIXED"
            ]
          },
          "value": {
            "type": "number",
            "minimum": 0,
            "exclusiveMinimum": true
          },
          "valid_until": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TieredInterestForfeitureOverrideRequest": {
        "type": "object",
        "description": "Tiered interest forfeiture override. Tiers replace the product's tiers when provided.",
        "required": [
          "waived"
        ],
        "properties": {
          "waived": {
            "type": "boolean"
          },
          "tiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TieredInterestForfeitureTierRequest"
            }
          },
          "valid_until": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "TieredInterestForfeitureTierRequest": {
        "type": "object",
        "required": [
          "min_days_held",
          "forfeited_interest_days"
        ],
        "properties": {
          "min_days_held": {
            "type": "integer",
            "minimum": 0
          },
          "max_days_held": {
            "type": "integer",
            "minimum": 0,
            "description": "Optional. Open-ended tier when omitted."
          },
          "forfeited_interest_days": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "SubsequentWithdrawalsOverrideRequest": {
        "type": "object",
        "description": "Subsequent withdrawals (Regulation D) override.",
        "required": [
          "waived"
        ],
        "properties": {
          "waived": {
            "type": "boolean"
          },
          "applicable_within_days": {
            "type": "integer",
            "minimum": 1
          },
          "penalty_interest_days": {
            "type": "integer",
            "minimum": 1
          },
          "window_behavior": {
            "type": "string",
            "enum": [
              "ROLLING",
              "FIXED"
            ]
          },
          "valid_until": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "UnifiedDepositOpenRequest": {
        "type": "object",
        "required": [
          "account",
          "deposit_attachment"
        ],
        "description": "Creates or locates a deposit account and attaches a deposit product in a single request.\n",
        "properties": {
          "account": {
            "$ref": "#/components/schemas/UnifiedOpenAccount"
          },
          "deposit_attachment": {
            "$ref": "#/components/schemas/UnifiedOpenDepositAttachment"
          },
          "account_creation": {
            "$ref": "#/components/schemas/UnifiedOpenAccountCreation"
          },
          "metadata": {
            "type": "object",
            "description": "The metadata object contains user-defined key-value pairs that provide additional context or custom information.<br>\nMetadata content is not controlled by the Pismo platform and is instead controlled by the user.<br>\n\n**Note**: This field must not be used to send Personally Identifiable Information (PII), Payment Card Industry (PCI) data, or any sensitive/regulated information. Metadata fields are intended for operational, non-sensitive data only. For sensitive data, use the specific parameters designed for that purpose. For more information, refer to [Get started with Pismo APIs](https://developers.pismo.io/pismo-docs/reference/get-started-with-pismo-apis).\n",
            "example": {
              "key": "value"
            }
          }
        }
      },
      "UnifiedOpenAccount": {
        "type": "object",
        "required": [
          "external_account_id"
        ],
        "description": "Identifies the account to which the deposit product is attached",
        "properties": {
          "external_account_id": {
            "type": "string",
            "description": "The external account ID identifies the transaction banking account. The Pismo platform uses this ID to find the account via the transaction banking API and attach the specified deposit product.\n",
            "example": "ext-acct-001"
          },
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Pismo account ID. When provided, the Pismo platform locates the account using `external_account_id` and validates the ID.\nIf omitted, the Pismo platform uses `account_creation` to create a new account.\n",
            "example": 123456
          }
        }
      },
      "UnifiedOpenAccountCreation": {
        "type": "object",
        "required": [
          "program_id",
          "division_code",
          "applicant"
        ],
        "description": "Account creation parameters. Required when `account.account_id` is not provided.\nPismo platform uses these fields to create a new transaction banking account via the transaction banking API.\n",
        "properties": {
          "program_id": {
            "type": "integer",
            "format": "int64",
            "description": "Program ID to associate the new account with",
            "example": 100
          },
          "division_code": {
            "type": "string",
            "description": "Division code for the new account",
            "example": "001"
          },
          "applicant": {
            "$ref": "#/components/schemas/UnifiedOpenApplicant"
          },
          "currency_code": {
            "type": "string",
            "description": "ISO 4217 currency code for the account. If omitted, the default currency for the program is used.",
            "example": "USD"
          },
          "account_creation_datetime": {
            "type": "string",
            "format": "date-time",
            "minLength": 24,
            "maxLength": 24,
            "description": "Account creation timestamp is passed directly to the transaction‑banking API as an ISO 8601 value (`yyyy‑mm‑ddThh:mm:ss.sssZ`, 24 characters). The field is optional and omitted when not supplied, and all validation is handled by the transaction banking API.",
            "example": "2026-06-24T14:49:36.017Z"
          }
        }
      },
      "UnifiedOpenApplicant": {
        "type": "object",
        "required": [
          "document_number",
          "name"
        ],
        "description": "Applicant information for account creation",
        "properties": {
          "document_number": {
            "type": "string",
            "description": "Applicant document number. For example, CPF or the US social security number.",
            "example": "12345678900"
          },
          "name": {
            "type": "string",
            "description": "Applicant's full name",
            "example": "John Doe"
          }
        }
      },
      "UnifiedOpenDepositAttachment": {
        "type": "object",
        "required": [
          "product_id"
        ],
        "description": "Deposit product attachment configuration",
        "properties": {
          "product_id": {
            "type": "string",
            "description": "Product ID of the deposit product to attach",
            "example": "2c336e9d-d04f-4fd0-8f6e-25808f48d70c"
          },
          "deposit_configs": {
            "$ref": "#/components/schemas/DepositConfigs"
          }
        }
      },
      "UnifiedDepositOpenResponse": {
        "type": "object",
        "description": "Response returned after successfully opening a deposit account and attaching a product",
        "properties": {
          "account_id": {
            "type": "integer",
            "format": "int64",
            "description": "Pismo account ID (new or existing)",
            "example": 123456
          },
          "external_account_id": {
            "type": "string",
            "description": "External account ID",
            "example": "ext-acct-001"
          },
          "product_id": {
            "type": "string",
            "description": "Product ID of the attached deposit product",
            "example": "2c336e9d-d04f-4fd0-8f6e-25808f48d70c"
          },
          "deposit_configs": {
            "type": "object",
            "description": "Deposit configuration after attachment",
            "properties": {
              "maturity_period": {
                "$ref": "#/components/schemas/MaturityPeriod"
              },
              "renewal_term": {
                "type": "object",
                "description": "Renewal term configuration, present only when the override includes a renewal term.",
                "properties": {
                  "unit": {
                    "$ref": "#/components/schemas/MaturityPeriodUnit"
                  },
                  "value": {
                    "$ref": "#/components/schemas/MaturityPeriodValue"
                  },
                  "renewal_calendar_maturity_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Explicit renewal maturity date",
                    "example": "2028-06-15"
                  }
                }
              },
              "payout_account": {
                "$ref": "#/components/schemas/PayoutAccount"
              },
              "maturity_instructions": {
                "$ref": "#/components/schemas/MaturityInstructionsOverrideRequest"
              },
              "penalties": {
                "$ref": "#/components/schemas/PenaltiesOverrideRequest"
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "paths": {
    "/v1/deposits/accounts/open": {
      "post": {
        "tags": [
          "Deposit account open"
        ],
        "summary": "Open deposit account",
        "description": "Creates or locates a transaction banking account and attaches a validated deposit product in a single request. When the operation succeeds, the Pismo platform generates the [Deposit account opened](https://developers.pismo.io/events/docs/deposit-product-deposit-account-opened-1) and [Account attached](https://developers.pismo.io/events/docs/deposit-product-account-attach-1) events.\n\nThis endpoint supports two scenarios:\n\n* **Existing account**: Provide both `account.account_id` and `account.external_account_id`. The Pismo platform locates the account via the transaction banking API and validates the IDs. If there is a mismatch, the request fails with a `400` error.\n\n* **New account**: Provide `account.external_account_id` and the `account_creation` object. The Pismo platform creates a new transaction banking account and attaches the deposit product. If the transaction banking API returns `409` because the account already exists, the Pismo platform locates the existing account and proceeds with product attachment.\n\n**Note**: The deposit product must exist, be of type `deposit`, and have an `ACTIVE` status.\n",
        "operationId": "interest-bearing-v1-deposit-account-open",
        "parameters": [
          {
            "$ref": "#/components/parameters/authorizationTokenHeader"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UnifiedDepositOpenRequest"
              },
              "examples": {
                "newAccount": {
                  "summary": "Create new account and attach deposit",
                  "value": {
                    "account": {
                      "external_account_id": "ext-acct-001"
                    },
                    "account_creation": {
                      "program_id": 100,
                      "currency_code": "USD",
                      "division_code": "001",
                      "applicant": {
                        "document_number": "12345678900",
                        "name": "John Doe"
                      }
                    },
                    "deposit_attachment": {
                      "product_id": "2c336e9d-d04f-4fd0-8f6e-25808f48d70c",
                      "deposit_configs": {
                        "maturity_period": {
                          "unit": "MONTHS",
                          "value": 6
                        }
                      }
                    },
                    "metadata": {
                      "source": "mobile-app"
                    }
                  }
                },
                "existingAccount": {
                  "summary": "Attach deposit to existing account",
                  "value": {
                    "account": {
                      "account_id": 123456,
                      "external_account_id": "ext-acct-001"
                    },
                    "deposit_attachment": {
                      "product_id": "2c336e9d-d04f-4fd0-8f6e-25808f48d70c",
                      "deposit_configs": {
                        "maturity_period": {
                          "calendar_maturity_date": "2027-06-15"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Deposit account opened successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnifiedDepositOpenResponse"
                },
                "examples": {
                  "success": {
                    "summary": "Successful response",
                    "value": {
                      "account_id": 123456,
                      "external_account_id": "ext-acct-001",
                      "product_id": "2c336e9d-d04f-4fd0-8f6e-25808f48d70c",
                      "deposit_configs": {
                        "maturity_period": {
                          "unit": "MONTHS",
                          "value": 6
                        },
                        "payout_account": {
                          "type": "EXTERNAL",
                          "external_account": {
                            "account_number": "123456789",
                            "bank_code": "001"
                          }
                        },
                        "maturity_instructions": {
                          "principal": "ROLLOVER",
                          "interest": "PAY",
                          "reason": "VIP retention package"
                        },
                        "penalties": {
                          "reason": "VIP retention package",
                          "grace_period": {
                            "waived": false,
                            "duration_days": 10,
                            "penalty_interest_days": 15
                          },
                          "early_withdrawal_after_opening": {
                            "waived": false,
                            "applicable_within_days": 30,
                            "penalty_interest_days": 90
                          },
                          "withdrawal_fee": {
                            "waived": false,
                            "type": "PERCENTAGE",
                            "value": 2.5
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                },
                "examples": {
                  "validationError": {
                    "summary": "Request body validation error",
                    "value": {
                      "code": "EIBACC0008",
                      "message": "Bad Request",
                      "details": "error EIBACC0008: Validation error [(Field 'external_account_id' is required)]"
                    }
                  },
                  "accountCreationRequired": {
                    "summary": "account_creation is required when account_id is not provided",
                    "value": {
                      "code": "EIBACC0325",
                      "message": "Field 'account_creation' is required when 'account_id' is not provided"
                    }
                  },
                  "accountMismatch": {
                    "summary": "Provided account_id does not match external_account_id",
                    "value": {
                      "code": "EIBACC0407",
                      "message": "Provided account_id does not match the resolved external_account_id"
                    }
                  },
                  "productNotActive": {
                    "summary": "Product is not in ACTIVE status",
                    "value": {
                      "code": "EIBACC0108",
                      "message": "Product isn't ACTIVE. Activate to proceed with the attachment"
                    }
                  },
                  "corporateValidationError": {
                    "summary": "Corporate API validation error",
                    "value": {
                      "code": "EIBACC0321",
                      "message": "Corporate API validation error"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                },
                "examples": {
                  "missingTenantHeader": {
                    "summary": "Missing tenant header",
                    "value": {
                      "code": "EIBACC0005",
                      "message": "Missing required header: 'x-tenant'"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                },
                "examples": {
                  "productNotFound": {
                    "summary": "Product not found",
                    "value": {
                      "code": "EIBACC0064",
                      "message": "Product not found"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                },
                "examples": {
                  "accountAlreadyAttached": {
                    "summary": "Account already has a product attached",
                    "value": {
                      "code": "EIBACC0106",
                      "message": "The product ID provided is already attached"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                },
                "examples": {
                  "internalError": {
                    "summary": "Internal processing error",
                    "value": {
                      "code": "EIBACC0007",
                      "message": "Internal error"
                    }
                  },
                  "getProductError": {
                    "summary": "Failed to retrieve product",
                    "value": {
                      "code": "EIBACC0066",
                      "message": "Failed on get product"
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                },
                "examples": {
                  "corporateUnavailable": {
                    "summary": "Corporate API unavailable",
                    "value": {
                      "code": "EIBACC0322",
                      "message": "Corporate API unavailable"
                    }
                  }
                }
              }
            }
          },
          "504": {
            "description": "Gateway Timeout",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                },
                "examples": {
                  "corporateTimeout": {
                    "summary": "Corporate API timeout",
                    "value": {
                      "code": "EIBACC0318",
                      "message": "Corporate API timeout"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ]
}
```