{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/telenor-sverige/json-schema/telenor-sverige-refund-schema.json",
  "title": "Refund",
  "x-generated": "2026-10-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/telenor-sverige-content-charger-openapi.yml#/components/schemas/Refund",
  "required": [
    "clientTransactionId",
    "contentProviderId",
    "password",
    "referenceTransactionId"
  ],
  "type": "object",
  "properties": {
    "contentProviderId": {
      "type": "string",
      "maxLength": 10,
      "description": "The content provider’s ID received from Telenor when the Content Charger agreement has been signed."
    },
    "password": {
      "type": "string",
      "minLength": 16,
      "maxLength": 20,
      "description": "Password provided by Telenor."
    },
    "clientTransactionId": {
      "type": "string",
      "maxLength": 50,
      "description": "For the content provider’s own convenience and for transaction safety. Transferred from the request to the response to help the\ncontent provider match a response to a request.\n"
    },
    "referenceTransactionId": {
      "type": "string",
      "minLength": 6,
      "maxLength": 15,
      "description": "Identifies the transaction request to be refunded. This is the ID sent by Telenor in the TransactionID field of the charge response.\n"
    },
    "amount": {
      "type": "string",
      "description": "1. The amount including VAT in the selected currency. The unit is 100 times the currency.\nFor example, the end-user price 3 SEK is sent as the amount 300. <br>\n2. A \"Full Refund\" is triggered when the quantity and amount fields are left empty in the request.\n3. In case of partial refunds, use this amount field only if there was no quantity sent in the corresponding charge transaction.\n4. Multiple partial refunds are supported until the total remaining amount reaches zero.\n5. If a partial refund has already been processed, a \"Full Refund\" request (empty fields) will return an error.\n6. If a partial refund is already performed and the rest of the balance needs to be refunded, then the API expects the specific remaining amount or quantity instead of leaving the field empty.\n"
    },
    "quantity": {
      "type": "integer",
      "description": "1. It should be a number between 1 and 99999. It supports a precision of upto 2 decimal places.\n2. Multiple partial refunds are supported until the total remaining quantity reaches zero.\n"
    }
  }
}