---
title: "Update gateway score"
method: POST
path: "/update-gateway-score"
tags: ["Score Feedback"]
---

# Update gateway score

`POST /update-gateway-score`

Feed a transaction outcome back into the success-rate model. Call this after every transaction so the engine has accurate SR data for future routing decisions.

A `CHARGED` status increases the gateway's SR; failure statuses (`AUTHENTICATION_FAILED`, `AUTHORIZATION_FAILED`, etc.) decrease it.

## Request body

- UpdateGatewayScoreRequest
  - `merchantId` string, required
  - `gateway` string, required
  - `paymentId` string, required
  - `status` 'STARTED' | 'AUTHENTICATION_FAILED' | 'JUSPAY_DECLINED' | 'PENDING_VBV' | 'VBV_SUCCESSFUL' | 'AUTHORIZED' | 'AUTHORIZATION_FAILED' | 'CHARGED' | 'AUTHORIZING' | 'COD_INITIATED' | 'VOIDED' | 'VOID_INITIATED' | 'NOP' | 'CAPTURE_INITIATED' | 'CAPTURE_FAILED' | 'VOID_FAILED' | 'AUTO_REFUNDED' | 'PARTIAL_CHARGED' | 'TO_BE_CHARGED' | 'PENDING' | 'FAILURE' | 'DECLINED', required — Transaction status. Must be a TxnStatus value - lowercase values such as `success` are rejected.
  - `gatewayReferenceId` string, nullable
  - `enforceDynamicRoutingFailure` boolean, nullable
  - `txnLatency` object, nullable — Observed gateway latency, in milliseconds.
    - `gatewayLatency` number, double, nullable
  - `errorInfo` object, nullable — Gateway error details for the GSM-based scoring filter. When present and the merchant flag is on, user/issuer-originated failures are skipped so the gateway is not penalised.
  - `isSmartRetry` boolean, nullable — Set by the orchestrator when this call is a smart-retry attempt.

## Response `200`

Score updated

- UpdateScoreResponse
  - `message` string
  - `merchant_id` string
  - `gateway` string
  - `payment_id` string
  - `gsm_info` object, nullable — GSM lookup result. Present only when `errorInfo` was supplied and a matching rule was found.

---

[API](https://skmtc.net/juspay/apis/decision-engine.md) · [All operations](https://skmtc.net/juspay/apis/decision-engine/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/juspay/decision-engine/versions/36e7a0972ee6/schema)
