SimPayDocs

    Submit MED Analysis Result

    Submit your analysis decision for a MED dispute. You can accept the dispute (ACCEPTED) and specify the fraud type, or reject it (REJECTED). Accepted disputes trigger the refund process workflow.

    POSThttps://api.somossimpay.com.br/v3/meds/{med_id}/analysis
    curl --request POST \
      --url 'https://api.somossimpay.com.br/v3/meds/{med_id}/analysis' \
      --header 'Authorization: Bearer <ACCESS_TOKEN>' \
      --header 'Content-Type: application/json' \
      --data '{
      "analysis_result": "ACCEPTED",
      "fraud_type": "FRAUDULENT_ACCOUNT",
      "analysis_details_user": "Evidence clearly shows this is a fraudulent account. Transaction pattern matches known scam behavior."
    }'
    Response200
    {
      "pixmed_id": "550e8400-e29b-41d4-a716-446655440000",
      "status": "IN_PROCESSING",
      "analysis_details_user": "Evidence clearly shows this is a fraudulent account. Transaction pattern matches known scam behavior.",
      "date_response_user": "2026-06-02T14:30:00Z"
    }

    Endpoint

    POST /v3/meds/{med_id}/analysis

    Headers

    ParameterTypeDescriptionExample
    AuthorizationStringBearer + Access_tokenBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzEzMzAwOTMxLCJpYXQiOjE3MTMyOTczMzEsImp0aSI6Ijc2ZWI4ZTE5ZjM4YjQ4NmZiODdmNzNjNTdkMWVmNDJhIiwidXNlcl9pZCI6MjQ2fQ.5zekMa7CUj9p-MvNHns5ke4ZPhYV3Y1CLOsYL7hDUUo

    Path Parameters

    ParameterTypeDescriptionExample
    med_idStringThe unique identifier of the MED infraction report550e8400-e29b-41d4-a716-446655440000

    Body Details

    FieldTypeDescriptionRequired or Optional
    analysis_resultStringYour decision on the dispute: ACCEPTED or REJECTEDrequired
    fraud_typeStringType of fraud identified (required when analysis_result is ACCEPTED)optional
    analysis_details_userStringAdditional notes or explanation for your analysis decisionoptional

    Valid fraud_type values (required when accepting):

    • IDEOLOGICAL_FALSEHOOD - False information or forged documents
    • SHELL_ACCOUNT - Account used as front for fraudulent activities
    • FRAUDULENT_ACCOUNT - Account opened with fraudulent intent
    • OTHER - Other types of fraud not covered above
    • UNKNOWN - Fraud type not identified

    Request Examples

    Accept dispute with fraud type:

    {
      "analysis_result": "ACCEPTED",
      "fraud_type": "FRAUDULENT_ACCOUNT",
      "analysis_details_user": "Evidence clearly shows this is a fraudulent account. Transaction pattern matches known scam behavior."
    }

    Reject dispute:

    {
      "analysis_result": "REJECTED",
      "analysis_details_user": "Transaction was legitimate. Customer confirmed receipt of goods and services."
    }

    Accept with shell account:

    {
      "analysis_result": "ACCEPTED",
      "fraud_type": "SHELL_ACCOUNT",
      "analysis_details_user": "Multiple transfers detected. Account shows characteristics of money mule operation."
    }

    Response Details

    {
      "pixmed_id": "550e8400-e29b-41d4-a716-446655440000",
      "status": "IN_PROCESSING",
      "analysis_details_user": "Evidence clearly shows this is a fraudulent account. Transaction pattern matches known scam behavior.",
      "date_response_user": "2026-06-02T14:30:00Z"
    }
    {
      "pixmed_id": "550e8400-e29b-41d4-a716-446655440000",
      "status": "REJECTED_BY_USER",
      "analysis_details_user": "Transaction was legitimate. Customer confirmed receipt of goods and services.",
      "date_response_user": "2026-06-02T14:30:00Z"
    }
    FieldTypeDescription
    pixmed_idStringMED ID that was analyzed
    statusStringNew status: IN_PROCESSING for accepted, REJECTED_BY_USER for rejected
    analysis_details_userStringYour analysis notes
    date_response_userDateTimeTimestamp when analysis was submitted (ISO 8601 format)

    Error Responses

    HTTP CodeError MessageDescription
    400PIXMED is not in a valid state for analysis. Current status: {status}MED must be in WAITING status to accept analysis
    400This MED is already being processedAnother analysis is already in progress for this MED
    400fraud_type is required when acceptingYou must specify fraud type when analysis_result is ACCEPTED
    400PIXMED is not in a valid state for analysis. Enrichment is FalseMED must have enrichment enabled to accept analysis
    400PIXMED is not in a valid state for analysis. Creator PSP is {ISPB}Cannot analyze MEDs created by your own institution
    401UnauthorizedInvalid or missing authentication token. Ensure you are sending a valid Bearer token
    404Med not foundThe specified MED ID does not exist or you don't have access to it
    422Validation errorRequest validation failed. Check required fields and data types

    Business Rules

    Analysis Requirements:

    • MED must be in WAITING status to submit analysis
    • You must have Permissions.PixMed.ANALYZE scope
    • You must have access to the account associated with the MED
    • MED must belong to your company
    • MED must have enrichment enabled (is_enrichment=True)
    • Cannot analyze MEDs created by your own institution (creator_psp must be different)

    Analysis Results:

    ACCEPTED:

    • Triggers the refund process workflow
    • Creates a processing record (PixMedInProcessing)
    • Sends analysis to processing queue for automated handling
    • Status changes to IN_PROCESSING
    • Must include fraud_type to categorize the dispute
    • System will attempt to process the refund automatically

    REJECTED:

    • Dispute is denied immediately
    • Status changes to REJECTED_BY_USER
    • No refund will be processed
    • Analysis is recorded for audit purposes
    • Dispute is considered closed

    Fraud Type Classification:

    • IDEOLOGICAL_FALSEHOOD: Used for cases involving fake documents, false declarations, or forged information
    • SHELL_ACCOUNT: Accounts used as intermediaries in money laundering schemes (mule accounts)
    • FRAUDULENT_ACCOUNT: Accounts opened with fraudulent intent or stolen identity
    • OTHER: Any fraud type not covered by specific categories
    • UNKNOWN: When fraud is confirmed but specific type cannot be determined

    Status Flow:

    WAITING → (Submit Analysis)
      ├─→ IN_PROCESSING (if ACCEPTED)
      └─→ REJECTED_BY_USER (if REJECTED)

    Concurrent Processing:

    • Only one analysis can be in progress at a time per MED
    • System checks for existing PixMedInProcessing records
    • If another analysis is already processing, request is rejected with 400 error

    Analysis History:

    • All analysis submissions are recorded with timestamp
    • User ID is tracked for audit purposes
    • Analysis details are permanently stored
    • Cannot modify analysis after submission

    Best Practices:

    • Review all uploaded evidence files before submitting analysis
    • Provide clear, concise analysis_details_user for audit trail
    • Select most specific fraud_type when accepting disputes
    • Reject only when you have strong evidence transaction was legitimate