{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/gnosis-pay/json-schema/gnosis-pay-get-user-statement-response-schema.json",
  "title": "GetUserStatementResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gnosis-pay-user-movements-api-openapi.yml#/components/schemas/GetUserStatementResponse",
  "type": "object",
  "required": [
    "data",
    "pagination"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/UserStatementItem"
      }
    },
    "pagination": {
      "$ref": "#/$defs/UserStatementPagination"
    }
  },
  "$defs": {
    "UserStatementBillingDetails": {
      "type": "object",
      "required": [
        "billingAmount",
        "billingCurrency"
      ],
      "properties": {
        "billingAmount": {
          "type": "string"
        },
        "billingCurrency": {
          "$ref": "#/$defs/UserStatementCurrencyMetadata"
        }
      }
    },
    "UserStatementCardTransaction": {
      "type": "object",
      "required": [
        "type",
        "id",
        "status",
        "amount",
        "currency",
        "decimals",
        "originalAmount",
        "originalCurrency",
        "originalDecimals",
        "isCredit",
        "createdAt",
        "updatedAt",
        "description",
        "authorizationId",
        "mcc",
        "authorizationCode",
        "merchant",
        "entryMode",
        "billing",
        "transactionCurrency",
        "cardId",
        "cardToken",
        "clearedAt",
        "isPending",
        "kind",
        "transactions",
        "declineReason",
        "wallet"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "card_transaction"
          ]
        },
        "id": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/UserStatementCardTransactionStatus"
        },
        "amount": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "decimals": {
          "type": "integer",
          "format": "int32"
        },
        "originalAmount": {
          "type": "string"
        },
        "originalCurrency": {
          "type": "string"
        },
        "originalDecimals": {
          "type": "integer",
          "format": "int32"
        },
        "isCredit": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "description": {
          "type": "string"
        },
        "authorizationId": {
          "type": "integer",
          "format": "int64"
        },
        "mcc": {
          "type": "string"
        },
        "authorizationCode": {
          "type": "string"
        },
        "merchant": {
          "$ref": "#/$defs/UserStatementMerchantDetails"
        },
        "entryMode": {
          "type": "string"
        },
        "billing": {
          "$ref": "#/$defs/UserStatementBillingDetails"
        },
        "transactionCurrency": {
          "$ref": "#/$defs/UserStatementCurrencyMetadata"
        },
        "cardId": {
          "$ref": "#/$defs/uuid"
        },
        "cardToken": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "clearedAt": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "isPending": {
          "type": "boolean"
        },
        "kind": {
          "$ref": "#/$defs/UserStatementTransactionKind"
        },
        "transactions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UserStatementTransactionExecutionDetail"
          }
        },
        "declineReason": {
          "anyOf": [
            {
              "$ref": "#/$defs/UserStatementDeclineReason"
            },
            {
              "type": "null"
            }
          ]
        },
        "wallet": {
          "anyOf": [
            {
              "$ref": "#/$defs/UserStatementWallet"
            },
            {
              "type": "null"
            }
          ]
        },
        "enrichment": {
          "anyOf": [
            {
              "$ref": "#/$defs/UserTransactionEnrichment"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "UserStatementCardTransactionStatus": {
      "type": "string",
      "enum": [
        "pending",
        "settled",
        "cancelled",
        "declined"
      ]
    },
    "UserStatementCurrencyMetadata": {
      "type": "object",
      "required": [
        "symbol",
        "code",
        "decimals",
        "name"
      ],
      "properties": {
        "symbol": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "code": {
          "type": "string"
        },
        "decimals": {
          "type": "integer",
          "format": "int32"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "UserStatementDeclineReason": {
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        }
      }
    },
    "UserStatementDeposit": {
      "type": "object",
      "required": [
        "type",
        "id",
        "status",
        "amount",
        "currency",
        "decimals",
        "fiatCurrency",
        "isCredit",
        "createdAt",
        "description",
        "txHash",
        "fromAddress",
        "chainId"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "deposit"
          ]
        },
        "id": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/UserStatementDepositStatus"
        },
        "amount": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "decimals": {
          "type": "integer",
          "format": "int32"
        },
        "fiatCurrency": {
          "type": "string"
        },
        "isCredit": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "description": {
          "type": "string"
        },
        "txHash": {
          "type": "string"
        },
        "fromAddress": {
          "type": "string"
        },
        "chainId": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "UserStatementDepositStatus": {
      "type": "string",
      "enum": [
        "pending",
        "approved",
        "rejected"
      ]
    },
    "UserStatementItem": {
      "type": "object",
      "oneOf": [
        {
          "$ref": "#/$defs/UserStatementCardTransaction"
        },
        {
          "$ref": "#/$defs/UserStatementDeposit"
        },
        {
          "$ref": "#/$defs/UserStatementWithdrawal"
        }
      ]
    },
    "UserStatementMerchantDetails": {
      "type": "object",
      "required": [
        "name",
        "city",
        "country",
        "categoryCode"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "country": {
          "type": "string"
        },
        "categoryCode": {
          "type": "string"
        }
      }
    },
    "UserStatementPagination": {
      "type": "object",
      "required": [
        "nextCursor",
        "hasNext"
      ],
      "properties": {
        "nextCursor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "hasNext": {
          "type": "boolean"
        }
      }
    },
    "UserStatementTransactionExecutionDetail": {
      "type": "object",
      "required": [
        "status",
        "to",
        "value",
        "data",
        "hash"
      ],
      "properties": {
        "status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "to": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "data": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "hash": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "UserStatementTransactionKind": {
      "type": "string",
      "enum": [
        "Payment",
        "Refund",
        "Reversal"
      ]
    },
    "UserStatementWallet": {
      "type": "object",
      "required": [
        "provider",
        "deviceBrand",
        "deviceModel",
        "deviceType",
        "deviceName"
      ],
      "properties": {
        "provider": {
          "$ref": "#/$defs/UserStatementWalletProvider"
        },
        "deviceBrand": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "deviceModel": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "deviceType": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "deviceName": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "UserStatementWalletProvider": {
      "type": "string",
      "enum": [
        "apple_pay",
        "google_pay",
        "samsung_pay",
        "other"
      ]
    },
    "UserStatementWithdrawal": {
      "type": "object",
      "required": [
        "type",
        "id",
        "status",
        "amount",
        "currency",
        "decimals",
        "fiatCurrency",
        "isCredit",
        "createdAt",
        "description",
        "txHash",
        "toAddress",
        "chainId"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "withdrawal"
          ]
        },
        "id": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/UserStatementWithdrawalStatus"
        },
        "amount": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "decimals": {
          "type": "integer",
          "format": "int32"
        },
        "fiatCurrency": {
          "type": "string"
        },
        "isCredit": {
          "type": "boolean"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "description": {
          "type": "string"
        },
        "txHash": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "toAddress": {
          "type": "string"
        },
        "chainId": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "UserStatementWithdrawalStatus": {
      "type": "string",
      "enum": [
        "pending",
        "processing",
        "completed",
        "failed"
      ]
    },
    "UserTransactionEnrichment": {
      "type": "object",
      "required": [
        "status",
        "merchant",
        "shop"
      ],
      "properties": {
        "status": {
          "$ref": "#/$defs/UserTransactionEnrichmentStatus"
        },
        "merchant": {
          "anyOf": [
            {
              "$ref": "#/$defs/UserTransactionEnrichmentMerchant"
            },
            {
              "type": "null"
            }
          ]
        },
        "shop": {
          "anyOf": [
            {
              "$ref": "#/$defs/UserTransactionEnrichmentShop"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "UserTransactionEnrichmentAddress": {
      "type": "object",
      "required": [
        "street",
        "city",
        "zip",
        "country",
        "areas"
      ],
      "properties": {
        "street": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "zip": {
          "type": "string"
        },
        "country": {
          "type": "string"
        },
        "areas": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UserTransactionEnrichmentArea"
          }
        }
      }
    },
    "UserTransactionEnrichmentArea": {
      "type": "object",
      "required": [
        "name",
        "value"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    },
    "UserTransactionEnrichmentCategory": {
      "type": "object",
      "required": [
        "name",
        "logoUrl"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "logoUrl": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "UserTransactionEnrichmentCoordinates": {
      "type": "object",
      "required": [
        "latitude",
        "longitude",
        "accuracy",
        "zoom"
      ],
      "properties": {
        "latitude": {
          "type": "number",
          "format": "double"
        },
        "longitude": {
          "type": "number",
          "format": "double"
        },
        "accuracy": {
          "type": "string"
        },
        "zoom": {
          "type": "integer",
          "format": "int32"
        }
      }
    },
    "UserTransactionEnrichmentMerchant": {
      "type": "object",
      "required": [
        "id",
        "name",
        "logoUrl"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/uuid"
        },
        "name": {
          "type": "string"
        },
        "logoUrl": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "UserTransactionEnrichmentShop": {
      "type": "object",
      "required": [
        "id",
        "type",
        "category",
        "tags",
        "address",
        "coordinates",
        "url",
        "googlePlaceId",
        "phoneNumber"
      ],
      "properties": {
        "id": {
          "$ref": "#/$defs/uuid"
        },
        "type": {
          "type": "string"
        },
        "category": {
          "anyOf": [
            {
              "$ref": "#/$defs/UserTransactionEnrichmentCategory"
            },
            {
              "type": "null"
            }
          ]
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "address": {
          "anyOf": [
            {
              "$ref": "#/$defs/UserTransactionEnrichmentAddress"
            },
            {
              "type": "null"
            }
          ]
        },
        "coordinates": {
          "anyOf": [
            {
              "$ref": "#/$defs/UserTransactionEnrichmentCoordinates"
            },
            {
              "type": "null"
            }
          ]
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "googlePlaceId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "phoneNumber": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "UserTransactionEnrichmentStatus": {
      "type": "string",
      "enum": [
        "matched",
        "unmatched",
        "pending",
        "unavailable"
      ]
    },
    "uuid": {
      "type": "string",
      "format": "uuid"
    }
  }
}