---
page_source: https://juspay.io/in/docs/ec-api/docs/base-integration/netbanking-payment
page_title: Netbanking Payment
---

## API Version: default


# Netbanking Payment



Create a payment transaction for NetBanking. Once you have the response, depending on the “method” attribute, you will have to take the next step. If you receive GET, then take the value in the “URL” attribute and redirect the user to this location. If you receive POST, then “params” attribute will hold a map containing key-value pairs.

For Web, you can create a form with these parameters as hidden variables and auto submit the form. Example code in Javascript: [Serialize Parameters](https://gist.github.com/ramanathanrv/31c0b687f0177c37b892).

For Android, serialize this data such that it can be loaded to WebView directly via postData. Example code in Java: [Serialize Parameters](https://gist.github.com/ramanathanrv/59fb412e1c75a1d9398a).


| payment_method | Bank |
|---|---|
| NB_AXIS | Axis Bank |
| NB_BOI | Bank of India |
| NB_BOM | Bank of Maharashtra |
| NB_CBI | Central Bank Of India |
| NB_CORP | Corporation Bank |
| NB_DCB | Development Credit Bank |
| NB_FED | Federal Bank |
| NB_HDFC | HDFC Bank |
| NB_ICICI | ICICI Netbanking |
| NB_IDBI | Industrial Development Bank of India |
| NB_INDB | Indian Bank |
| NB_INDUS | IndusInd Bank |
| NB_IOB | Indian Overseas Bank |
| NB_JNK | Jammu and Kashmir Bank |
| NB_KARN | Karnataka Bank |
| NB_KVB | Karur Vysya |
| NB_SBBJ	 | State Bank of Bikaner and Jaipur |
| NB_SBH | State Bank of Hyderabad |
| NB_SBI | State Bank of India |
| NB_SBM | State Bank of Mysore |
| NB_SBT | State Bank of Travancore |
| NB_SOIB | South Indian Bank |
| NB_UBI | Union Bank of India |
| NB_UNIB | United Bank Of India |
| NB_VJYB | Vijaya Bank |
| NB_YESB | Yes Bank |
| NB_CUB | CityUnion |
| NB_CANR | Canara Bank |
| NB_SBP | State Bank of Patiala |
| NB_CITI | Citi Bank NetBanking |
| NB_DEUT | Deutsche Bank |
| NB_KOTAK | Kotak Bank |
| NB_DLS | Dhanalaxmi Bank |
| NB_ING | ING Vysya Bank |
| NB_ANDHRA | Andhra Bank |
| NB_PNBCORP | Punjab National Bank CORPORATE |
| NB_PNB | Punjab National Bank |
| NB_BOB | Bank of Baroda |
| NB_CSB | Catholic Syrian Bank |
| NB_OBC | Oriental Bank Of Commerce |
| NB_SCB | Standard Chartered Bank |
| NB_TMB | Tamilnad Mercantile Bank |
| NB_SARASB | Saraswat Bank |
| NB_SYNB | Syndicate Bank |
| NB_UCOB | UCO Bank |
| NB_BOBCORP | Bank of Baroda Corporate |
| NB_ALLB | Allahabad Bank |
| NB_BBKM | Bank of Bahrain and Kuwait |
| NB_JSB | Janata Sahakari Bank |
| NB_LVBCORP | Lakshmi Vilas Bank Corporate |
| NB_LVB | Lakshmi Vilas Bank Retail |
| NB_NKGSB | North Kanara GSB |
| NB_PMCB | Punjab and Maharashtra Coop Bank |
| NB_PNJSB | Punjab and Sind Bank |
| NB_RATN | Ratnakar Bank |
| NB_RBS | Royal Bank of Scotland |
| NB_SVCB | Shamrao Vithal Coop Bank |
| NB_TNSC | Tamil Nadu State Apex Coop Bank |
| NB_DENA | DENA Bank |
| NB_COSMOS | COSMOS Bank |
| NB_DBS | DBS Bank Ltd |
| NB_DCBB | DCB BANK Business |
| NB_SVC | SVC Cooperative Bank |
| NB_BHARAT | Bharat Bank |
| NB_KVBCORP | Karur Vysya Corporate Banking |
| NB_UBICORP | Union Bank Corporate Banking |
| NB_IDFC | IDFC Bank |
| NB_NAIB | The Nainital Bank |
| NB_AIRTEL | Airtel Payments Bank |
| NB_AUB | AU Small Finance Bank |


**Handling POST** When you get POST as the authentication method in the response, then the customer must be redirected using a form. Example HTML code is given to you. Depending on your client language, choose the appropriate way to create the form.


#### Handling POST Code Snippet:

```handling post
<form method="POST" action="$authentication.url" id="authForm">
  {{ for key in  $authentication.params }}
  <input type="hidden" name="$key" value="$authentication.params[$key]">
  {{ end }}
</form>
<script type="text/javascript">
 document.forms["authForm"].submit()
</script>
```


**Handling GET** When you get GET as the authentication method in the response, you may load the URL directly into the customer’s browser. You can easily achieve this by sending HTTP 302 from your server. However, if the API call was made from the browser, then you can utilize the code snippet provided.


#### Handling GET Code Snippet:

```handling get
<!-- Example for handling GET response -->
<script type="text/javascript">
 // assuming that you are passing the JSON response of /txns API directly here
 function handleJuspayGetResponse(juspayResponse) {
   window.location.href = juspayResponse.payment.authentication.url
 }
 handleJuspayGetResponse(response)
</script>
```
## Endpoints:
- Sandbox: https://payments.sandbox.juspay.in/txns

- Production: https://payments.juspay.in/txns

## Request Type: 
POST

## Headers:

#### Content-Type:
application/x-www-form-urlencoded
- Tags: String, Mandatory

#### x-routing-id:
We recommend passing the customer_id as the x-routing-id. If the customer is checking out as a guest, you can pass an alternative ID that helps track the payment session lifecycle. For example, this could be an Order ID or Cart ID.

> **Warning**
> This ID is associated with the customer. It plays a key role in ensuring consistency and maintaining connections across different systems. If you fail to pass the same x-routing-id for the same customer in all related API calls, it could lead to issues with API functionality. Therefore, it’s crucial that you use the same x-routing-id for all requests tied to the same customer.


- Value: customer_1122
- Tags: String, Required
## Sample Code Snippets:
### Sample Request:

#### Request Code Snippet:

```request
curl -X POST https://api.juspay.in/txns \
-H 'x-routing-id: customer_1122'\
-d "order_id=:order_id" \
-d "merchant_id=:merchant_id" \
-d "payment_method_type=NB" \
-d "payment_method=NB_ICICI" \
-d "redirect_after_payment=true" \
-d "format=json"

```

### Sample Response:

####  Example Response (Having POST as auth method):
```json
{
  "order_id": ":order_id",
  "txn_id": ":txn_id",
  "status": "PENDING_VBV",
  "payment": {
    "authentication": {
      "method": "POST",
      "url": "https://bank-url.com/payment-path/start",
      "params": {
        "key1": "v1",
        "key2": "v2",
        "key3": "v3"
      }
    }
  }
}
```

####  Example Response (Having GET as auth method):
```json
{
  "order_id": ":order_id",
  "txn_id": ":txn_id",
  "status": "PENDING_VBV",
  "payment": {
    "authentication": {
      "method": "GET",
      "url": "https://api.juspay.in/pay/start/guest/8646a7a029974fxxxx95fec00340a507"
    }
  }
}
```

## Body Parameters:
### Parameters:

#### order_id:
- Description: order_id pertaining to the order for which the payment is started.
- Tags: string, Mandatory

#### merchant_id:
- Description: ID of the merchant_account that you hold with us.
- Tags: string, Mandatory

#### payment_method_type:
- Description: Must be NB.
- Tags: string, Mandatory

#### payment_method:
- Description: The actual payment method that was selected by the user. For NetBanking transactions, it must be one of from the table above..
- Tags: string, Mandatory

#### redirect_after_payment:
- Description: This is a boolean variable and accepts true/false. We recommend that you set this to true and use the redirection flow. If set to true, then the user is redirected to the return_url configured for the order. If set to false, then the user will be stopped at the response page from the gateway. Your client should be able to read the page/title to infer that the user has completed the transaction.
- Tags: string, Mandatory

#### format:
- Description: f it is set to json, then the response will be HTTP 200 with a JSON formatted text. Otherwise, the response is HTTP 302 with the Location attribute having the destination URL.
- Tags: string, Mandatory

#### offers:
- Description: The key offers should be passed only when juspay offers are being used. The value for this key can set as the offerID which is received from /v1/offers/list api
- Tags: array of Strings
## API Responses:
### 200:

#### order_id:
- Description: :order_id
- Tags: string

#### txn_id:
- Description: :txn_id
- Tags: string

#### status:
- Description: PENDING_VBV
- Tags: string

#### payment:
- Value:
  - **Authentication.method**:
    - Tags: String
  - **Authentication.url**:
    - Tags: string
  - **Authentication.params**:
    - Description: Only when you have POST as the authentication method
    - Value:
      - **Key1**:
        - Tags: String
      - **Key2**:
        - Tags: String
      - **Key3**:
        - Tags: String
    - Tags: object
- Tags: object
### 400:

#### status:
- Description: error
- Tags: string

#### error_message:
- Description: Order timed out
- Tags: string

#### error_code:
- Description: invalid_request
- Tags: string
