Skip to main content
POST
Update gateway score

Update Gateway Score

Use case

Records the observed transaction outcome for a previously selected gateway so auth-rate analytics can learn from real payment results.

Authentication

Protected. Send either Authorization: Bearer <jwt_token> or x-api-key: <api_key>. In sandbox, also send x-feature: decision-engine. For local development, start with:

Request

  • Method and path: POST /update-gateway-score
  • Parameters: none.
  • Body: JSON body should include merchant/payment identity, selected gateway, status, and latency/outcome details expected by the score updater.

Example

Update gateway score

Response

Notes

  • Do not call this after NTW_BASED_ROUTING just to record the selected debit network; debit audit comes from /decide-gateway analytics.
  • Call it after payment authorization completes, not before.

Authorizations

Authorization
string
header
required

JWT token obtained from /auth/login

Body

application/json
merchantId
string
required
Example:

"test_merchant"

gateway
string
required
Example:

"stripe"

paymentId
string
required
Example:

"pay_001"

status
enum<string>
required
Available options:
CHARGED,
AUTHENTICATION_FAILED,
AUTHORIZATION_FAILED,
JUSPAY_DECLINED,
FAILURE
Example:

"CHARGED"

gatewayReferenceId
string
Example:

"stripe_ref_001"

enforceDynamicRoutingFailure
boolean
default:false

Response

200 - application/json

Score updated

message
string
merchant_id
string
gateway
string
payment_id
string