> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search PaymentGateways

> Search and list PaymentGateway records with filtering, sorting, and pagination.

A **PaymentGateway** represents a connection to one of the supported payment gateways used to process card payments.

Each gateway can be associated to one or more locations (`Business` entity) via the `DefaultPaymentGatewayId` property on the business. A gateway is configured with a specific `PaymentGatewayType` (e.g. `stripe`, `braintree`, `adyen`) and the corresponding credentials (`AccessToken`, `ConfigurationXml`).

An optional `TransactionFee` can be set to track per-transaction costs, and a `FinancialAccountId` and `TaxRateId` can be linked for accounting purposes.

## Authentication

<Note>
  This endpoint requires OAuth2 authentication. Include a valid bearer token in the `Authorization` header.
  The authenticated user must be a full unrestricted administrator or have the **`PaymentGateway-List`** role.
</Note>

## Enums

<Accordion title="ePaymentGatewayType — PaymentGatewayType values">
  | Value | Name                               |
  | ----- | ---------------------------------- |
  | 0     | None                               |
  | 1     | test                               |
  | 2     | authorize\_net                     |
  | 3     | beanstream                         |
  | 4     | braintree                          |
  | 6     | first\_data\_e4                    |
  | 7     | jetpay\_v2                         |
  | 8     | merchant\_e\_solutions             |
  | 9     | netbilling                         |
  | 10    | payment\_express                   |
  | 12    | sage                               |
  | 13    | stripe                             |
  | 14    | trans\_first                       |
  | 15    | usa\_epay                          |
  | 17    | blue\_pay                          |
  | 18    | cyber\_source                      |
  | 19    | elavon                             |
  | 20    | first\_data\_e4\_v27               |
  | 21    | litle                              |
  | 22    | mercury                            |
  | 23    | nmi                                |
  | 24    | payflow\_pro                       |
  | 25    | quantum                            |
  | 26    | secure\_net                        |
  | 27    | trust\_commerce                    |
  | 28    | worldpay                           |
  | 29    | wirecard                           |
  | 30    | paymill                            |
  | 31    | merchant\_warrior                  |
  | 32    | nab\_transact                      |
  | 33    | secure\_pay\_au                    |
  | 34    | eway                               |
  | 35    | migs                               |
  | 36    | pin                                |
  | 37    | ogone                              |
  | 38    | realex                             |
  | 39    | moneris                            |
  | 40    | psi\_gate                          |
  | 41    | epay                               |
  | 42    | hdfc                               |
  | 43    | net\_pay                           |
  | 44    | redsys                             |
  | 45    | iridium                            |
  | 46    | barclays\_epdq\_extra\_plus        |
  | 49    | paypal                             |
  | 50    | payex                              |
  | 51    | openpay                            |
  | 52    | hps                                |
  | 53    | checkout                           |
  | 54    | checkout\_v2                       |
  | 55    | worldpay\_us                       |
  | 56    | conekta                            |
  | 57    | orbital                            |
  | 59    | barclaycard\_smartpay              |
  | 60    | trans\_first\_transaction\_express |
  | 63    | forte                              |
  | 65    | citrus\_pay                        |
  | 66    | payu\_latam                        |
  | 67    | global\_collect                    |
  | 68    | cayan                              |
  | 69    | clearhaus                          |
  | 70    | sage\_pay                          |
  | 71    | safe\_charge                       |
  | 72    | mercado\_pago                      |
  | 73    | payeezy                            |
  | 200   | acapture                           |
  | 201   | adyen                              |
  | 203   | banco\_sabadell                    |
  | 208   | blue\_snap                         |
  | 209   | borgun                             |
  | 210   | bpoint                             |
  | 212   | bridge\_pay                        |
  | 213   | card\_connect                      |
  | 214   | card\_stream                       |
  | 215   | cardprocess                        |
  | 217   | cecabank                           |
  | 218   | cenpos                             |
  | 224   | creditcall                         |
  | 225   | credorax                           |
  | 226   | ct\_payment                        |
  | 227   | culqi                              |
  | 229   | data\_cash                         |
  | 230   | diamond\_mind                      |
  | 231   | dibs                               |
  | 232   | digitzs                            |
  | 234   | element                            |
  | 237   | eway\_rapid                        |
  | 238   | ezic                               |
  | 239   | fat\_zebra                         |
  | 242   | first\_giving                      |
  | 243   | first\_pay                         |
  | 244   | flo2cash                           |
  | 245   | flo2cash\_simple                   |
  | 247   | global                             |
  | 249   | global\_iris                       |
  | 250   | global\_transport                  |
  | 253   | iats\_payments                     |
  | 255   | iveri                              |
  | 256   | ixopay                             |
  | 257   | jabstry                            |
  | 258   | jetpay                             |
  | 260   | kushki                             |
  | 261   | latitude19                         |
  | 263   | maxipago                           |
  | 266   | merchant\_partners                 |
  | 272   | mundipagg                          |
  | 274   | ncr\_secure\_pay                   |
  | 280   | optimal\_payments                  |
  | 282   | pay\_conex                         |
  | 283   | pay\_junction\_v2                  |
  | 288   | paymentez                          |
  | 291   | paystation                         |
  | 294   | pro\_pay                           |
  | 296   | qbms                               |
  | 298   | quickpay                           |
  | 299   | quickpay\_v10                      |
  | 300   | qvalent                            |
  | 303   | s5                                 |
  | 309   | securion\_pay                      |
  | 312   | tns                                |
  | 317   | vanco                              |
  | 318   | visanet\_peru                      |
  | 319   | wepay                              |
  | 320   | stripe\_payment\_intents           |
  | 321   | stripeACH                          |
  | 323   | quickbooks                         |
  | 324   | monei                              |
  | 401   | HostedPaymentPage1                 |
  | 402   | HostedPaymentPage2                 |
  | 403   | HostedPaymentPage3                 |
</Accordion>

## Query Parameters

### Pagination & Sorting

<ParamField query="page" type="integer" default="1">
  The page number to retrieve.
</ParamField>

<ParamField query="size" type="integer" default="25">
  The number of records per page.
</ParamField>

<ParamField query="orderBy" type="string">
  The property name to sort results by (e.g. `Name`, `CreatedOn`).
</ParamField>

<ParamField query="dir" type="integer">
  Sort direction. `0` for ascending, `1` for descending.
</ParamField>

### Filters

<ParamField query="PaymentGateway_Business" type="integer">
  Filter by Business Id.
</ParamField>

<ParamField query="PaymentGateway_Name" type="string">
  Filter by display name for this payment gateway configuration.
</ParamField>

<ParamField query="PaymentGateway_PaymentGatewayType" type="integer">
  Filter by the payment provider to use (e.g. stripe, braintree, adyen). Determines which credentials are required.
</ParamField>

<ParamField query="PaymentGateway_Attempt3dSecure" type="boolean">
  Filter by Attempt3d Secure.
</ParamField>

<ParamField query="PaymentGateway_AccessToken" type="string">
  Filter by aPI access token or secret key for authenticating with the payment provider.
</ParamField>

<ParamField query="PaymentGateway_ConfigurationXml" type="string">
  Filter by provider-specific configuration in XML format (e.g. merchant ID, additional keys).
</ParamField>

<ParamField query="PaymentGateway_XmlResponse" type="string">
  Filter by last XML response returned by the payment provider.
</ParamField>

<ParamField query="PaymentGateway_TransactionFee" type="number">
  Filter by fee charged per transaction processed through this gateway.
</ParamField>

<ParamField query="PaymentGateway_FinancialAccount" type="integer">
  Filter by Financial Account Id.
</ParamField>

<ParamField query="PaymentGateway_TaxRate" type="integer">
  Filter by Tax Rate Id.
</ParamField>

### Range Filters

<ParamField query="from_PaymentGateway_TransactionFee" type="number">
  Filter by fee charged per transaction processed through this gateway greater than or equal to this value.
</ParamField>

<ParamField query="to_PaymentGateway_TransactionFee" type="number">
  Filter by fee charged per transaction processed through this gateway less than or equal to this value.
</ParamField>

<ParamField query="from_PaymentGateway_CreatedOn" type="string">
  Filter records created on or after this date. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="to_PaymentGateway_CreatedOn" type="string">
  Filter records created on or before this date. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="from_PaymentGateway_UpdatedOn" type="string">
  Filter records updated on or after this date. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="to_PaymentGateway_UpdatedOn" type="string">
  Filter records updated on or before this date. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

## Code Examples

### Simple listing

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET \
    "https://spaces.nexudus.com/api/billing/paymentgateways?page=1&size=15&orderBy=Name&dir=0" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/billing/paymentgateways?' + new URLSearchParams({
      page: 1,
      size: 15,
      orderBy: 'Name',
      dir: 1 // Ascending
    }),
    {
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN'
      }
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://spaces.nexudus.com/api/billing/paymentgateways',
      params={
          'page': 1,
          'size': 15,
          'orderBy': 'Name',
          'dir': 0 // Ascending
      },
      headers={
          'Authorization': 'Bearer YOUR_TOKEN'
      }
  )

  data = response.json()
  ```
</CodeGroup>

### Filtering by Name

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET \
    "https://spaces.nexudus.com/api/billing/paymentgateways?PaymentGateway_Name=example-value&orderBy=Name&dir=0" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/billing/paymentgateways?' + new URLSearchParams({
      PaymentGateway_Name: 'example-value',
      orderBy: 'Name',
      dir: 1
    }),
    {
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN'
      }
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://spaces.nexudus.com/api/billing/paymentgateways',
      params={
          'PaymentGateway_Name': 'example-value',
          'orderBy': 'Name',
          'dir': 0 // Ascending
      },
      headers={
          'Authorization': 'Bearer YOUR_TOKEN'
      }
  )

  data = response.json()
  ```
</CodeGroup>

### Range filters

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET \
    "https://spaces.nexudus.com/api/billing/paymentgateways?from_PaymentGateway_UpdatedOn=2025-01-01T00:00&to_PaymentGateway_UpdatedOn=2025-12-31T23:59&orderBy=UpdatedOn&dir=0" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/billing/paymentgateways?' + new URLSearchParams({
      from_PaymentGateway_UpdatedOn: '2025-01-01T00:00',
      to_PaymentGateway_UpdatedOn: '2025-12-31T23:59',
      orderBy: 'UpdatedOn',
      dir: 1 // Descending
     }),
    {
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN'
      }
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://spaces.nexudus.com/api/billing/paymentgateways',
      params={
          'from_PaymentGateway_UpdatedOn': '2025-01-01T00:00',
          'to_PaymentGateway_UpdatedOn': '2025-12-31T23:59',
          'orderBy': 'UpdatedOn',
          'dir': 1 // Descending
      },
      headers={
          'Authorization': 'Bearer YOUR_TOKEN'
      }
  )

  data = response.json()
  ```
</CodeGroup>

## Response

### 200

<ResponseField name="Records" type="PaymentGateway[]">
  The list of PaymentGateway records matching the query. See the [Get one PaymentGateway](/rest-api/billing/get-paymentgateways-by-id) endpoint for the full list of properties returned for each record.
</ResponseField>

<Warning>
  **Partial records** — The listing endpoint returns a summary representation of each PaymentGateway. The following fields are **not populated** in the `Records[]` response: `ConfigurationXml`, `TransactionFee`.

  To get all fields, fetch the full record using the [Get one PaymentGateway](/rest-api/billing/get-paymentgateways-by-id) endpoint.

  **Important for updates:** When updating a record via `PUT`, always retrieve the full record with a `GET` request first, apply your changes to that complete data, and then send the updated record. Do not use data from a listing response as the base for a `PUT` request, as missing fields may be unintentionally cleared.
</Warning>

<ResponseField name="CurrentPage" type="integer">
  Current page number.
</ResponseField>

<ResponseField name="CurrentPageSize" type="integer">
  Number of records per page.
</ResponseField>

<ResponseField name="CurrentOrderField" type="string">
  The field used for sorting.
</ResponseField>

<ResponseField name="CurrentSortDirection" type="integer">
  The sort direction (`0` = ascending, `1` = descending).
</ResponseField>

<ResponseField name="FirstItem" type="integer">
  Index of the first item on the current page.
</ResponseField>

<ResponseField name="LastItem" type="integer">
  Index of the last item on the current page.
</ResponseField>

<ResponseField name="TotalItems" type="integer">
  Total number of matching records across all pages.
</ResponseField>

<ResponseField name="TotalPages" type="integer">
  Total number of pages.
</ResponseField>

<ResponseField name="HasNextPage" type="boolean">
  Whether there is a next page of results.
</ResponseField>

<ResponseField name="HasPreviousPage" type="boolean">
  Whether there is a previous page of results.
</ResponseField>

```json Example Response theme={null}
{
  "Records": [
    {
      "BusinessId": 0,
      "Name": "",
      "PaymentGatewayType": 0,
      "Attempt3dSecure": false,
      "AccessToken": null,
      "XmlResponse": null,
      "FinancialAccountId": null,
      "TaxRateId": null,
      "Id": 87654321,
      "UpdatedOn": "2025-01-15T10:30:00Z",
      "CreatedOn": "2025-01-10T08:00:00Z",
      "UniqueId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "UpdatedBy": "admin@example.com",
      "IsNew": false,
      "SystemId": null,
      "ToStringText": "PaymentGateway Example",
      "LocalizationDetails": null,
      "CustomFields": null
    }
  ],
  "CurrentPageSize": 15,
  "CurrentPage": 1,
  "CurrentOrderField": "Name",
  "CurrentSortDirection": 1,
  "FirstItem": 1,
  "HasNextPage": false,
  "HasPreviousPage": false,
  "LastItem": 1,
  "PageNumber": 1,
  "PageSize": 15,
  "TotalItems": 1,
  "TotalPages": 1
}
```
