Score Feedback

Update gateway score

Changed on

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.

post/update-gateway-score

Request

  • Base URL
    http://localhost:8080
  • URL
    http://localhost:8080/update-gateway-score
  • Auth
    • HTTP bearer
    • or API key in header x-api-key

Request body

merchantIdstring required
gatewaystring required
paymentIdstring 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.

gatewayReferenceIdstring nullable
enforceDynamicRoutingFailureboolean nullable
errorInfoobject 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.

isSmartRetryboolean nullable

Set by the orchestrator when this call is a smart-retry attempt.

Example request

{
  "merchantId": "merchant_demo",
  "gateway": "stripe",
  "paymentId": "pay_sr_001",
  "status": "CHARGED",
  "gatewayReferenceId": "stripe_ref_001",
  "txnLatency": {
    "gatewayLatency": 120.5
  }
}

Response

Score updated

messagestring
merchant_idstring
gatewaystring
payment_idstring
gsm_infoobject nullable

GSM lookup result. Present only when errorInfo was supplied and a matching rule was found.

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property default value false was removed

    • info

      added the new AUTHORIZED enum value to the request property

    • info

      added the new AUTHORIZING enum value to the request property

    • info

      added the new AUTO_REFUNDED enum value to the request property

    • info

      added the new CAPTURE_FAILED enum value to the request property

    • info

      added the new CAPTURE_INITIATED enum value to the request property

    • info

      added the new COD_INITIATED enum value to the request property

    • info

      added the new DECLINED enum value to the request property

    • info

      added the new NOP enum value to the request property

    • info

      added the new PARTIAL_CHARGED enum value to the request property

    • info

      added the new PENDING enum value to the request property

    • info

      added the new PENDING_VBV enum value to the request property

    • info

      added the new STARTED enum value to the request property

    • info

      added the new TO_BE_CHARGED enum value to the request property

    • info

      added the new VBV_SUCCESSFUL enum value to the request property

    • info

      added the new VOIDED enum value to the request property

    • info

      added the new VOID_FAILED enum value to the request property

    • info

      added the new VOID_INITIATED enum value to the request property

    • info

      added the optional property to the response with the status

    • info

      the endpoint scheme security ApiKeyAuth was added to the API

    • info

      the endpoint scheme security BearerAuth was added to the API