> This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# List vcard transactions by org

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

Retrieve a list of virtual card transactions for an organization. Use filters to limit results.

Reference: https://docs.payabli.com/developers/api-reference/query/get-list-of-virtual-card-transactions-for-organization

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: payabliApi
  version: 1.0.0
paths:
  /Query/vcardsTransactions/org/{orgId}:
    get:
      operationId: list-vcards-transactions-org
      summary: Get list of virtual card transactions for an organization
      description: >-
        Retrieve a list of virtual card transactions for an organization. Use
        filters to limit results.
      tags:
        - subpackage_query
      parameters:
        - name: orgId
          in: path
          description: The numeric identifier for organization, assigned by Payabli.
          required: true
          schema:
            type: integer
        - name: fromRecord
          in: query
          description: >-
            The number of records to skip before starting to collect the result
            set.
          required: false
          schema:
            type: integer
            default: 0
        - name: limitRecord
          in: query
          description: >-
            Max number of records to return for the query. Use `0` or negative
            value to return all records.
          required: false
          schema:
            type: integer
            default: 20
        - name: parameters
          in: query
          description: >-
            Collection of field names, conditions, and values used to filter the
            query.


            <Info>
              **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/vcardsTransactions/org/236?parameters=transactionAmount(gt)=100&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/vcardsTransactions/org/236?transactionAmount(gt)=100&limitRecord=20
            </Info>


            List of field names accepted:

              - `identifier` (eq, ne, ct, nct)
              - `transactionType` (eq, ne, ct, nct)
              - `transactionStatus` (eq, ne, ct, nct, in, nin)
              - `transactionAmount` (eq, ne, gt, ge, lt, le, ct, nct)
              - `transactionCreatedOn` (eq, ne, gt, ge, lt, le)
              - `cardToken` (ct, nct, eq, ne)
              - `lastFour` (ct, nct, eq, ne)
              - `expirationDate` (ct, nct, eq, ne)
              - `mcc` (ct, nct, eq, ne)
              - `payoutId` (gt, lt, eq, ne)
              - `customerId` (gt, lt, eq, ne)
              - `vendorId` (gt, lt, eq, ne)
              - `miscData1` (ct, nct, eq, ne)
              - `miscData2` (ct, nct, eq, ne)
              - `currentUses` (gt, ge, lt, le, eq, ne)
              - `amount` (gt, ge, lt, le, eq, ne)
              - `balance` (gt, ge, lt, le, eq, ne)
              - `paypointLegal` (ne, eq, ct, nct)
              - `paypointDba` (ne, eq, ct, nct)
              - `orgName` (ne, eq, ct, nct, in, nin)
              - `externalPaypointID` (ct, nct, eq, ne)
              - `paypointId` (gt, lt, eq, ne)

            List of comparison accepted - enclosed between parentheses:

              - 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 separated by "|"
              - nin => not inside array separated by "|"
          required: false
          schema:
            type: object
            additionalProperties:
              type: string
        - name: sortBy
          in: query
          description: >-
            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`.
          required: false
          schema:
            type: string
        - name: requestToken
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/type___queryTypes__:VCardTransactionQueryResponse
        '400':
          description: Bad request/ invalid data
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized request.
          content:
            application/json:
              schema:
                description: Any type
        '500':
          description: Internal API Error
          content:
            application/json:
              schema:
                description: Any type
        '503':
          description: Database connection error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:PayabliApiResponse'
servers:
  - url: https://api-sandbox.payabli.com/api
  - url: https://api.payabli.com/api
components:
  schemas:
    type_:Totalpages:
      type: integer
      description: Total number of pages in response.
      title: Totalpages
    type_:Totalrecords:
      type: integer
      description: Total number of records in response.
      title: Totalrecords
    type_:PageIdentifier:
      type: string
      description: Auxiliary validation used internally by payment pages and components.
      title: PageIdentifier
    type_:Pagesize:
      type: integer
      description: Number of records on each response page.
      title: Pagesize
    type_:VCardSummary:
      type: object
      properties:
        totalPages:
          $ref: '#/components/schemas/type_:Totalpages'
        totalRecords:
          $ref: '#/components/schemas/type_:Totalrecords'
        totalAmount:
          type: number
          format: double
          description: Total amount for the records.
        totalNetAmount:
          type: number
          format: double
          description: Total net amount for the records.
        totalactive:
          type: integer
          description: Total number of active vCards.
        totalamountactive:
          type: number
          format: double
          description: Total amount of active vCards.
        totalbalanceactive:
          type: number
          format: double
          description: Total balance of active vCards.
        pageidentifier:
          $ref: '#/components/schemas/type_:PageIdentifier'
        pageSize:
          $ref: '#/components/schemas/type_:Pagesize'
      required:
        - totalPages
        - totalRecords
        - totalAmount
        - totalactive
        - totalamountactive
        - totalbalanceactive
      title: VCardSummary
    type_:Mcc:
      type: string
      description: >-
        Business Merchant Category Code (MCC). [This
        resource](https://github.com/greggles/mcc-codes/blob/main/mcc_codes.csv)
        lists MCC codes.
      title: Mcc
    type_:Legalname:
      type: string
      description: Business legal name.
      title: Legalname
    type_:Dbaname:
      type: string
      description: >-
        The alternate or common name that this business is doing business under
        usually referred to as a DBA name.
      title: Dbaname
    type_:ExternalPaypointId:
      type: string
      description: >-
        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.
      title: ExternalPaypointId
    type_:OrgParentName:
      type: string
      description: The name of the parent organization.
      title: OrgParentName
    type___queryTypes__:VCardTransactionRecord:
      type: object
      properties:
        Identifier:
          type:
            - string
            - 'null'
          description: Unique identifier for the transaction.
        CardToken:
          type:
            - string
            - 'null'
          description: Token of the virtual card associated with the transaction.
        LastFour:
          type:
            - string
            - 'null'
          description: Last four digits of the masked virtual card number.
        ExpirationDate:
          type:
            - string
            - 'null'
          description: Expiration date of the virtual card used for the transaction.
        Mcc:
          oneOf:
            - $ref: '#/components/schemas/type_:Mcc'
            - type: 'null'
        PayoutId:
          type:
            - integer
            - 'null'
          format: int64
          description: Identifier of the payout linked to this transaction.
        CustomerId:
          type:
            - integer
            - 'null'
          format: int64
          description: Identifier of the customer linked to this transaction.
        VendorId:
          type:
            - integer
            - 'null'
          format: int64
          description: Identifier of the vendor linked to this transaction.
        MiscData1:
          type:
            - string
            - 'null'
          description: Custom field 1 from the virtual card.
        MiscData2:
          type:
            - string
            - 'null'
          description: Custom field 2 from the virtual card.
        CurrentUses:
          type:
            - integer
            - 'null'
          description: Number of times the virtual card has been used.
        Amount:
          type:
            - number
            - 'null'
          format: double
          description: Authorized amount on the virtual card.
        Balance:
          type:
            - number
            - 'null'
          format: double
          description: Current balance remaining on the virtual card.
        PaypointId:
          type:
            - integer
            - 'null'
          format: int64
          description: Numeric identifier of the paypoint that issued the virtual card.
        PaypointLegal:
          oneOf:
            - $ref: '#/components/schemas/type_:Legalname'
            - type: 'null'
        PaypointDba:
          oneOf:
            - $ref: '#/components/schemas/type_:Dbaname'
            - type: 'null'
        ExternalPaypointID:
          oneOf:
            - $ref: '#/components/schemas/type_:ExternalPaypointId'
            - type: 'null'
        OrgName:
          oneOf:
            - $ref: '#/components/schemas/type_:OrgParentName'
            - type: 'null'
        Type:
          type:
            - string
            - 'null'
          description: Transaction type, such as `AUTHORIZATION`.
        Status:
          type:
            - string
            - 'null'
          description: Transaction status, such as `AUTHORIZATION`.
        CreatedOn:
          type:
            - string
            - 'null'
          description: >-
            Date and time the transaction was created. Format: `YYYY-MM-DD
            HH:MM:SS.ffffff`.
        TransactionAmount:
          type:
            - string
            - 'null'
          description: Amount of the transaction, as a string value.
        PostedAmount:
          type:
            - string
            - 'null'
          description: Posted amount of the transaction, as a string value.
        PostedOn:
          type:
            - string
            - 'null'
          description: >-
            Date and time the transaction was posted, in format `YYYY-MM-DD
            HH:MM:SS.ffffff`. Null when the transaction hasn't posted yet.
        MerchantName:
          type:
            - string
            - 'null'
          description: Name of the merchant where the virtual card was used.
        AuthorizationStatus:
          type:
            - string
            - 'null'
          description: Authorization status of the transaction.
        ReasonToDecline:
          type:
            - string
            - 'null'
          description: Reason the transaction was declined, when applicable.
      required:
        - Identifier
        - CardToken
        - LastFour
        - ExpirationDate
        - Mcc
        - PayoutId
        - CustomerId
        - VendorId
        - MiscData1
        - MiscData2
        - CurrentUses
        - Amount
        - Balance
        - PaypointId
        - PaypointLegal
        - PaypointDba
        - ExternalPaypointID
        - OrgName
        - Type
        - Status
        - CreatedOn
        - TransactionAmount
        - PostedAmount
        - PostedOn
        - MerchantName
        - AuthorizationStatus
        - ReasonToDecline
      description: A virtual card transaction record returned by the query.
      title: VCardTransactionRecord
    type___queryTypes__:VCardTransactionQueryResponse:
      type: object
      properties:
        Summary:
          $ref: '#/components/schemas/type_:VCardSummary'
        Records:
          type: array
          items:
            $ref: '#/components/schemas/type___queryTypes__:VCardTransactionRecord'
      required:
        - Summary
        - Records
      description: Response body for queries about virtual card transactions.
      title: VCardTransactionQueryResponse
    type_:IsSuccess:
      type: boolean
      description: >-
        Boolean indicating whether the operation was successful. A `true` value
        indicates success. A `false` value indicates failure.
      title: IsSuccess
    type_:Responsedata:
      type: object
      additionalProperties:
        description: Any type
      description: The object containing the response data.
      title: Responsedata
    type_:ResponseText:
      type: string
      description: 'Response text for operation: ''Success'' or ''Declined''.'
      title: ResponseText
    type_:PayabliApiResponse:
      type: object
      properties:
        isSuccess:
          $ref: '#/components/schemas/type_:IsSuccess'
        responseData:
          $ref: '#/components/schemas/type_:Responsedata'
        responseText:
          $ref: '#/components/schemas/type_:ResponseText'
      required:
        - responseText
      title: PayabliApiResponse
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: requestToken

```

## SDK Code Examples

```typescript ListVcardsTransactionsOrg
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.query.listVcardsTransactionsOrg(123, {
        fromRecord: 0,
        limitRecord: 20,
        sortBy: "desc(CreatedOn)",
    });
}
main();

```

```python ListVcardsTransactionsOrg
from payabli import payabli

client = payabli(
    api_key="YOUR_API_KEY_HERE",
)

client.query.list_vcards_transactions_org(
    org_id=123,
    from_record=0,
    limit_record=20,
    sort_by="desc(CreatedOn)",
)

```

```java ListVcardsTransactionsOrg
package com.example.usage;

import io.github.payabli.api.PayabliPayabliApiClient;
import io.github.payabli.api.resources.query.requests.ListVcardsTransactionsOrgRequest;

public class Example {
    public static void main(String[] args) {
        PayabliPayabliApiClient client = PayabliPayabliApiClient
            .builder()
            .apiKey("YOUR_API_KEY_HERE")
            .build();

        client.query().listVcardsTransactionsOrg(
            123,
            ListVcardsTransactionsOrgRequest
                .builder()
                .fromRecord(0)
                .limitRecord(20)
                .sortBy("desc(CreatedOn)")
                .build()
        );
    }
}
```

```ruby ListVcardsTransactionsOrg
require "payabli"

client = Payabli::Client.new(api_key: "YOUR_API_KEY_HERE")

client.query.list_vcards_transactions_org(
  org_id: 123,
  from_record: 0,
  limit_record: 20,
  sort_by: "desc(CreatedOn)"
)

```

```csharp ListVcardsTransactionsOrg
using PayabliPayabliApi;
using System.Threading.Tasks;

namespace Usage;

public class Example
{
    public async Task Do() {
        var client = new PayabliPayabliApiClient(
            apiKey: "YOUR_API_KEY_HERE"
        );

        await client.Query.ListVcardsTransactionsOrgAsync(
            123,
            new ListVcardsTransactionsOrgRequest {
                FromRecord = 0,
                LimitRecord = 20,
                SortBy = "desc(CreatedOn)"
            }
        );
    }

}

```

```go ListVcardsTransactionsOrg
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithApiKey(
            "YOUR_API_KEY_HERE",
        ),
    )
    request := &payabli.ListVcardsTransactionsOrgRequest{
        FromRecord: payabli.Int(
            0,
        ),
        LimitRecord: payabli.Int(
            20,
        ),
        SortBy: payabli.String(
            "desc(CreatedOn)",
        ),
    }
    client.Query.ListVcardsTransactionsOrg(
        context.TODO(),
        123,
        request,
    )
}

```

```php ListVcardsTransactionsOrg
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Query\Requests\ListVcardsTransactionsOrgRequest;

$client = new PayabliClient(
    apiKey: 'YOUR_API_KEY_HERE',
);
$client->query->listVcardsTransactionsOrg(
    123,
    new ListVcardsTransactionsOrgRequest([
        'fromRecord' => 0,
        'limitRecord' => 20,
        'sortBy' => 'desc(CreatedOn)',
    ]),
);

```

```swift ListVcardsTransactionsOrg
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Query/vcardsTransactions/org/123?fromRecord=0&limitRecord=20&sortBy=desc%28CreatedOn%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()
```