> ## Documentation Index
> Fetch the complete documentation index at: https://docs.txcloud.thetekcircle.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Score transaction

> Scores a transaction in real-time before authorization



## OpenAPI

````yaml openapi/transactions.yaml post /transactions/score
openapi: 3.0.3
info:
  title: TXCloud TransactionGuard API
  version: 1.0.0
  description: |
    Real-time transaction risk scoring to prevent payment fraud.
    Analyzes transaction patterns, user behavior, and recipient risk.
servers:
  - url: https://api.txcloud.io/v1
  - url: https://sandbox.api.txcloud.io/v1
security:
  - BearerAuth: []
tags:
  - name: Scoring
    description: Real-time transaction scoring
  - name: Transactions
    description: Transaction management
  - name: Users
    description: User risk profiles
  - name: Recipients
    description: Recipient/merchant intelligence
  - name: Rules
    description: Transaction rules
  - name: Analytics
    description: Transaction analytics
paths:
  /transactions/score:
    post:
      tags:
        - Scoring
      summary: Score transaction
      description: Scores a transaction in real-time before authorization
      operationId: scoreTransaction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionScoreRequest'
      responses:
        '200':
          description: Score result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionScore'
components:
  schemas:
    TransactionScoreRequest:
      type: object
      required:
        - amount
        - currency
        - type
        - sender
        - recipient
      properties:
        transaction_id:
          type: string
        amount:
          type: number
        currency:
          type: string
        type:
          type: string
          enum:
            - p2p_transfer
            - bill_payment
            - merchant_payment
            - cash_withdrawal
            - bank_transfer
            - international_transfer
        sender:
          type: object
          required:
            - user_id
          properties:
            user_id:
              type: string
            account_id:
              type: string
            device_id:
              type: string
            ip_address:
              type: string
        recipient:
          type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
            value:
              type: string
            name:
              type: string
        context:
          type: object
        metadata:
          type: object
    TransactionScore:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
        processing_time_ms:
          type: integer
        decision:
          type: string
          enum:
            - approve
            - review
            - challenge
            - decline
        risk_score:
          type: integer
        risk_level:
          type: string
        signals:
          type: object
          properties:
            positive:
              type: array
              items:
                type: string
            negative:
              type: array
              items:
                type: string
        checks:
          type: object
        rules_triggered:
          type: array
          items:
            type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````