{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gsma/json-schema/gsma-response-bill-payment-schema.json",
  "title": "responseBillPayment",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gsma-bills-api-openapi.yml#/components/schemas/responseBillPayment",
  "type": "object",
  "required": [
    "currency",
    "amountPaid",
    "billPaymentStatus"
  ],
  "properties": {
    "serviceProviderPaymentReference": {
      "$ref": "#/$defs/serviceProviderPaymentReference"
    },
    "requestingOrganisationTransactionReference": {
      "$ref": "#/$defs/requestingOrganisationTransactionReference"
    },
    "customerReference": {
      "$ref": "#/$defs/customerReference"
    },
    "paymentType": {
      "description": "Describes the type of Bill Payment, i.e. whether a full or partial payment.",
      "allOf": [
        {
          "$ref": "#/$defs/paymentType"
        }
      ]
    },
    "billPaymentStatus": {
      "$ref": "#/$defs/billPaymentStatus"
    },
    "amountPaid": {
      "description": "Amount of the Bill that is being paid",
      "allOf": [
        {
          "$ref": "#/$defs/amount"
        }
      ]
    },
    "currency": {
      "description": "Currency of the amount that is being paid.",
      "allOf": [
        {
          "$ref": "#/$defs/currency"
        }
      ]
    },
    "requestingOrganisation": {
      "$ref": "#/$defs/requestingOrganisationBillPay"
    },
    "supplementaryBillReferenceDetails": {
      "$ref": "#/$defs/supplementaryBillReferenceDetailsArray"
    },
    "serviceProviderComment": {
      "$ref": "#/$defs/serviceProviderComment"
    },
    "serviceProviderNotification": {
      "$ref": "#/$defs/serviceProviderNotification"
    },
    "requestDate": {
      "$ref": "#/$defs/requestDate"
    },
    "creationDate": {
      "$ref": "#/$defs/creationDate"
    },
    "modificationDate": {
      "$ref": "#/$defs/modificationDate"
    },
    "customData": {
      "$ref": "#/$defs/customDataArray"
    },
    "metadata": {
      "$ref": "#/$defs/metadataArray"
    },
    "paidAmount": {
      "description": "Amount of the Bill that is being paid",
      "allOf": [
        {
          "$ref": "#/$defs/amount"
        }
      ],
      "deprecated": true
    }
  },
  "$defs": {
    "amount": {
      "type": "string",
      "minLength": 1,
      "maxLength": 23,
      "pattern": "^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[0-9])?$"
    },
    "billPaymentStatus": {
      "type": "string",
      "description": "Indicates the status of the bill payment as stored by the API provider.",
      "minLength": 0,
      "maxLength": 256
    },
    "creationDate": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time when the object was created by the API Provider."
    },
    "currency": {
      "type": "string",
      "enum": [
        "AED",
        "AFN",
        "ALL",
        "AMD",
        "ANG",
        "AOA",
        "ARS",
        "AUD",
        "AWG",
        "AZN",
        "BAM",
        "BBD",
        "BDT",
        "BGN",
        "BHD",
        "BIF",
        "BMD",
        "BND",
        "BOB",
        "BOV",
        "BRL",
        "BSD",
        "BTN",
        "BWP",
        "BYN",
        "BZD",
        "CAD",
        "CDF",
        "CHE",
        "CHF",
        "CHW",
        "CLF",
        "CLP",
        "CNY",
        "COP",
        "COU",
        "CRC",
        "CUC",
        "CUP",
        "CVE",
        "CZK",
        "DJF",
        "DKK",
        "DOP",
        "DZD",
        "EGP",
        "ERN",
        "ETB",
        "EUR",
        "FJD",
        "FKP",
        "GBP",
        "GEL",
        "GHS",
        "GIP",
        "GMD",
        "GNF",
        "GTQ",
        "GYD",
        "HKD",
        "HNL",
        "HRK",
        "HTG",
        "HUF",
        "IDR",
        "ILS",
        "INR",
        "IQD",
        "IRR",
        "ISK",
        "JMD",
        "JOD",
        "JPY",
        "KES",
        "KGS",
        "KHR",
        "KMF",
        "KPW",
        "KRW",
        "KWD",
        "KYD",
        "KZT",
        "LAK",
        "LBP",
        "LKR",
        "LRD",
        "LSL",
        "LYD",
        "MAD",
        "MDL",
        "MGA",
        "MKD",
        "MMK",
        "MNT",
        "MOP",
        "MRO",
        "MUR",
        "MVR",
        "MWK",
        "MXN",
        "MXV",
        "MYR",
        "MZN",
        "NAD",
        "NGN",
        "NIO",
        "NOK",
        "NPR",
        "NZD",
        "OMR",
        "PAB",
        "PEN",
        "PGK",
        "PHP",
        "PKR",
        "PLN",
        "PYG",
        "QAR",
        "RON",
        "RSD",
        "RUB",
        "RWF",
        "SAR",
        "SBD",
        "SCR",
        "SDG",
        "SEK",
        "SGD",
        "SHP",
        "SLL",
        "SOS",
        "SRD",
        "SSP",
        "STD",
        "SVC",
        "SYP",
        "SZL",
        "THB",
        "TJS",
        "TMT",
        "TND",
        "TOP",
        "TRY",
        "TTD",
        "TWD",
        "TZS",
        "UAH",
        "UGX",
        "USD",
        "USN",
        "UYI",
        "UYU",
        "UZS",
        "VEF",
        "VND",
        "VUV",
        "WST",
        "XAF",
        "XAG",
        "XAU",
        "XBA",
        "XBB",
        "XBC",
        "XBD",
        "XCD",
        "XDR",
        "XOF",
        "XPD",
        "XPF",
        "XPT",
        "XSU",
        "XTS",
        "XUA",
        "XXX",
        "YER",
        "ZAR",
        "ZMW",
        "ZWL"
      ]
    },
    "customData": {
      "type": "object",
      "required": [
        "key",
        "value"
      ],
      "properties": {
        "key": {
          "type": "string",
          "description": "Identifies the type of additional field.",
          "minLength": 1,
          "maxLength": 256
        },
        "value": {
          "type": "string",
          "description": "Identifies the value of the additional field.",
          "minLength": 1,
          "maxLength": 256
        }
      }
    },
    "customDataArray": {
      "type": "array",
      "description": "A collection of key/value pairs. These can be used to populate provider specific fields.",
      "items": {
        "$ref": "#/$defs/customData"
      },
      "maxItems": 20
    },
    "customerReference": {
      "type": "string",
      "description": "Textual reference provided by the customer paying the bill.",
      "minLength": 0,
      "maxLength": 256
    },
    "metadata": {
      "type": "object",
      "required": [
        "key",
        "value"
      ],
      "properties": {
        "key": {
          "type": "string",
          "description": "Identifies the type of additional field.",
          "minLength": 1,
          "maxLength": 256
        },
        "value": {
          "type": "string",
          "description": "Identifies the value of the additional field.",
          "minLength": 1,
          "maxLength": 256
        }
      }
    },
    "metadataArray": {
      "type": "array",
      "description": "A collection of key/value pairs. These can be used to populate additional properties that describe administrative information regarding the resource.",
      "items": {
        "$ref": "#/$defs/metadata"
      },
      "maxItems": 20
    },
    "modificationDate": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time when the object was modified by the API Provider."
    },
    "paymentType": {
      "type": "string",
      "enum": [
        "partialpayment",
        "fullpayment"
      ]
    },
    "requestDate": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time of the request as supplied by the client."
    },
    "requestingOrganisationBillPay": {
      "type": "string",
      "description": "The originating mobile money provider or financial institution that holds the wallet/account of the payer.",
      "minLength": 0,
      "maxLength": 256
    },
    "requestingOrganisationTransactionReference": {
      "type": "string",
      "description": "A reference provided by the requesting organisation that is to be associated with the transaction.",
      "minLength": 0,
      "maxLength": 256
    },
    "serviceProviderComment": {
      "type": "string",
      "description": "Allows the Service Provider to include specific information regarding the bill payment.",
      "minLength": 0,
      "maxLength": 256
    },
    "serviceProviderNotification": {
      "type": "string",
      "description": "Allows the Service Provider to include specific information that will be included on the notification to the customer by the mobile money provider.",
      "minLength": 0,
      "maxLength": 256
    },
    "serviceProviderPaymentReference": {
      "type": "string",
      "description": "Reference for the payment generated by the service provider.",
      "minLength": 0,
      "maxLength": 256
    },
    "supplementaryBillReferenceDetails": {
      "type": "object",
      "required": [
        "paymentReferenceType",
        "paymentReferenceValue"
      ],
      "properties": {
        "paymentReferenceType": {
          "type": "string",
          "description": "Identifies the type of the additional payment reference.",
          "minLength": 1,
          "maxLength": 256
        },
        "paymentReferenceValue": {
          "type": "string",
          "description": "Identifies the value of the additional payment reference.",
          "minLength": 1,
          "maxLength": 256
        }
      }
    },
    "supplementaryBillReferenceDetailsArray": {
      "type": "array",
      "description": "In some cases, a single reference is not sufficient to identify a bill. This key-value collection enables further reference information to be supplied.",
      "items": {
        "$ref": "#/$defs/supplementaryBillReferenceDetails"
      },
      "maxItems": 20
    }
  }
}