---
updatedAt: 2025-11-17T11:17:30.000Z
agentTools:
  projectIndex: https://docs.billdesk.io/llms.txt
---

# Ace – SDK (Bootstrap)

# 1. Introduction

Introducing an easy to integrate Javascript SDK with a pre-built UI for accepting payments. The BillDesk Ace – SDK works by displaying the **Ace – SDK** as a modal window within merchant page giving their customers a seamless and integrated payments experience.

To add on, the UI (user interface) is **responsive** i.e. it automatically optimizes for the form factor, be it a desktop or mobile device allowing the merchant to cater to a wide client base.

# 2. Salient Features

* **Low code integration** - Accept payments with a few easy steps and minimal code with this offering
* **Customizable** - Customize aspects such as merchant's company logo, payment methods as well as themes to give their customers an integrated experience

***

# 3. Experience the Product

To gain firsthand insight into the functionality of the Ace – SDK, BillDesk invites merchants to explore the capabilities of BillDesk's API Playground.

<div class="bd-cards cards-1 card-image-left">

\> 🚧 API Playground

> <a href="/reference/createorder" target="blank">Experience Ace – SDK</a>
>
> <Image align="center" src="https://files.readme.io/bd77f50-df27fa8-Icon2.png" />

</div>

# 4. Integration Steps

<Image alt="Flow Diagram explaining this Workflow" align="center" src="https://files.readme.io/9df719d-One-time_payment-_Web_SDK_1.svg">
  Flow Diagram explaining this Workflow
</Image>

## Step 1: Create an Order

An order needs to be created for every transaction initiated using the Ace – SDK.

To create an order, use the [Create Order API](https://billdesk.readme.io/reference/createorder). The response of this API provides the `bdorderId`and `authorization` values (among other attributes) which are required to invoke the Ace – SDK (explained in Step 2)

| Attribute     | Description                                                                                                                                                                                          |
| :------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| mercid        | Unique identifier provided by BillDesk for each merchant.                                                                                                                                            |
| bdorderid     | Value generated by BillDesk and provided in the [Create Order API](https://billdesk.readme.io/reference/createorder) response. This value is unique for every order which is created.                |
| authorization | An authorization token created by BillDesk and provided in the [Create Order API](https://billdesk.readme.io/reference/createorder) response. This value is unique for every order which is created. |

```json Create Order API Response
{
	"objectid": "order",
	"orderid": "ORDERID280920230002",
	"bdorderid": "OAZY21S8GXAC",
	"mercid": "BDMERCID",
	"order_date": "2023-09-28T12:25:00+05:30",
	"amount": "2.00",
	"currency": "356",
	"ru": "https://www.merchanturl.com/response.jsp",
	"additional_info": {
		"additional_info1": "Details1",
		"additional_info2": "Details2",
    "additional_info3":"NA",
    "additional_info4":"NA",
    "additional_info5":"NA",
    "additional_info6":"NA",
    "additional_info7":"NA"
	},
	"itemcode": "DIRECT",
	"createdon": "2023-09-28T12:33:36+05:30",
	"next_step": "redirect",
	"links": [
		{
			"href": "https://www.domainname.com/pgi/ve1_2/orders/ORDERID280920230002",
			"rel": "self",
			"method": "GET"
		},
		{
			"href": "https://www.domainname.com/pgi/MerchantPayment/",
			"rel": "redirect",
			"method": "POST",
			"parameters": {
				"mercid": "BDMERCID",
				"bdorderid": "OAZY21S8GXAC",
				"rdata": "89fd934cf8ca5ad76b8efbcf1d56caf8546a28d5b7876ad0f4070d48fa9b6bc00d3d5c85cda042d681d4593a28dd4ecf19b97c4f15eddff452885653e3f08425d35868fc0b05dd1af21d6eec07364e13b9a3b8f4fd56bdc6983fa732a7ab5267c2708da2b41de3edbb05919787dd5f7c52d17b8e9522e0965164100632eda8575a59483f667255b1c4b0f63bb4ef61d.70675f706172616d5f656e6333"
			},
			"valid_date": "2023-09-28T13:03:36+05:30",
			"headers": {
				"authorization": "OToken 89fd934cf8ca5ad76b8efbcf1d56caf8546a28d5b7876ad0f4070d48fa9b6bc00d3d5c85cda042d681d4593a28dd4ecf19b97c4f15eddff452885653e3f08425d35868fc0b05dd1af21d6eec07364e13b9a3b8f4fd56bdc6983fa732a7ab5267c2708da2b41de3edbb05919787dd5f7c52d17b8e9522e0965164100632eda8575a59483f667255b1c4b0f63bb4ef61d.70675f706172616d5f656e6333"
			}
		}
	],
	"status": "ACTIVE",
	"invoice": {
		"invoice_number": "11221133",
		"invoice_display_number": "11221133",
		"invoice_date": "2023-09-26T12:25:00+05:30",
		"customer_name": "John",
		"gst_details": {
			"cgst": "8.00",
			"sgst": "8.00",
			"igst": "0.00",
			"gst": "16.00",
			"cess": "0.00",
			"gstincentive": "5.00",
			"gstpct": "16.00",
			"gstin": "07AAAAA2194A1A1"
		}
	}
}
```

<div class="bd-cards cards-1 card-image-left">

<Callout icon="💬" theme="default">
  ### Preparing a request payload

  Every API request needs to encrypted. Similarly, the response of each API is also returned in an encrypted format by BillDesk. 

  A step by step guide to prepare the request payload, transmit it and capture the response is available [here](https://billdesk.readme.io/docs/headers-authentication).

  <Image align="center" src="https://files.readme.io/70aa43a-Preparing_a_request_payload-2.svg" />
</Callout>

</div>

<div class="bd-cards cards-1 card-image-left">

<Callout icon="💬" theme="default">
  ### Pick and choose the flow

  The Create Order API is modular and supports 2 additional workflows as add-ons:

  1. **Account Validation Service (AVS):** AVS can be used in case merchant wish to permit the customer to complete the transaction with a pre-defined account. More details on AVS is available [here](https://billdesk.readme.io/docs/avs).
  2. **Split Settlement:** Applicable in case merchant wants he transaction settlements in multiple accounts. More details on Split Settlement are available [here](https://docs.billdesk.io/docs/spilt-settlements).

  Note: If merchant would like to implement these flows, they would need to contact the designated BillDesk **RM** prior to initiating the integration.

  <Image align="center" src="https://files.readme.io/1498cff-Pick_and_choose_your_flow-1.svg" />
</Callout>

</div>

<div class="bd-cards cards-1 card-image-left">

<Callout icon="💬" theme="default">
  ### Validity of an order

  Every order created with the Create Order API is valid for a period of **30 minutes**. Thus the customer needs to complete a transaction within this timeframe.

  <Image align="center" src="https://files.readme.io/026be2f-Validity_of_an_order-1.svg" />
</Callout>

</div>

## Step 2: Incorporate JS & CSS links

Please refer to the below for the BillDesk Javascript and css links for both UAT and production environments which need to be incorporated on merchant checkout page where the Ace – SDK would launch

```json UAT links
<script type="module" src="https://uat1.billdesk.com/merchant-uat/
sdk/dist/billdesksdk/billdesksdk.esm.js"></script>
<script nomodule="" src="https://uat1.billdesk.com/merchant-uat/sdk/dist/billdesksdk.js"></script>
<link href="https://uat1.billdesk.com/merchant-uat/sdk/dist/billdesksdk/billdesksdk.css" rel="stylesheet">
```
```json Production links
<script type="module" src="https://pay.billdesk.com/jssdk/v1/dist/billdesksdk/billdesksdk.esm.js"></script>
<script nomodule="" src="https://pay.billdesk.com/jssdk/v1/dist/billdesksdk.js"></script>
<link href="https://pay.billdesk.com/jssdk/v1/dist/billdesksdk/billdesksdk.css" rel="stylesheet">
```

## Step 3: Objects Configuration

The `flow_config` and `config` are 2 objects which need to be prepared to launch the Ace – SDK

**Flow\_Config** - The flow config is an object which defines how certain aspects of the the SDK will render. It contains:

1. Values received from the [Create Order API ](https://billdesk.readme.io/reference/createorder)(Step 1).
2. Customizations that merchant would like to make on the Web SDK.

```javascript Flow Config object
var flow_config = {
	merchantId: "BDMERCID",
	bdOrderId: "TSFFDHWE",
	authToken: "OToken FDD5C104249A4CDAE734623",
	childWindow: true,
	returnUrl: "http://www.demo.com/api/pgresponse",
	retryCount: 3,
	prefs: {
		"payment_categories": ["card", "nb"],
		"allowed_bins": ["459150", "525211"]
	},
	netBanking:{
		"showPopularBanks" : "Y",
		"popularBanks": ["Kotak Bank"," AXIS Bank [Retail]"]
	}
}
```
```javascript Config Object
var config = {
	merchantLogo: "data:image/png;base64:eqwewqesddhgjdxsc=="
	flowConfig: flow_config,
	flowType: "payments"
}
```

### Elements in the flow\_config object:

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Attribute
      </th>

      <th>
        Classification
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        merchantId
      </td>

      <td>
        mandatory
      </td>

      <td>
        Unique identifier provided by BillDesk for each merchant.
      </td>
    </tr>

    <tr>
      <td>
        bdOrderid
      </td>

      <td>
        mandatory
      </td>

      <td>
        Value generated by BillDesk and provided in the [Create Order API](https://billdesk.readme.io/reference/createorder) Response. This value is unique for every order which is created.
      </td>
    </tr>

    <tr>
      <td>
        authToken
      </td>

      <td>
        mandatory
      </td>

      <td>
        An authorization token created by BillDesk and provided in the [Create Order API](https://billdesk.readme.io/reference/createorder) Response This value is unique for every order which is created.
      </td>
    </tr>

    <tr>
      <td>
        childWindow
      </td>

      <td>
        optional
      </td>

      <td>
        Can take a value of either "true" or "false"\
        `true`- In this case, any redirections to an external page ( eg. Card OTP, Net Banking/Wallet login screen) will open up in a separate window of the browser.  

        `false`- In this case, any redirections to an external page ( eg. Card OTP, Net Banking/Wallet login screen) will open up in the same page on which the SDK is launched.
      </td>
    </tr>

    <tr>
      <td>
        returnUrl
      </td>

      <td>
        mandatory
      </td>

      <td>
        The URL where the customer is to be redirected post completion of the payment on the Ace – SDK. BillDesk will also `POST` the transaction response to this URL.  

        * \*Note: \*\*Please ensure that the value of the returnURL is the same as the one passed in the \"ru\" parameter of the Create Order API. This ensures that the transaction responses for all payment methods are posted on a single URL.
      </td>
    </tr>

    <tr>
      <td>
        retryCount
      </td>

      <td>
        optional
      </td>

      <td>
        Number of retry attempts merchant want the customer to be able to get. In case, the earlier attempt to complete the transaction failed, the customer will get an option to retry the payment.
      </td>
    </tr>

    <tr>
      <td>
        prefs
      </td>

      <td>
        optional
      </td>

      <td>
        Changes in the SDK UI based on specific parameters:  

        **• payment\_categories**\
        Payment categories passed here will be displayed in that specific order. Possible values are: **["card", "emi", "nb", "upi", "wallets",  "qr", "gpay"]** . In case merchant do not want a particular payment category which is enabled for them to show on the SDK, merchant can remove it from payment\_categories and it will not show on the SDK.  

        * \*Note:**Merchants can only customize payment categories from the ones enabled for their merchant id.\&#xA;**•allowed\_bins:  \*\*\
          Applicable only for cards as a payment method. BIN is the first 6 digits of any card. Multiple BINs can be passed in this attribute. If this value(s) in passed in the  prefs object, the customer will be able to make a payment with only that card of that bin.\
            

        **•netBanking object:**\
        If this object is passed, the flow config object, there are 2 possible orchestrations:  

        **1. The "showPopularBanks" attribute is : "Y"**\
        In this case, merchant can decide which banks should show as popular banks once the customer clicks on “Net Banking” on the SDK. The list of these banks needs to be passed in the “popularBanks" attribute. The list of these banks needs to be passed in the required order in the popularBanks attribute.  

        Possible values which can be passed here are:\
           Axis Bank [Retail]\
           HDFC Bank [Retail]\
           ICICI Bank [Retail]\
           Kotak Bank\
           State Bank of India  

        **2. The "showPopularBanks" attribute is: "N”**\
        In this case, no popular banks will be shown on the SDK and the customers will have to choose a bank from the drop down.  

        Note: Even if a list of banks has been passed in the "popularBanks" attribute in this case, no popular banks will be shown.
      </td>
    </tr>
  </tbody>
</Table>

### Elements in the config object

| Attribute    | Description                                                                                                                                                  | Classification |
| :----------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------- |
| merchantLogo | Merchant logo as a base 64 image or a URL where the logo is hosted. BillDesk recommends maintaining the logo size as 120 pixels (width) x 60 pixels (height) | mandatory      |
| flowType     | Fixed value of "payments"                                                                                                                                    | mandatory      |

## Step 4: Include the function to launch

The scripts and configuration objects created in the steps above need to be passed to the function: `window.loadBillDeskSdk(config)` to launch the Web SDK

## Step 5: Include the onload close event on the Return URL

**Applicable if the childWindow flag has been set as true in the configuration**

In this scenario, the Return URL must have an `onload close` event defined in it. This ensures that the child window gets closed automatically once the customer has completed a transaction.

Sample code for the onload close event: `<html><head><title>BillDesk</title></head><body onload="window.close();"></body></html>`

## Step 6: Review your Integration

Based on the steps outlined above, please find below a summary on how merchant integration should look

```javascript Integration overview
<script type="module" src="https://pay.billdesk.com/jssdk/v1/dist/billdesksdk/billdesksdk.esm.js"></script>
<script nomodule="" src="https://pay.billdesk.com/jssdk/v1/dist/billdesksdk.js"></script>
<script src="https://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<link href="https://pay.billdesk.com/jssdk/v1/dist/billdesksdk/billdesksdk.css" rel="stylesheet">


var flow_config = {
	merchantId: "BDMERCID",
	bdOrderId: "TSFFDHWE",
	authToken: "OToken FDD5C104249A4CDAE734623",
	childWindow: true,
	returnUrl: "http://www.demo.com/api/pgresponse",
	retryCount: 3,
	prefs: {
		"payment_categories": ["card", "nb"],
		"allowed_bins": ["459150", "525211"]
	},
	netBanking:{
		"showPopularBanks" : "Y",
		"popularBanks": ["Kotak Bank"," AXIS Bank [Retail]"]
	}
}

var config = {
	merchantLogo: "data:image/png;base64:eqwewqesddhgjdxsc=="
	flowConfig: flow_config,
	flowType: "payments"
}

window.loadBillDeskSdk(config);

```

## Step 7: Capture the transaction response

Once the transaction has been completed by the customer using a payment method of choice, the customer is returned to the "ru" attribute provided in the [Create Order API](https://billdesk.readme.io/reference/createorder). BillDesk will also `POST` a response to this URL containing details of the transaction.

**Capture and parse the transaction response**\
The transaction response provided depends on the payment method used by the customer. *(Samples provided below)*\
The value after the `transaction_response` parameter till the next "&" character is the encrypted transaction response which provides more details about the transaction.

### 7.1 Transaction response in cases where Child Window  is “true”

```json Encrypted Response- All Payment methods
mercid=BDMERCID&terminal_state=Y&orderid=MERCORDERID12&bdcres=a6b80a345f3819b70f445fb9bc1f060f78edfd3bfbff98574b6665a4244f50001992f918e4ee28ad15608dcd.70675f706172616d5f656e6331&transaction_response=eyJhbGciOiJIUzI1NiIsImNsaWVudGlkIjoiYmRobWFjdGVzdCIsImtpZCI6IkhNQUMifQ.eyJtZXJjaWQiOiJCRE1PTklUT1IiLCJ0cmFuc2FjdGlvbl9kYXRlIjoiMjAyMy0xMS0wMVQxODowNjoyMSswNTozMCIsInN1cmNoYXJnZSI6IjAuMDAiLCJwYXltZW50X21ldGhvZF90eXBlIjoidXBpIiwiYW1vdW50IjpiMS4wMCIsInJ1IjoiaHR0cHM6Ly93d3cuYmlsbGRlc2suY29tL3dlYi8iLCJvcmRlcmlkIjoiTUVSQ09SREVSSUQxMiIsInRyYW5zYWN0aW9uX2Vycm9yX3R5cGUiOiJzdWNjZXNzIiwiZGlzY291bnQiOiIwLjAwIiwicGF5bWVudF9jYXRlZ29yeSI6IjEwIiwiYmFua19yZWZfbm8iOiIzMzA1Njg1ODA5MDQiLCJ0cmFuc2FjdGlvbmlkIjoiWklDNTE1MDMzMjYxMDkiLCJ1cGkiOnsidnBhIjoiYXJqdW4ua3VyYW5lQHlibCIsIm1hc2tlZF92cGEiOiJ4eHh4eHhAeWJsIn0sInR4bl9wcm9jZXNzX3R5cGUiOiJxciIsImJhbmtpZCI6IklDNSIsImFkZGl0aW9uYWxfaW5mbyI6eyJhZGRpdGlvbmFsX2luZm83IjoiTkEiLCJhZGRpdGlvbmFsX2luZm82IjoiTkEiLCJhZGRpdGlvbmFsX2luZm85IjoiTkEiLCJhZGRpdGlvbmFsX2luZm84IjoiTkEiLCJhZGRpdGlvbmFsX2luZm8xMCI6Ik5BIiwiYWRkaXRpb25hbF9pbmZvMSI6Ik5BIiwiYWRkaXRpb25hbF9pbmZvMyI6Ik5BIiwiYWRkaXRpb25hbF9pbmZvMiI6Ik5BIiwiYWRkaXRpb25hbF9pbmZvNSI6Ik5BIiwiYWRkaXRpb25hbF9pbmZvNCI6Ik5BIn0sIml0ZW1jb2RlIjoiRElSRUNUIiwidHJhbnNhY3Rpb25fZXJyb3JfY29kZSI6IlRSUzAwMDAiLCJjdXJyZW5jeSI6IjM1NiIsImF1dGhfc3RhdHVzIjoiMDMwMCIsInRyYW5zYWN0aW9uX2Vycm9yX2Rlc2MiOiJUcmFuc2FjdGlvbiBTdWNjZXNzZnVsIiwib2JqZWN0aWQiOiJ0cmFuc2FjdGlvbiIsImNoYXJnZV9hbW91bnQiOiIxLjAwIn0.kcdlqnotIs-W8E8CfT_jcmSjAzoRMC4cMRLDQLqXpF0&return_url=https%3A%2F%2Fwww.merchanturl.com%2F
```
```json Decrypted Transaction Response
{
   "objectid":"transaction",
   "mercid":"BDMERCID",
   "transaction_date":"2020-11-20T13:55:59+05:30",
   "surcharge":"2.00",
   "payment_method_type":"netbanking",
   "amount":"300.00",
   "ru":"https://example.com/pgresponse/modal/redirect",
   "orderid":"yukkq8hnxcrztea8op24bk",
   "transaction_error_type":"success",
   "discount":"0.00",
   "transactionid":"U1230000041968",
   "txn_process_type":"nb",
   "bankid":"123",
   "additional_info":{
    "additional_info1": "Details1",
		"additional_info2": "Details2",
    "additional_info3":"NA",
    "additional_info4":"NA",
    "additional_info5":"NA",
    "additional_info6":"NA",
    "additional_info7":"NA"
   },
   "itemcode":"DIRECT",
   "transaction_error_code":"TRS0000",
   "currency":"356",
   "auth_status":"0300",
   "transaction_error_desc":"Transaction Successful",
   "charge_amount":"302.00",
   "payment_category":"01"
}
```

### 7.2 Transaction response in cases where Child Window  is “false”

```json Encrypted Response- UPI
mercid=BDMERCID&terminal_state=Y&orderid=65609b50908bb&bdcres=dc0b523a1240071a898676ad1391ed7705d72a6b3e96fbd265c9d3f2de12fd9498d53edab5ea08e1f8ecfee6.70675f706172616d5f656e6331&transaction_response=eyJhbGciOiJIUzI1NiIsImNsaWVudGlkIjoid2NocGRyaXZ2MiIsImtpZCI6IkhNQUMifQ.eyJtZXJjaWQiOiJCRE1FUkNJRCIsInRyYW5zYWN0aW9uX2RhdGUiOiIyMDIzLTExLTI0VDE4OjE4OjQyKzA1OjMwIiwic3VyY2hhcmdlIjoiMC4wMCIsInBheW1lbnRfbWV0aG9kX3R5cGUiOiJ1cGkiLCJhbW91bnQiOiIxLjAwIiwicnUiOiJodHRwczovL21lcmNoYW50dXJsLm9yZy8iLCJvcmRlcmlkIjoiNjU2MDliNTA5MDM0YiIsInRyYW5zYWN0aW9uX2Vycm9yX3R5cGUiOiJzdWNjZXNzIiwiZGlzY291bnQiOiIwLjAwIiwicGF5bWVudF9jYXRlZ29yeSI6IjEwIiwiYmFua19yZWZfbm8iOiIzMzI4NjkxMzQ1MDI5IiwidHJhbnNhY3Rpb25pZCI6IlpJQzUxNTU3MzQ1NSIsInR4bl9wcm9jZXNzX3R5cGUiOiJjb2xsZWN0IiwiYmFua2lkIjoiSUM1IiwiYWRkaXRpb25hbF9pbmZvIjp7ImFkZGl0aW9uYWxfaW5mbzEiOiJOQSIsImFkZGl0aW9uYWxfaW5mbzIiOiJOQSJ9LCJpdGVtY29kZSI6IkRJUkVDVCIsInRyYW5zYWN0aW9uX2Vycm9yX2NvZGUiOiJUUlMwMDAwIiwiY3VycmVuY3kiOiIzNTYiLCJhdXRoX3N0YXR1cyI6IjAzMDAiLCJ0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XRpb25hbF9pbmZvMSI6Ik5BIiwiYWRkaXRpb25hbF9pbmZvMyI6Ik5BIiwiYWRkaXRpb25hbF9pbmZvMiI6Ik5BIiwiYWRkaXRpb25hbF9pbmZvNSI6Ik5BIiwiYWRkaXRpb25hbF9pbmZvNCI6Ik5BIn0sIml0ZW1jb2RlIjoiRElSRUNUIiwidHJhbnNhY3Rpb25fZXJyb3JfY29kZSI6IlRSUzAwMDAiLCJvYmplY3RpZCI6InRyYW5zYWN0aW9uIiwiY2FyZCI6eyJjYXJkX2VuZCI6IjExNjQiLCJ0eXBlIjoiQ1JFRElUIiwiaXNzdWVyIjoiWWVzIEJhbmsiLCJtYXNrZWRfdmFsdWUiOiJ4eHh4eHh4eHh4eHgxMTY0IiwibmV0d29yayI6Ik1BU1RFUiJ9LCJjaGFyZ2VfYW1vdW50IjoiMS4wMCJ9.7yAkzMIk7L323twTi1wD0cuvCopgWiSvKGOpVtnKmVI&orderid=DRDR43fgh
```
```json Decrypted Transaction Response
{
   "objectid":"transaction",
   "mercid":"BDMERCID",
   "transaction_date":"2020-11-20T13:55:59+05:30",
   "surcharge":"2.00",
   "payment_method_type":"netbanking",
   "amount":"300.00",
   "ru":"https://example.com/pgresponse/modal/redirect",
   "orderid":"yukkq8hnxcrztea8op24bk",
   "transaction_error_type":"success",
   "discount":"0.00",
   "transactionid":"U1230000041968",
   "txn_process_type":"nb",
   "bankid":"123",
   "additional_info":{
      "additional_info1":"Details1",
      "additional_info2":"Details2",
      "additional_info3":"NA",
      "additional_info4":"NA",
      "additional_info5":"NA",
      "additional_info6":"NA",
      "additional_info7":"NA",
      "additional_info8":"NA",
      "additional_info9":"NA",
      "additional_info10":"NA"
   },
   "itemcode":"DIRECT",
   "transaction_error_code":"TRS0000",
   "currency":"356",
   "auth_status":"0300",
   "transaction_error_desc":"Transaction Successful",
   "charge_amount":"302.00",
   "payment_category":"01"
}
```

### 7.3 Decrypted `transaction_response` for Account Validation Service (AVS) flow

```json UPI
{
"mercid":"BDMERCID",
"transaction_date":"2023-11-26T21:26:36+05:30",
"surcharge":"0.00",
"payment_method_type":"upi",
"amount":"1.00",
"ru":"https://www.merchanturl.com/web/",
"orderid":"ORDERTESTS123",
"transaction_error_type":"success",
"discount":"0.00",
"payment_category":"10",
"bank_ref_no":"333075791359",
"transactionid":"ZIC51462622347",
"upi":{
"vpa":"johndoe@ybl",
"masked_vpa":"xxxxxx@ybl"
},
"txn_process_type":"collect",
"bankid":"IC5",
"additional_info":{
    "additional_info1":"Details1",
		"additional_info2":"Details2",
    "additional_info3":"NA",
    "additional_info4":"NA",
    "additional_info5":"NA",
    "additional_info6":"NA",
    "additional_info7":"NA"
},
"itemcode":"DIRECT",
"transaction_error_code":"TRS0000",
"currency":"356",
"auth_status":"0300",
"transaction_error_desc":"Transaction Successful",
"objectid":"transaction",
"charge_amount":"1.00",
"avs":{
"bankaccount":[
{
"number":"xxxxxxxxxxx4021",
"ifsc":"YESB0000419",
"holder_name":"John Doe"
}
]
}
}

```
```json Debit Card
{
"mercid":"BDMERCID",
"transaction_date":"2023-10-31T16:29:58+05:30",
"surcharge":"0.00",
"payment_method_type":"card",
"amount":"1.00",
"ru":" https://www.merchant.com/web",
"orderid":"ORDERTXN123",
"transaction_error_type":"success",
"discount":"0.00",
"payment_category":"03",
"bank_ref_no":"024412",
"transactionid":"ZAX61500643456",
"txn_process_type":"3ds",
"authcode":"024512",
"bankid":"AX6",
"additional_info":{
    "additional_info1":"Details1",
		"additional_info2":"Details2",
    "additional_info3":"NA",
    "additional_info4":"NA",
    "additional_info5":"NA",
    "additional_info6":"NA",
    "additional_info7":"NA"
},
"itemcode":"VDDIRECT",
"transaction_error_code":"TRS0000",
"currency":"356",
"auth_status":"0300",
"transaction_error_desc":"Transaction Successful",
"objectid":"transaction",
"card":{
"card_end":"2263",
"type":"DEBIT",
"issuer":"ICICI Bank",
"masked_value":"xxxxxxxxxxxx2263",
"network":"VISA"
},
"charge_amount":"1.00"
}

```
```json Net Banking
{
"mercid":"BDMERCID",
"transaction_date":"2023-11-27T11:48:27+05:30",
"surcharge":"0.00",
"payment_method_type":"netbanking",
"amount":"1.00",
"ru":"https://www.merchanturl.com/web/",
"orderid":"ORDERTESTS1234",
"transaction_error_type":"success",
"discount":"0.00",
"payment_category":"01",
"bank_ref_no":"IGAQMTMUP3",
"transactionid":"ZSBI1589552520",
"txn_process_type":"nb",
"bankid":"SBI",
"additional_info":{
    "additional_info1":"Details1",
		"additional_info2":"Details2",
    "additional_info3":"NA",
    "additional_info4":"NA",
    "additional_info5":"NA",
    "additional_info6":"NA",
    "additional_info7":"NA"
},
"itemcode":"DIRECT",
"transaction_error_code":"TRS0000",
"currency":"356",
"auth_status":"0300",
"transaction_error_desc":"Transaction Successful",
"objectid":"transaction",
"charge_amount":"1.00"
}

```

Alternately, merchant can also use the `orderid` parameter and call the [Retrieve Transaction API](https://docs.billdesk.io/reference/post-payments-v1_2-transactions-get) to query the status of the transaction

***

# 5. Next Steps

Once the transaction is completed, the below 3 APIs are available to Create a Refund or Query the status of a transaction / refund

<div class="bd-cards cards-2">

<Callout icon="💬" theme="default">
  ### Transaction Status Check

  Merchant can check the status of a transaction at any point using the [Retrieve Transaction API](https://docs.billdesk.io/reference/post-payments-v1_2-transactions-get)
</Callout>

<Callout icon="💬" theme="default">
  ### Refunds

  Merchant can initiate a refund for any successful transaction using the [Create Refund API](https://billdesk.readme.io/reference/createrefund)
</Callout>

<Callout icon="💬" theme="default">
  ### Refund Status Check

  Merchant can check the status of a Refund at any point using the [Retrieve Refund API](https://billdesk.readme.io/reference/retrieverefund)
</Callout>

</div>

***

# 6. See Also

<div class="bd-cards cards-1">

<Callout icon="💬" theme="default">
  ### Review the associated add- on workflows

  Here are quick links to access the Account Validation Service (AVS) and Split Settlement workflows elaborated in the sections above

  <a href="https://billdesk.readme.io/docs/avs">AVS</a>

  <a href="https://billdesk.readme.io/docs/spilt-settlements">Split Settlments</a>
</Callout>

</div>