---
page_title: UPI Outage API
product: Consumer Specs
page_source: https://juspay.io/pe/docs/upi-consumer-stack-pe/docs/resources/upi-outage-api
openapi: https://juspay.io/pe/docs/api/swagger?document=https%3A%2F%2Fjuspay.io%2Fpe%2Fdocs%2Fupi-consumer-stack-pe%2Fdocs%2Fresources%2Fupi-outage-api
llms_txt: https://juspay.io/pe/docs/llms.txt
product_llms_txt: https://juspay.io/pe/docs/upi-consumer-stack-pe/llms.txt
---

## API Version: default


# UPI Outage API



This API can be utilized to retrieve the health status of banks and PSPs within the UPI ecosystem. **If no request body is provided, the response will contain the health status of the top 15 configured banks and PSPs.**  If only one of the banks or PSPs is included in the request, the corresponding health status will be returned in the response. If either banks or PSPs are omitted in the request, the default configured health status will be returned in the response.


### Use case



When the user lands onto payment checkout screen or bank selection to make a UPI transaction, the Merchant/TPAP(UPI App) can decide to grey out or hide the accounts that cannot serve traffic at that given point by initiating an outage status check right before the transaction starts.

This ensures no technical declines for the customer thus increasing the success rate and lowering the dropouts leading to a better customer experience.


### Recommended integration approach



* The outage status API can be called at certain interval(**preferably in minutes for low traffic**  or **every 3 second for high traffic** ) and the response can be cached/stored at the service provider’s end.
* The stored details can be used to serve the traffic at any given point.

For e.g. the transactions are of the order of 50 per second. There will be one outage status API hit for every 150 transactions and the remaining transactions are served based on that response.

However, the UPI service provider can tweak it based on the customer experience they wish to provide. The API can be consumed before every transaction or every second to be stored at their end.


### Default Configurations For Bank Status



* >= 70% - UP
* >= 40% and <70% - Medium
* < 40% - Low

The ranges mentioned above are configurable according to the UPI service provider’s needs.## Endpoints:
- Production: {{host}}/api/{{uri}}/merchants/outage

## Request Type: 
POST

## Content-Type: 
application/json

## Headers:

#### x-merchant-id:
Will be shared while onboarding.
- Tags: String

#### x-merchant-channel-id:
Will be shared while onboarding.
- Tags: String

#### x-timestamp:
This is an epoch unix timestamp string. For example, `1496918882000`. It can be used by us to invalidate older requests.
- Tags: integer

#### Content-Type:
`application/json`
- Tags: String

#### accept:
`application/json`
- Tags: String

#### x-merchant-signature:
This is a signature over combination of headers, payload. Refer Signature Calculation section for more details.
- Tags: String
## Sample Code Snippets:
### Code Snippets:

#### Shell Code Snippet:

```shell
curl -L -X POST '{{host}}/api/a2/merchants/outage' \
-H 'content-type: application/json' \
-H 'x-merchant-id: TEST' \
-H 'x-merchant-channel-id: TESTAPP' \
-H 'x-timestamp: 1700158230380' \
--data-raw '{ 
    "signature":"kHeeZD0f3E...",
    "payload":"eyJtZXJjaG...",
    "protected":"eyJhbGciOi..."
}'
```

### Sample Request and Response:

#### Request:
```json
{
    "banks": ["AXIS","SBIN","ICIC","AABD"],
    "psps":["ybl", "okicic"],
    "iat": "1700158230380",
    "udfParameters": "{}"
}
```

#### Response:
```json
{"success":false,"message":"Failed to fetch snippet"}
```

## Body Parameters:
### Parameters:

#### banks:
- Description: The list of IFSCs for which outage has be to found
- Value: value
- Tags: Array of String, Optional

#### psps:
- Description: The list of PSP handles for which outage has be to found
- Tags: Array of String, optional

#### iat:
- Description: Current Epoch Unix timestamp string. Has to be of 13 digit in Milliseconds

Example: 1496918882000.
- Tags: String, Mandatory

#### udfParameters:
- Description: Merchant Defined Parameters

Example: "{\"udf1\":\"value1\",\"udf2\":\"value2\",…}"
- Tags: Stringified JSON, Optional
## API Responses:
### 200:

#### status:
- Description: PSP status of the API 

Values: SUCCESS | FAILURE
- Tags: String, Mandatory

#### responseMessage:
- Description: PSP response message for the API 

**Values:** Refer Codes Guide in Resource Section.
- Tags: String, Mandatory

#### responseCode:
- Description: PSP response code for the API 

**Values:** Refer Codes Guide in Resource Section.
- Tags: String, Mandatory

#### payload:
- Value:
  - **BankList**:
    - Description: A list of Object which will have bank status of the each IFSC provided in the request body
    - Value:
      - **Status**:
        - Description: Success Label of the bank.
          
          UP => Bank is UPMEDIUM_SUCCESS_RATE => Experiencing Medium SR with the Bank.LOW_SUCCESS_RATE => Experiencing Low SR with the BankSTATUS_NOT_AVAILABLE => Not sufficient data
        - Tags: String, Mandatory
      - **Ifsc**:
        - Description: Bank IFSC Value
        - Tags: String, Mandatory
      - **SuccessRate**:
        - Description: Bank Success Rate in percentage
        - Tags: Decimal String, Mandatory
    - Tags: String, Mandatory
  - **MerchantChannelId**:
    - Description: Name of merchantChannelId
    - Tags: String, Mandatory
  - **MerchantId**:
    - Description: Name of merchantId
    - Tags: String, Mandatory
  - **NpciStatus**:
    - Description: Values: UP or DOWN
    - Tags: String, Mandatory
  - **PspList**:
    - Description: A list of Object which will have psp status of the each handle provided in the request body
    - Value:
      - **Status**:
        - Description: Success Label of the psp.UP => Psp is UPMEDIUM_SUCCESS_RATE => Experiencing Medium SR with the Psp.LOW_SUCCESS_RATE => Experiencing Low SR with the PspSTATUS_NOT_AVAILABLE => Not sufficient data
        - Tags: String, Mandatory
      - **Handle**:
        - Description: PSP Handle Value
        - Tags: String, Mandatory
      - **SuccessRate**:
        - Description: Psp Success Rate in percentage
        - Tags: Decimal String, Mandatory
    - Tags: String, Mandatory
- Tags: String, Mandatory

#### udfParameters:
- Description: Merchant Defined Parameters.

Example: "{\"udf1\":\"value1\",\"udf2\":\"value2\",…}"
- Tags: Stringified JSON, optional


---

## See Also

- [Upi Number Delink/SyncPending Callback](https://juspay.io/pe/docs/upi-consumer-stack-pe/docs/advance-features/upi-number-delinksyncpending-callback)
- [Sign URL API](https://juspay.io/pe/docs/upi-consumer-stack-pe/docs/resources/sign-url-api)
