> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://beta-docs.payabli.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://beta-docs.payabli.com/_mcp/server.

# List subscriptions by organization

GET https://api-sandbox.payabli.com/api/Query/subscriptions/org/{orgId}

Returns a list of subscriptions for a single org. Use filters to limit results.

Reference: https://beta-docs.payabli.com/api-reference/subscription/get-list-of-subscriptions-for-an-org

## Authentication

- `requestToken` header (required) — API Key authentication via header

## Servers

- `https://api-sandbox.payabli.com/api` (Sandbox, default)
- `https://api.payabli.com/api` (Production)

## Request

### Path parameters

- `orgId` (integer, required) — The numeric identifier for organization, assigned by Payabli.

### Query parameters

- `fromRecord` (integer, optional, default: 0) — The number of records to skip before starting to collect the result set.
- `limitRecord` (integer, optional, default: 20) — Max number of records to return for the query. Use `0` or negative value to return all records.
- `parameters` (map from string to string, optional) — Collection of field names, conditions, and values used to filter the query. **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.** Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response won't be filtered. Instead, copy the request, remove `parameters=` and run the request in a different client. For example: \--url [https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000\&limitRecord=20](https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount\(gt\)=1000\&limitRecord=20) should become: \--url [https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000\&limitRecord=20](https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount\(gt\)=1000\&limitRecord=20) See [Filters and Conditions Reference](/developer-guides/reporting-filters-and-conditions-reference) for more information. **List of field names accepted:** * `startDate` (gt, ge, lt, le, eq, ne) * `endDate` (gt, ge, lt, le, eq, ne) * `nextDate` (gt, ge, lt, le, eq, ne) * `frequency` (in, nin, ne, eq) * `method` (in, nin, eq, ne) * `totalAmount` (gt, ge, lt, le, eq, ne) * `netAmount` (gt, ge, lt, le, eq, ne) * `feeAmount` (gt, ge, lt, le, eq, ne) * `status` (in, nin, eq, ne) * `untilcancelled` (eq, ne) * `payaccountLastfour` (nct, ct) * `payaccountType` (ne, eq, in, nin) * `payaccountCurrency` (ne, eq, in, nin) * `customerFirstname` (ct, nct, eq, ne) * `customerLastname` (ct, nct, eq, ne) * `customerName` (ct, nct) * `customerId` (eq, ne) * `customerNumber` (ct, nct, eq, ne) * `customerCompanyname` (ct, nct, eq, ne) * `customerAddress` (ct, nct, eq, ne) * `customerCity` (ct, nct, eq, ne) * `customerZip` (ct, nct, eq, ne) * `customerState` (ct, nct, eq, ne) * `customerCountry` (ct, nct, eq, ne) * `customerPhone` (ct, nct, eq, ne) * `customerEmail` (ct, nct, eq, ne) * `customerShippingAddress` (ct, nct, eq, ne) * `customerShippingCity` (ct, nct, eq, ne) * `customerShippingZip` (ct, nct, eq, ne) * `customerShippingState` (ct, nct, eq, ne) * `customerShippingCountry` (ct, nct, eq, ne) * `orgId` (eq) * `paypointId` (ne, eq) * `paypointLegal` (ne, eq, ct, nct) * `paypointDba` (ne, eq, ct, nct) * `orgName` (ne, eq, ct, nct) * `externalPaypointId` (ct, nct, ne, eq) * `subId` (eq, ne) * `orderDescription` (ct, nct) * `cycles` (eq, ne, gt, ge, lt, le) * `leftcycles` (eq, ne, gt, ge, lt, le) * `createdAt` (eq, ne, gt, ge, lt, le) * `updatedOn` (eq, ne, gt, ge, lt, le) * `invoiceNumber` (ct, nct) * `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name **List of comparison operators accepted:** * `eq` or empty => equal * `gt` => greater than * `ge` => greater or equal * `lt` => less than * `le` => less or equal * `ne` => not equal * `ct` => contains * `nct` => not contains * `in` => inside array * `nin` => not inside array
- `sortBy` (string, optional) — The field name to use for sorting results. Use `desc(field_name)` to sort descending by `field_name`, and use `asc(field_name)` to sort ascending by `field_name`.

## Response

### 200

Success

- `Records` (SubscriptionQueryRecords, optional)
- `Summary` (QuerySummary, optional)

## Errors

### 400 Bad Request Error

Bad request/ invalid data

- `any`

### 401 Unauthorized Error

Unauthorized request.

- `any`

### 500 Internal Server Error

Internal API Error

- `any`

### 503 Service Unavailable Error

Database connection error

- `isSuccess` (boolean, optional) — Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure.
- `responseData` (map from string to any, optional) — The object containing the response data.
- `responseText` (string, optional) — Response text for operation: 'Success' or 'Declined'.

## Types

### SubscriptionQueryRecords

- `CreatedAt` (datetime, optional) — Timestamp of when the subscription ws created, in UTC.
- `Customer` (QueryTransactionPayorData, optional)
- `EndDate` (datetime, optional) — The subscription's end date.
- `EntrypageId` (long, optional) — If applicable, the internal reference ID to the payment page capturing the payment.
- `ExternalPaypointID` (string, optional) — A custom identifier for the paypoint, if applicable. Like `entrypoint` is the Payabli identifier for the merchant, `externalPaypointId` is a custom field you can use to include the merchant's ID from your own systems.
- `FeeAmount` (double, optional) — Fee applied to the subscription.
- `Frequency` (string, optional) — The subscription's frequency.
- `IdSub` (long, optional) — The subscription's ID.
- `InvoiceData` (BillData, optional)
- `LastRun` (datetime, optional) — The last time the subscription was processed.
- `LastUpdated` (datetime, optional) — The last date and time the subscription was updated.
- `LeftCycles` (integer, optional) — The number of cycles the subscription has left.
- `Method` (string, optional) — The subscription's payment method.
- `NetAmount` (double, optional) — The subscription amount, minus any fees.
- `NextDate` (datetime, optional) — The next date the subscription will be processed.
- `ParentOrgName` (string, optional) — The name of the parent organization.
- `PaymentData` (QueryPaymentData, optional)
- `PaypointDbaname` (string, optional) — The paypoint's DBA name.
- `PaypointEntryname` (string, optional) — The paypoint's entryname.
- `PaypointId` (long, optional) — The paypoint's ID. Note that this is different than the entryname.
- `PaypointLegalname` (string, optional) — The paypoint's legal name.
- `PlanId` (integer, optional) — Payment plan ID.
- `Source` (string, optional) — Custom identifier to indicate the transaction or request source.
- `StartDate` (datetime, optional) — The subscription start date.
- `SubEvents` (list of GeneralEvents, optional) — Events associated with the subscription.
- `SubStatus` (integer, optional) — The subscription's status. - 0: Paused - 1: Active
- `TotalAmount` (double, optional) — The subscription amount, including any fees.
- `TotalCycles` (integer, optional) — The total number of cycles the subscription is set to run.
- `UntilCancelled` (boolean, optional) — When `true`, the subscription has no explicit end date and will run until canceled.

### QuerySummary

- `pageIdentifier` (string, optional) — Auxiliary validation used internally by payment pages and components.
- `pageSize` (integer, optional) — Number of records on each response page.
- `totalAmount` (double, optional) — Total amount for the records.
- `totalNetAmount` (double, optional) — Total net amount for the records.
- `totalPages` (integer, optional) — Total number of records in response.
- `totalRecords` (integer, optional) — Total number of records in response.

### QueryTransactionPayorData

- `AdditionalData` (string, optional) — Custom dictionary of key:value pairs. You can use this field to store any data related to the object or for your system. Example usage: ```json { "additionalData": { "key1": "value1", "key2": "value2", "key3": "value3" } } ```
- `BillingAddress1` (string, optional) — Customer's billing address.
- `BillingAddress2` (string, optional) — Additional line for Customer's billing address.
- `BillingCity` (string, optional) — Customer's billing city.
- `BillingCountry` (string, optional) — Customer's billing country.
- `BillingEmail` (string, optional) — Customer's email address.
- `BillingPhone` (string, optional) — Customer's phone number.
- `BillingState` (string, optional) — Customer's billing state. Must be 2-letter state code for address in US.
- `BillingZip` (string, optional) — Customer's billing ZIP code.
- `CompanyName` (string, optional) — Customer's company name.
- `CreatedAt` (datetime, optional) — Timestamp of when record was created, in UTC.
- `customerId` (long, optional) — The Payabli-generated unique ID for the customer.
- `CustomerId` (long, optional) — The Payabli-generated unique ID for the customer.
- `CustomerNumber` (string, optional) — User-provided unique identifier for the customer. This is typically the customer ID from your own system.
- `customerStatus` (integer, optional) — Customer Status. Possible values: - `-99` Deleted - `0` Inactive - `1` Active - `85` Locked (typically due to multiple failed login attempts)
- `FirstName` (string, optional) — Customer/Payor first name.
- `Identifiers` (list of any, optional) — Array of field names to be used as identifiers.
- `LastName` (string, optional) — Customer/Payor last name.
- `ShippingAddress1` (string, optional) — The shipping address.
- `ShippingAddress2` (string, optional) — Additional line for shipping address.
- `ShippingCity` (string, optional) — Shipping city.
- `ShippingCountry` (string, optional) — Shipping address country.
- `ShippingState` (string, optional) — Shipping state or province.
- `ShippingZip` (string, optional) — Shipping ZIP code. For Pay In functions, this field supports 5-digit and 9-digit ZIP codes and alphanumeric Canadian postal codes. For example: "37615-1234" or "37615".

### BillData

- `AdditionalData` (string, optional) — Custom dictionary of key:value pairs. You can use this field to store any data related to the object or for your system. Example usage: ```json { "additionalData": { "key1": "value1", "key2": "value2", "key3": "value3" } } ```
- `attachments` (list of FileContent, optional) — Array of `fileContent` objects with attached documents. Max upload size is 30 MB.
- `company` (string, optional) — Company name of the recipient of the invoice.
- `discount` (double, optional) — Discount applied to the invoice.
- `dutyAmount` (double, optional) — Duty amount.
- `firstName` (string, optional) — First name of the recipient of the invoice.
- `freightAmount` (double, optional) — Freight/shipping amount.
- `frequency` (enum, optional) — Frequency of scheduled invoice.
  - Allowed values: `one-time`, `weekly`, `every2weeks`, `every6months`, `monthly`, `every3months`, `annually`
- `invoiceAmount` (double, optional) — Invoice total amount.
- `invoiceDate` (date, optional) — Invoice date in any of the accepted formats: YYYY-MM-DD, MM/DD/YYYY.
- `invoiceDueDate` (date, optional) — Invoice due date in one of the accepted formats: YYYY-MM-DD, MM/DD/YYYY.
- `invoiceEndDate` (date, optional) — Indicate the date to finish a scheduled invoice cycle (`invoiceType`` = 1) in any of the accepted formats: YYYY-MM-DD, MM/DD/YYYY.
- `invoiceNumber` (string, optional) — Invoice number. Identifies the invoice under a paypoint.
- `invoiceStatus` (integer, optional) — Status for invoice. The accepted status values are: - 0 draft - 1 active - 2 partially paid - 4 paid/complete - 99 cancelled
- `invoiceType` (integer, optional) — Type of invoice. Only `0` for one-time invoices is currently supported.
- `items` (list of BillItem, optional) — Array of line items included in the invoice.
- `lastName` (string, optional) — Last name of the recipient of the invoice.
- `notes` (string, optional) — Notes included in the invoice.
- `paymentTerms` (enum, optional) — Payment terms for invoice. If no terms are defined, then reponse data for this field defaults to `N30`.
  - Allowed values: `PIA`, `CIA`, `UR`, `NET10`, `NET20`, `NET30`, `NET45`, `NET60`, `NET90`, `EOM`, `MFI`, `5MFI`, `10MFI`, `15MFI`, `20MFI`, `2/10NET30`, `UF`, `10UF`, `20UF`, `25UF`, `50UF`
- `purchaseOrder` (string, optional) — Purchase order number.
- `shippingAddress1` (string, optional) — The shipping address.
- `shippingAddress2` (string, optional) — Additional line for shipping address.
- `shippingCity` (string, optional) — Shipping city.
- `shippingCountry` (string, optional) — Shipping address country.
- `shippingEmail` (string, optional) — Shipping recipient's contact email address.
- `shippingFromZip` (string, optional) — Sender shipping ZIP code.
- `shippingPhone` (string, optional) — Recipient phone number.
- `shippingState` (string, optional) — Shipping state or province.
- `shippingZip` (string, optional) — Shipping ZIP code. For Pay In functions, this field supports 5-digit and 9-digit ZIP codes and alphanumeric Canadian postal codes. For example: "37615-1234" or "37615".
- `summaryCommodityCode` (string, optional) — Commodity code.
- `tax` (double, optional) — Tax rate in percent applied to the invoice.
- `termsConditions` (string, optional) — Custom terms and conditions included in the invoice.

### QueryPaymentData

- `AccountExp` (string, optional) — Expiration date of card used in transaction.
- `accountId` (string, optional) — Custom identifier for payment connector.
- `AccountType` (string, optional) — Bank account type or card brand.
- `AccountZip` (string, optional) — ZIP code for card used in transaction.
- `binData` (BinData, optional) — Object containing information related to the card. This object is `null` unless the payment method is card. If the payment method is Apple Pay, the binData will be related to the DPAN (device primary account number), not the card connected to Apple Pay.
- `HolderName` (string, optional) — Account holder name for the method.
- `Initiator` (string, optional) — **Strongly recommended** The cardholder-initiated transaction (CIT) or merchant-initiated transaction (MIT) indicator for the transaction. If you don't specify a value, Payabli defaults to `merchant`. Available values: - `payor`: For cardholder-initiated transactions - `merchant`: For merchant-initiated transactions See [Understanding CIT and MIT Indicators](/guides/money-in-cit-mit) for more information.
- `MaskedAccount` (string, optional) — Masked card or bank account used in transaction. In the case of Apple Pay, this is a masked DPAN (device primary account number).
- `orderDescription` (string, optional) — Text description of the transaction.
- `paymentDetails` (PaymentDetail, optional) — Details about the payment.
- `Sequence` (string, optional) — The order of the transaction for cardholder-initiated transaction (CIT) and merchant-initiated transaction (MIT) purposes. This field is automatically detected and populated by Payabli. Available values: - `first`: The first use of the payment method. This is almost always a cardholder-initiated transaction. - `subsequent`: For merchant-initiated transactions after the first use of the payment method. See [Understanding CIT and MIT Indicators](/guides/money-in-cit-mit) for more information.
- `SignatureData` (string, optional)
- `StoredId` (string, optional) — Identifier of stored payment method used in transaction.
- `StoredMethodUsageType` (string, optional) — **Strongly recommended** The usage type for the stored method, used for merchant-initiated transactions (MIT). If you don't specify a value, Payabli defaults to `unscheduled`. Available values: - `unscheduled`: This type is used for transactions that are one-time or otherwise not pre-scheduled. - `subscription`: This type is used for subscription payments. For example, monthly rental fees or ongoing service subscriptions. - `recurring`: This type is used for recurring payments that occur per a set plan. For example, splitting an HOA special assessment over 6 monthly payments. See [Understanding CIT and MIT Indicators](/guides/money-in-cit-mit) for more information.

### GeneralEvents

- `description` (string, optional) — Event description.
- `eventTime` (datetime, optional) — Event timestamp, in UTC.
- `extraData` (map from string to any, optional) — Extra data.
- `refData` (string, optional) — Reference data.
- `source` (string, optional) — The event source.

### FileContent

Contains details about a file. See See [fileObject Object Model](/api-reference/schemas/filecontent) for a complete reference. Max upload size is 30 MB.

- `fContent` (string, optional) — Content of file, Base64-encoded Ignored if furl is specified. Max upload size is 30 MB.
- `filename` (string, optional) — The name of the attached file.
- `ftype` (enum, optional) — The MIME type of the file (if content is provided)
  - Allowed values: `pdf`, `doc`, `docx`, `jpg`, `jpeg`, `png`, `gif`, `txt`
- `furl` (string, optional) — Optional url provided to show or download the file remotely

### BillItem

- `itemCost` (double, required) — Item or product price per unit.
- `itemCategories` (list of string, optional) — Array of tags classifying item or product.
- `itemCommodityCode` (string, optional) — Item or product commodity code. Max length of 250 characters.
- `itemDescription` (string, optional) — Item or product description. Max length of 250 characters.
- `itemMode` (integer, optional) — Internal class of item or product: value '0' is only for invoices , '1' for bills and, '2' common for both.
- `itemProductCode` (string, optional) — Item or product code. Max length of 250 characters.
- `itemProductName` (string, optional) — Item or product name. Max length of 250 characters.
- `itemQty` (integer, optional) — Quantity of item or product.
- `itemTaxAmount` (double, optional) — Tax amount applied to item or product.
- `itemTaxRate` (double, optional) — Tax rate applied to item or product.
- `itemTotalAmount` (double, optional) — Total amount in item or product.
- `itemUnitOfMeasure` (string, optional) — Unit of measurement. Max length of 100 characters.

### BinData

Object containing information related to the card. This object is `null` unless the payment method is card. If the payment method is Apple Pay, the binData will be related to the DPAN (device primary account number), not the card connected to Apple Pay.

- `binCardBrand` (string, optional) — The card brand. For example, Visa, Mastercard, American Express, Discover.
- `binCardCategory` (string, optional) — The category of the card, which indicates the card product. For example: Standard, Gold, Platinum, etc. The binCardCategory for prepaid cards is marked `PREPAID`.
- `binCardIssuer` (string, optional) — The name of the financial institution that issued the card.
- `binCardIssuerCountry` (string, optional) — The issuing financial institution's country name.
- `binCardIssuerCountryCodeA2` (string, optional) — The issuing financial institution's two-character ISO country code. See [this resource](https://www.iso.org/obp/ui/#search) for a list of codes.
- `binCardIssuerCountryNumber` (double, optional) — The issuing financial institution's ISO standard numeric country code. See [this resource](https://www.iso.org/obp/ui/#search) for a list of codes.
- `binCardType` (string, optional) — The type of card: Credit or Debit.
- `binMatchedLength` (double, optional) — The number of characters from the beginning of the card number that were matched against a Bank Identification Number (BIN) or the Card Range table.

### PaymentDetail

Details about the payment.

- `totalAmount` (double, required) — Total amount to be charged. If a service fee is sent, then this amount should include the service fee."
- `categories` (list of PaymentCategories, optional) — Array of payment categories/line items describing the amount to be paid **Note**: These categories are for information only and are not validated against the total amount provided.
- `checkImage` (map from string to any, optional) — Object containing image of paper check.
- `checkNumber` (string, optional) — A check number to be used in the ach transaction. **Required** for payment method = 'check'.
- `currency` (string, optional) — Currency code ISO-4217. If not code is provided the currency in the paypoint setting is taken. Default is **USD**.
- `serviceFee` (double, optional) — Service fee to be deducted from the total amount. This amount must be a number, percentages aren't accepted. If you are using a percentage-based fee schedule, you must calculate the value manually.
- `splitFunding` (list of SplitFundingContent, optional) — Split funding instructions for the transaction. See [Split a Transaction](/developer-guides/money-in-split-funding) for more.

### PaymentCategories

- `amount` (double, required) — Price/cost per unit of item or category.
- `label` (string, required) — Name of item or category.
- `description` (string, optional) — Description of item or category
- `qty` (integer, optional, default: 1) — Quatity of item or category

### SplitFundingContent

- `accountId` (string, optional) — The accountId for the account the split should be sent to.
- `amount` (double, optional) — Amount from the transaction to sent to this recipient.
- `description` (string, optional) — A description for the split.
- `recipientEntryPoint` (string, optional) — The entrypoint the split should be sent to.

## Examples

**Response**

```json
{
  "Records": {
    "CreatedAt": "2023-12-14T08:51:10Z",
    "Customer": {
      "AdditionalData": "AdditionalData",
      "BillingAddress1": "68 Golden Drive",
      "BillingAddress2": "",
      "BillingCity": "Johnson City",
      "BillingCountry": "US",
      "BillingEmail": "company@payabli.com",
      "BillingPhone": "",
      "BillingState": "TN",
      "BillingZip": "37612",
      "CompanyName": "Sunshine LLC",
      "CreatedAt": "2023-01-16T11:00:52Z",
      "customerId": 1323,
      "CustomerId": 4440,
      "CustomerNumber": "1234",
      "customerStatus": 1,
      "FirstName": "Lisandra",
      "Identifiers": [
        "\\\"firstname\\\"",
        "\\\"lastname\\\"",
        "\\\"email\\\""
      ],
      "LastName": "Smitch",
      "ShippingAddress1": "68 Golden Drive",
      "ShippingCity": "Johnson City",
      "ShippingCountry": "US",
      "ShippingState": "TN",
      "ShippingZip": "37612"
    },
    "EndDate": "2026-03-20T00:00:00Z",
    "EntrypageId": 0,
    "ExternalPaypointID": "f743aed24a-10",
    "FeeAmount": 0,
    "Frequency": "monthly",
    "IdSub": 580,
    "InvoiceData": {
      "AdditionalData": "AdditionalData",
      "frequency": "one-time",
      "invoiceAmount": 100,
      "invoiceNumber": "QA-1702561870",
      "invoiceStatus": 1,
      "invoiceType": 1,
      "items": [
        {
          "itemCost": 10,
          "itemDescription": "service",
          "itemMode": 1,
          "itemProductName": "Mat replacement",
          "itemQty": 5,
          "itemTotalAmount": 50
        },
        {
          "itemCost": 5,
          "itemDescription": "service",
          "itemMode": 1,
          "itemProductName": "Mat clean",
          "itemQty": 10,
          "itemTotalAmount": 50
        }
      ]
    },
    "LastRun": "2024-01-02T14:32:11Z",
    "LastUpdated": "2023-12-14T08:51:10Z",
    "LeftCycles": 20,
    "Method": "card",
    "NetAmount": 10,
    "NextDate": "2024-07-20T00:00:00Z",
    "ParentOrgName": "FitnessManager",
    "PaymentData": {
      "AccountExp": "0924",
      "AccountType": "unknow",
      "AccountZip": "90210",
      "binData": {
        "binCardBrand": "Visa",
        "binCardCategory": "PLATINUM",
        "binCardIssuer": "Bank of Example",
        "binCardIssuerCountry": "United States",
        "binCardIssuerCountryCodeA2": "US",
        "binCardIssuerCountryNumber": 840,
        "binCardType": "Credit",
        "binMatchedLength": 6
      },
      "HolderName": "Mr. Michael Abernathy",
      "Initiator": "payor",
      "MaskedAccount": "2222 4XXXXXX0010",
      "paymentDetails": {
        "totalAmount": 100,
        "currency": "USD",
        "serviceFee": 0
      },
      "Sequence": "subsequent",
      "StoredMethodUsageType": "subscription"
    },
    "PaypointDbaname": "Athlete Factory LLC",
    "PaypointEntryname": "473ac58b0",
    "PaypointId": 10,
    "PaypointLegalname": "Athlete Factory LLC",
    "PlanId": 1,
    "StartDate": "2024-07-20T00:00:00Z",
    "SubEvents": [
      {
        "description": "created",
        "eventTime": "2023-12-14T13:51:10Z",
        "refData": "00-3470dfe2658b492811630255602f3fb5-d06fe0f72110000-00"
      },
      {
        "description": "updated",
        "eventTime": "2023-12-15T10:30:00Z",
        "refData": "01-1234abcde6789fghij4567klmnopqr89-abcdefghi12345678-01",
        "source": "web app"
      }
    ],
    "SubStatus": 1,
    "TotalAmount": 100,
    "TotalCycles": 20,
    "UntilCancelled": false
  },
  "Summary": {
    "pageIdentifier": "XXXXXXXXXXXXXXXXXXX",
    "pageSize": 20,
    "totalAmount": 150.22,
    "totalNetAmount": 150.22,
    "totalPages": 1,
    "totalRecords": 2
  }
}
```

**SDK Code**

```python Example
import requests

url = "https://api-sandbox.payabli.com/api/Query/subscriptions/org/123"

querystring = {"fromRecord":"251","limitRecord":"0","sortBy":"desc(field_name)"}

headers = {"requestToken": "<apiKey>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Example
const url = 'https://api-sandbox.payabli.com/api/Query/subscriptions/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29';
const options = {method: 'GET', headers: {requestToken: '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.payabli.com/api/Query/subscriptions/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("requestToken", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Example
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/Query/subscriptions/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["requestToken"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java Example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-sandbox.payabli.com/api/Query/subscriptions/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29")
  .header("requestToken", "<apiKey>")
  .asString();
```

```php Example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-sandbox.payabli.com/api/Query/subscriptions/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29', [
  'headers' => [
    'requestToken' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Example
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/Query/subscriptions/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29");
var request = new RestRequest(Method.GET);
request.AddHeader("requestToken", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Example
import Foundation

let headers = ["requestToken": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Query/subscriptions/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```