{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/woolworths-group/main/json-schema/woolworths-group-merchant-api-application-commands-merchant-initiate-payment-merchant-initiate-payment-command-schema.json",
  "title": "InitiatePayment",
  "description": "The payment details.",
  "x-generated": "2026-10-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/woolworths-group-wpay-payto-merchant-openapi.yml#/components/schemas/Merchant.API.Application.Commands.MerchantInitiatePayment.MerchantInitiatePaymentCommand",
  "required": [
    "amount",
    "paymentId"
  ],
  "type": "object",
  "properties": {
    "paymentId": {
      "minLength": 1,
      "type": "string",
      "description": "Merchant's unique payment identifier."
    },
    "amount": {
      "maximum": 100000000,
      "minimum": 1,
      "type": "integer",
      "description": "Payment amount in cents. Value must be greater than zero.",
      "format": "int32"
    },
    "reference": {
      "maxLength": 35,
      "minLength": 1,
      "type": [
        "string",
        "null"
      ],
      "description": "The order or purchase or reference number that is provided to consumer during checkout.<br/>Note: this value will be visible to consumers in their banking statements."
    },
    "description": {
      "maxLength": 280,
      "minLength": 1,
      "type": [
        "string",
        "null"
      ],
      "description": "Additional free form payment description that can be included for the consumer in the payment.<br/>Note: this value will be visible to consumers in their banking statements."
    },
    "creditorReference": {
      "type": [
        "string",
        "null"
      ],
      "description": "A backoffice only reference that can be used to aid in creditor's reconciliation activities.<br/>Note: this value will only be visible in creditor's corporate banking statement."
    },
    "merchantWebhooksUrl": {
      "type": [
        "string",
        "null"
      ],
      "description": "The Merchant's supplied URL that should receive webhooks for this payment."
    },
    "simulation": {
      "$ref": "#/$defs/Merchant.API.RequestDtos.CreateSession.PaymentSimulationDto"
    },
    "merchantDefinedData": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "type": "string"
      },
      "description": "An optional object for passing any additional key-value pairs that might be useful to the merchant."
    }
  },
  "additionalProperties": false,
  "$defs": {
    "Merchant.API.RequestDtos.CreateSession.PaymentSimulationDto": {
      "required": [
        "simulate"
      ],
      "type": "object",
      "properties": {
        "simulate": {
          "minLength": 1,
          "type": "string",
          "description": "The simulation being requested. Please refer to the developer guide for a list of all available simulations."
        },
        "delay": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The delay in seconds before the requested simulation is executed.",
          "format": "int32"
        }
      },
      "additionalProperties": false,
      "description": "A sandbox only parameter than allows you to simulate the outcome of this payment. Please refer to the developer guide for more info."
    }
  }
}