{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/clickatell/main/json-schema/clickatell-send-payment-outcome-request-schema.json",
  "title": "SendPaymentOutcomeRequest",
  "x-generated": "2026-10-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clickatell-chat-2-pay-api-client-callbacks-openapi.json#/components/schemas/SendPaymentOutcomeRequest",
  "type": "object",
  "properties": {
    "orderNo": {
      "type": "string",
      "description": "The order number associated with the payment"
    },
    "paymentLinkRef": {
      "type": "string",
      "description": "The payment link reference of the transaction you requested the details for"
    },
    "from": {
      "type": "string",
      "description": "The mobile number of the sender used when sending payment link."
    },
    "to": {
      "type": "string",
      "description": "The end-user’s mobile number that the payment link was sent to (In international format, e.g., 27831234567)."
    },
    "paymentStatus": {
      "type": "string",
      "description": "The new status of the payment"
    },
    "paymentStatusId": {
      "type": "string",
      "description": "The ID of the payment status"
    },
    "currency": {
      "type": "string",
      "description": "The currency that the transaction was conducted in"
    },
    "totalAmount": {
      "type": "number",
      "description": "The total amount of the transaction"
    },
    "additionalData": {
      "type": "string",
      "description": "Any additional data over and above what is already included that you want to store in the database along with that record and/or return in the response"
    },
    "paymentStatusConversionTime": {
      "type": "string",
      "description": "This field will contain the timestamp received from the Payment Gateway when a transaction which was in a Review status was finalized.\n"
    },
    "paymentStatuses": {
      "type": "array",
      "description": "The list of all payment status transitions",
      "items": {
        "$ref": "#/$defs/PaymentStatusLogResponse"
      }
    },
    "environment": {
      "type": "string",
      "description": "Chat 2 Pay configuration run environment (SANDBOX or PRODUCTION)"
    }
  },
  "$defs": {
    "PaymentStatusLogResponse": {
      "type": "object",
      "properties": {
        "transactionType": {
          "type": "string",
          "description": "The type of transaction executed",
          "enum": [
            "TransactionType.AUTHORIZATION(name=Authorization, id=1)",
            "TransactionType.SALE(name=Sale, id=2)",
            "TransactionType.VOID(name=Void, id=3)",
            "TransactionType.CAPTURE(name=Capture, id=4)"
          ]
        },
        "totalAmount": {
          "type": "number",
          "description": "The total amount of the transaction"
        },
        "paymentGatewayDecision": {
          "type": "string",
          "description": "Decision received back from the Payment Gateway for the payment request"
        },
        "paymentGatewayReqReferenceNumber": {
          "type": "string",
          "description": "Payment Reference number received back from the Payment Gateway for the payment request"
        },
        "paymentGatewayResponseTimestamp": {
          "type": "string",
          "description": "Timestamp received back from the Payment Gateway for the payment request",
          "format": "date-time"
        },
        "paymentGatewayResponseCode": {
          "type": "integer",
          "description": "Response code received back from the Payment Gateway for the payment request",
          "format": "int32"
        },
        "paymentGatewayErrorDecision": {
          "type": "string",
          "description": "Error description received back from Payment Gateway if error occurred"
        },
        "paymentGatewayAuthReconciliationReferenceNumber": {
          "type": "string",
          "description": "Unique number generated by Payment Gateway to identify the transaction for the payment request"
        },
        "cardType": {
          "type": "string",
          "description": "The type of card used for the transaction, as received back from the Payment Gateway for the payment request"
        },
        "maskedCardNumber": {
          "type": "string",
          "description": "The masked card number used for the transaction, as received back from the Payment Gateway for the payment request\n"
        },
        "cardExpiryDate": {
          "type": "string",
          "description": "The expiry date of the card used for the payment, as received back from the Payment Gateway for the payment request\n"
        }
      },
      "description": "The list of all payment status transitions"
    }
  }
}