{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/meld/json-schema/meld-virtual-account-deposit-instructions-response-schema.json",
  "title": "VirtualAccountDepositInstructionsResponse",
  "description": "Standing virtual-account deposit instructions",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/meld-headless-api-openapi.yml#/components/schemas/VirtualAccountDepositInstructionsResponse",
  "type": "object",
  "properties": {
    "customerId": {
      "type": "string",
      "description": "Meld customer id",
      "minLength": 1
    },
    "depositInstructionsId": {
      "type": "string",
      "description": "Unique id for this deposit instruction row",
      "minLength": 1
    },
    "destinationCurrencyCode": {
      "type": "string",
      "description": "Destination cryptocurrency code",
      "minLength": 1
    },
    "destinationWalletAddress": {
      "type": "string",
      "description": "Destination wallet address for the purchased crypto",
      "minLength": 1
    },
    "paymentMethodType": {
      "type": "string",
      "description": "Type of the virtual account created",
      "enum": [
        "ACH",
        "SEPA",
        "PIX",
        "MOBILE_MONEY"
      ]
    },
    "receivingBankInformation": {
      "description": "Bank information for the fiat transfer; shape depends on paymentMethodType",
      "oneOf": [
        {
          "title": "AchReceivingBankInformation",
          "allOf": [
            {
              "$ref": "#/$defs/AchReceivingBankInformation"
            }
          ]
        },
        {
          "title": "MobileMoneyReceivingBankInformation",
          "allOf": [
            {
              "$ref": "#/$defs/MobileMoneyReceivingBankInformation"
            }
          ]
        },
        {
          "title": "PixReceivingBankInformation",
          "allOf": [
            {
              "$ref": "#/$defs/PixReceivingBankInformation"
            }
          ]
        },
        {
          "title": "SepaReceivingBankInformation",
          "allOf": [
            {
              "$ref": "#/$defs/SepaReceivingBankInformation"
            }
          ]
        }
      ]
    },
    "serviceProvider": {
      "type": "string",
      "description": "Service provider",
      "enum": [
        "NOAH",
        "DUENETWORK"
      ]
    },
    "serviceProviderDetails": {
      "type": "object",
      "additionalProperties": {},
      "description": "Raw provider-specific fields not mapped into receivingBankInformation"
    },
    "sourceCurrencyCode": {
      "type": "string",
      "description": "Source fiat currency code",
      "minLength": 1
    }
  },
  "required": [
    "customerId",
    "depositInstructionsId",
    "destinationCurrencyCode",
    "destinationWalletAddress",
    "paymentMethodType",
    "serviceProvider",
    "sourceCurrencyCode"
  ],
  "$defs": {
    "AchReceivingBankInformation": {
      "allOf": [
        {
          "$ref": "#/$defs/ReceivingBankInformation"
        },
        {
          "type": "object",
          "properties": {
            "accountNumber": {
              "type": "string",
              "description": "Bank account number"
            },
            "routingNumber": {
              "type": "string",
              "description": "Bank routing number"
            },
            "bankName": {
              "type": "string",
              "description": "Receiving bank name"
            },
            "accountHolderName": {
              "type": "string",
              "description": "Account holder name on the virtual account"
            }
          }
        }
      ],
      "description": "Receiving bank details for ACH"
    },
    "MobileMoneyReceivingBankInformation": {
      "allOf": [
        {
          "$ref": "#/$defs/ReceivingBankInformation"
        },
        {
          "type": "object",
          "properties": {
            "mobileMoneyReference": {
              "type": "string",
              "description": "Mobile money reference"
            },
            "bankName": {
              "type": "string",
              "description": "Receiving bank name"
            },
            "accountHolderName": {
              "type": "string",
              "description": "Account holder name on the virtual account"
            }
          }
        }
      ],
      "description": "Receiving bank details for mobile money"
    },
    "PixReceivingBankInformation": {
      "allOf": [
        {
          "$ref": "#/$defs/ReceivingBankInformation"
        },
        {
          "type": "object",
          "properties": {
            "pixKey": {
              "type": "string",
              "description": "PIX key"
            },
            "bankName": {
              "type": "string",
              "description": "Receiving bank name"
            },
            "accountHolderName": {
              "type": "string",
              "description": "Account holder name on the virtual account"
            }
          }
        }
      ],
      "description": "Receiving bank details for PIX"
    },
    "ReceivingBankInformation": {
      "properties": {
        "paymentMethodType": {
          "type": "string"
        }
      },
      "required": [
        "paymentMethodType"
      ]
    },
    "SepaReceivingBankInformation": {
      "allOf": [
        {
          "$ref": "#/$defs/ReceivingBankInformation"
        },
        {
          "type": "object",
          "properties": {
            "iban": {
              "type": "string",
              "description": "IBAN"
            },
            "bic": {
              "type": "string",
              "description": "BIC / SWIFT code when provided by the provider"
            },
            "bankName": {
              "type": "string",
              "description": "Receiving bank name"
            },
            "accountHolderName": {
              "type": "string",
              "description": "Account holder name on the virtual account"
            }
          }
        }
      ],
      "description": "Receiving bank details for SEPA"
    }
  }
}