{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tip4serv-com/json-schema/tip4serv-com-payment-general-schema.json",
  "title": "PaymentGeneral",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tip4serv-com-openapi.json#/components/schemas/PaymentGeneral",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Unique identifier of the payment."
    },
    "transaction_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Gateway transaction reference: PayPal transaction ID or Stripe PaymentIntent ID."
    },
    "gateway": {
      "type": "string",
      "description": "Gateway used for the payment. Accepted values: `PayPal`, `Stripe\n"
    },
    "status": {
      "type": "string",
      "description": "Status of the payment. Accepted values: `Processed`, `Paid`, `Refunded`, `Pending`, `Refused`"
    },
    "cart": {
      "type": "string",
      "description": "The products name which were bought in the payment."
    },
    "sub_id": {
      "type": "number",
      "description": "Eventual subscription id to which the payment is related to."
    },
    "date": {
      "type": "number",
      "description": "Payment creation timestamp expressed in your store timezone."
    },
    "amount": {
      "type": "number",
      "description": "Amount which was paid by the customer in the payment."
    },
    "currency": {
      "type": "string",
      "description": "Currency which was used for the payment."
    },
    "received_gross_amount": {
      "type": [
        "number",
        "null"
      ],
      "description": "Gross amount received in the settlement account, expressed in received_currency. If is_tip4serv_fee is true, the amount is collected by Tip4Serv in its PayPal account, not the seller's account."
    },
    "received_net_amount": {
      "type": [
        "number",
        "null"
      ],
      "description": "Net amount recorded for the settlement account, expressed in received_currency. If is_tip4serv_fee is true, the payment is collected by Tip4Serv in its PayPal account, not the seller's account."
    },
    "received_currency": {
      "type": [
        "string",
        "null"
      ],
      "description": "Currency used for received_gross_amount, received_net_amount, and settlement fees where applicable."
    },
    "exchange_rate": {
      "type": [
        "number",
        "null"
      ],
      "description": "Exchange rate recorded for the payment conversion, when available."
    },
    "tax": {
      "type": [
        "number",
        "null"
      ],
      "description": "Tax collected for the payment, expressed in currency."
    },
    "gateway_fee": {
      "type": [
        "number",
        "null"
      ],
      "description": "Payment gateway fee recorded for the payment, when available."
    },
    "tip4serv_fee": {
      "type": [
        "number",
        "null"
      ],
      "description": "Tip4Serv fee recorded for the payment, expressed in received_currency when available."
    },
    "is_tip4serv_fee": {
      "type": "boolean",
      "description": "True when the payment is collected entirely by Tip4Serv into its PayPal account, rather than into the seller's account."
    },
    "country": {
      "type": [
        "string",
        "null"
      ],
      "description": "Customer country recorded for the payment."
    },
    "state": {
      "type": [
        "string",
        "null"
      ],
      "description": "Customer state, province, or region recorded for the payment."
    },
    "username": {
      "type": "string",
      "description": "Username which was used for the payment."
    },
    "identifier": {
      "type": "string",
      "description": "Identifier used for identifying the user. \n**Accepted identifiers:**  \n`email`, `username`, `eosid`, `ue4_id`, `steam_id`, `player_id`,  \n`minecraft_uuid`, `discord_id`,`fivem_citizen_id`, `minecraft_username`.\n"
    },
    "player_id": {
      "type": "string",
      "description": "Raw generic player identifier, without its type prefix."
    },
    "details_page": {
      "type": "string",
      "description": "View more details about the payment on this page."
    }
  },
  "required": [
    "id",
    "status",
    "mode",
    "date",
    "amount",
    "currency",
    "username",
    "identifier",
    "gateway"
  ]
}