{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lemonway/json-schema/lemonway-init-apm-transaction-input-schema.json",
  "title": "InitApmTransactionInput",
  "description": "Represents the input data for initializing an APM transaction.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lemonway-moneyins-apm-api-openapi.yml#/components/schemas/InitApmTransactionInput",
  "type": "object",
  "properties": {
    "transaction": {
      "$ref": "#/$defs/ApmTransaction"
    },
    "paymentUrls": {
      "$ref": "#/$defs/PaymentUrls"
    },
    "customer": {
      "$ref": "#/$defs/ApmCustomer"
    },
    "preferredLanguage": {
      "description": "Preferred language for the payment flow (e.g., fr, nl, de, en).",
      "type": "string"
    },
    "appToAppUrl": {
      "description": "URL used for app-to-app redirection.",
      "type": "string"
    },
    "timeoutInMinutes": {
      "format": "int32",
      "description": "Timeout for the transaction in minutes.",
      "type": "integer"
    }
  },
  "$defs": {
    "ApmCustomer": {
      "description": "Customer",
      "required": [
        "firstName",
        "lastName",
        "countryCode"
      ],
      "type": "object",
      "properties": {
        "civility": {
          "description": "Civility",
          "type": "string"
        },
        "gender": {
          "format": "int32",
          "description": "Gender<br/>1 = Male.<br/>2 = Female.<br/>",
          "enum": [
            1,
            2
          ],
          "type": "integer"
        },
        "firstName": {
          "description": "FirstName (required)",
          "type": "string"
        },
        "lastName": {
          "description": "LastName (required)",
          "type": "string"
        },
        "email": {
          "description": "Email",
          "type": "string"
        },
        "mobilePhone": {
          "description": "MobilePhone",
          "type": "string"
        },
        "birthDate": {
          "description": "BirthDate",
          "type": "string"
        },
        "countryCode": {
          "description": "Country code of the payer (required).\nFor iDEAL: only NL is accepted.\nFor Bancontact: only BE is accepted.",
          "type": "string"
        }
      }
    },
    "ApmRedirections": {
      "description": "Redirections",
      "type": "object",
      "properties": {
        "returnUrl": {
          "description": "Gets the URL to which the user will be redirected after a successful payment.\nReturnUrl",
          "type": "string"
        },
        "errorUrl": {
          "description": "Gets the URL to which the user will be redirected if the payment fails.\nErrorUrl",
          "type": "string"
        },
        "cancelUrl": {
          "description": "Gets the URL to which the user will be redirected if the payment is canceled.\nCancelUrl",
          "type": "string"
        }
      }
    },
    "ApmTransaction": {
      "description": "Transaction",
      "required": [
        "PaymentMethod",
        "totalAmount",
        "accountId"
      ],
      "type": "object",
      "properties": {
        "reference": {
          "description": "Reference",
          "type": "string"
        },
        "accountId": {
          "description": "AccountId (required)",
          "type": "string"
        },
        "totalAmount": {
          "format": "int32",
          "description": "TotalAmount (required)",
          "type": "integer"
        },
        "PaymentMethod": {
          "description": "PaymentMethod: ideal/bancontact",
          "type": "string"
        },
        "commissionAmount": {
          "format": "int32",
          "description": "CommissionAmount",
          "type": "integer"
        },
        "comment": {
          "description": "Comment",
          "type": "string"
        },
        "autoCommission": {
          "description": "AutoCommission",
          "type": "boolean"
        }
      }
    },
    "PaymentUrls": {
      "description": "PaymentUrls",
      "type": "object",
      "properties": {
        "redirections": {
          "$ref": "#/$defs/ApmRedirections"
        }
      }
    }
  }
}