# List settled transactions for org
GET https://api-sandbox.payabli.com/api/Query/settlements/org/{orgId}
Retrieve a list of settled transactions for an organization. Include the `exportFormat` query parameter to return the results as a file instead of a JSON response.
Reference: https://docs.payabli.com/developers/api-reference/query/get-list-of-settled-transactions-for-an-org
## OpenAPI Specification
```yaml
openapi: 3.1.1
info:
title: Get list of settled transactions for an org
version: endpoint_query.ListSettlementsOrg
paths:
/Query/settlements/org/{orgId}:
get:
operationId: list-settlements-org
summary: Get list of settled transactions for an org
description: >-
Retrieve a list of settled transactions for an organization. Include the
`exportFormat` query parameter to return the results as a file instead
of a JSON response.
tags:
- - subpackage_query
parameters:
- name: orgId
in: path
description: The numeric identifier for organization, assigned by Payabli.
required: true
schema:
type: integer
- name: exportFormat
in: query
required: false
schema:
$ref: '#/components/schemas/type_:ExportFormat'
- 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.
**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
should become:
--url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
See [Filters and Conditions
Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference)
for more information.
**List of field names accepted:**
- `settlementDate` (gt, ge, lt, le, eq, ne)
- `depositDate` (gt, ge, lt, le, eq, ne)
- `transId` (ne, eq, ct, nct)
- `gatewayTransId` (ne, eq, ct, nct)
- `method` (in, nin, eq, ne)
- `settledAmount` (gt, ge, lt, le, eq, ne)
- `operation` (in, nin, eq, ne)
- `source` (in, nin, eq, ne)
- `batchNumber` (ct, nct, eq, ne)
- `payaccountLastfour` (nct, ct)
- `payaccountType` (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) *mandatory when entry=org*
- `isHold` (eq, ne)
- `paypointId` (ne, eq)
- `paypointLegal` (ne, eq, ct, nct)
- `paypointDba` (ne, eq, ct, nct)
- `orgName` (ne, eq, ct, nct)
- `batchId` (ct, nct, eq, neq)
- `additional-xxx` (ne, eq, ct, nct) where xxx is the additional
field name
**List of comparison 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 separated by "|"
- `nin` => not inside array separated by "|"
**List of parameters accepted:**
- `limitRecord`: max number of records for query (default="20", "0"
or negative value for all)
- `fromRecord`: initial record in query
Example: `settledAmount(gt)=20` returns all records with a
`settledAmount` greater than 20.00.
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_:QueryResponseSettlements'
'400':
description: Bad request/ invalid data
content: {}
'401':
description: Unauthorized request.
content: {}
'500':
description: Internal API Error
content: {}
'503':
description: Database connection error
content: {}
components:
schemas:
type_:ExportFormat:
type: string
enum:
- description: Comma-separated values file
value: csv
- description: Excel spreadsheet file
value: xlsx
type_:BatchNumber:
type: string
type_:Category:
type: string
type_:CreatedAt:
type: string
format: date-time
type_:BillingZip:
type: string
type_:Email:
type: string
format: email
type_:CustomerNumberNullable:
type: string
type_:Shippingaddress:
type: string
type_:Shippingaddressadditional:
type: string
type_:Shippingcity:
type: string
type_:Shippingstate:
type: string
type_:Shippingzip:
type: string
type_:Shippingcountry:
type: string
type_:CustomerId:
type: integer
format: int64
type_:CustomerStatus:
type: integer
type_:AdditionalDataMap:
type: object
additionalProperties:
type: string
type_:QueryTransactionPayorData:
type: object
properties:
Identifiers:
type: array
items:
description: Any type
description: Array of field names to be used as identifiers.
FirstName:
type: string
description: Customer/Payor first name.
LastName:
type: string
description: Customer/Payor last name.
CompanyName:
type: string
description: Customer's company name.
BillingAddress1:
type: string
description: Customer's billing address.
BillingAddress2:
type: string
description: Additional line for Customer's billing address.
BillingCity:
type: string
description: Customer's billing city.
BillingState:
type: string
description: >-
Customer's billing state. Must be 2-letter state code for address in
US.
BillingZip:
$ref: '#/components/schemas/type_:BillingZip'
description: Customer's billing ZIP code.
BillingCountry:
type: string
description: Customer's billing country.
BillingPhone:
type: string
description: Customer's phone number.
BillingEmail:
$ref: '#/components/schemas/type_:Email'
description: Customer's email address.
CustomerNumber:
$ref: '#/components/schemas/type_:CustomerNumberNullable'
ShippingAddress1:
$ref: '#/components/schemas/type_:Shippingaddress'
ShippingAddress2:
$ref: '#/components/schemas/type_:Shippingaddressadditional'
ShippingCity:
$ref: '#/components/schemas/type_:Shippingcity'
ShippingState:
$ref: '#/components/schemas/type_:Shippingstate'
ShippingZip:
$ref: '#/components/schemas/type_:Shippingzip'
ShippingCountry:
$ref: '#/components/schemas/type_:Shippingcountry'
customerId:
$ref: '#/components/schemas/type_:CustomerId'
customerStatus:
$ref: '#/components/schemas/type_:CustomerStatus'
AdditionalData:
$ref: '#/components/schemas/type_:AdditionalDataMap'
type_:DepositDate:
type: string
format: date-time
type_:ExpectedDepositDate:
type: string
format: date-time
type_:ExternalPaypointId:
type: string
type_:FileContentFtype:
type: string
enum:
- value: pdf
- value: doc
- value: docx
- value: jpg
- value: jpeg
- value: png
- value: gif
- value: txt
type_:FileContent:
type: object
properties:
fContent:
type: string
description: >-
Content of file, Base64-encoded. Ignored if furl is specified. Max
upload size is 30 MB.
filename:
type: string
description: The name of the attached file.
ftype:
$ref: '#/components/schemas/type_:FileContentFtype'
description: The MIME type of the file (if content is provided)
furl:
type: string
description: Optional URL provided to show or download the file remotely
type_:Attachments:
type: array
items:
$ref: '#/components/schemas/type_:FileContent'
type_:Discount:
type: number
format: double
type_:DutyAmount:
type: number
format: double
type_:FreightAmount:
type: number
format: double
type_:Frequency:
type: string
enum:
- value: onetime
- value: weekly
- value: every2weeks
- value: every6months
- value: monthly
- value: every3months
- value: annually
type_:InvoiceAmount:
type: number
format: double
type_:Datenullable:
type: string
format: date
type_:InvoiceNumber:
type: string
type_:Invoicestatus:
type: integer
type_:InvoiceType:
type: integer
type_:ItemCommodityCode:
type: string
type_:ItemDescription:
type: string
type_:ItemProductCode:
type: string
type_:ItemProductName:
type: string
type_:ItemUnitofMeasure:
type: string
type_:BillItem:
type: object
properties:
itemCategories:
type: array
items:
type: string
description: Array of tags classifying item or product.
itemCommodityCode:
$ref: '#/components/schemas/type_:ItemCommodityCode'
itemCost:
type: number
format: double
description: Item or product price per unit.
itemDescription:
$ref: '#/components/schemas/type_:ItemDescription'
itemMode:
type: integer
description: >-
Internal class of item or product: value '0' is only for invoices ,
'1' for bills and, '2' common for both.
itemProductCode:
$ref: '#/components/schemas/type_:ItemProductCode'
itemProductName:
$ref: '#/components/schemas/type_:ItemProductName'
itemQty:
type: integer
description: Quantity of item or product.
itemTaxAmount:
type: number
format: double
description: Tax amount applied to item or product.
itemTaxRate:
type: number
format: double
description: Tax rate applied to item or product.
itemTotalAmount:
type: number
format: double
description: Total amount in item or product.
itemUnitOfMeasure:
$ref: '#/components/schemas/type_:ItemUnitofMeasure'
required:
- itemCost
type_:BillDataPaymentTerms:
type: string
enum:
- value: PIA
- value: CIA
- value: UR
- value: NET10
- value: NET20
- value: NET30
- value: NET45
- value: NET60
- value: NET90
- value: EOM
- value: MFI
- value: 5MFI
- value: 10MFI
- value: 15MFI
- value: 20MFI
- value: 2/10NET30
- value: UF
- value: 10UF
- value: 20UF
- value: 25UF
- value: 50UF
type_:PurchaseOrder:
type: string
type_:ShippingFromZip:
type: string
type_:SummaryCommodityCode:
type: string
type_:Tax:
type: number
format: double
type_:TermsConditions:
type: string
type_:BillData:
type: object
properties:
AdditionalData:
$ref: '#/components/schemas/type_:AdditionalDataMap'
attachments:
$ref: '#/components/schemas/type_:Attachments'
company:
type: string
description: Company name of the recipient of the invoice.
discount:
$ref: '#/components/schemas/type_:Discount'
dutyAmount:
$ref: '#/components/schemas/type_:DutyAmount'
firstName:
type: string
description: First name of the recipient of the invoice.
freightAmount:
$ref: '#/components/schemas/type_:FreightAmount'
frequency:
$ref: '#/components/schemas/type_:Frequency'
description: Frequency of scheduled invoice.
invoiceAmount:
$ref: '#/components/schemas/type_:InvoiceAmount'
invoiceDate:
$ref: '#/components/schemas/type_:Datenullable'
description: 'Invoice date in any of the accepted formats: YYYY-MM-DD, MM/DD/YYYY.'
invoiceDueDate:
$ref: '#/components/schemas/type_:Datenullable'
description: >-
Invoice due date in one of the accepted formats: YYYY-MM-DD,
MM/DD/YYYY.
invoiceEndDate:
$ref: '#/components/schemas/type_:Datenullable'
description: >-
Indicate the date to finish a scheduled invoice cycle
(`invoiceType`` = 1) in any of the accepted formats: YYYY-MM-DD,
MM/DD/YYYY.
invoiceNumber:
$ref: '#/components/schemas/type_:InvoiceNumber'
description: Invoice number. Identifies the invoice under a paypoint.
invoiceStatus:
$ref: '#/components/schemas/type_:Invoicestatus'
invoiceType:
$ref: '#/components/schemas/type_:InvoiceType'
items:
type: array
items:
$ref: '#/components/schemas/type_:BillItem'
description: Array of line items included in the invoice.
lastName:
type: string
description: Last name of the recipient of the invoice.
notes:
type: string
description: Notes included in the invoice.
paymentTerms:
$ref: '#/components/schemas/type_:BillDataPaymentTerms'
purchaseOrder:
$ref: '#/components/schemas/type_:PurchaseOrder'
shippingAddress1:
$ref: '#/components/schemas/type_:Shippingaddress'
shippingAddress2:
$ref: '#/components/schemas/type_:Shippingaddressadditional'
shippingCity:
$ref: '#/components/schemas/type_:Shippingcity'
shippingCountry:
$ref: '#/components/schemas/type_:Shippingcountry'
shippingEmail:
$ref: '#/components/schemas/type_:Email'
description: Shipping recipient's contact email address.
shippingFromZip:
$ref: '#/components/schemas/type_:ShippingFromZip'
shippingPhone:
type: string
description: Recipient phone number.
shippingState:
$ref: '#/components/schemas/type_:Shippingstate'
shippingZip:
$ref: '#/components/schemas/type_:Shippingzip'
summaryCommodityCode:
$ref: '#/components/schemas/type_:SummaryCommodityCode'
tax:
$ref: '#/components/schemas/type_:Tax'
termsConditions:
$ref: '#/components/schemas/type_:TermsConditions'
type_:Maskedaccount:
type: string
type_:Netamountnullable:
type: number
format: double
type_:OrderId:
type: string
type_:OrgParentName:
type: string
type_:Accountexp:
type: string
type_:Accountid:
type: string
type_:Accounttype:
type: string
type_:Accountzip:
type: string
type_:BinData:
type: object
properties:
binMatchedLength:
type: string
description: |-
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.
binCardBrand:
type: string
description: |-
The card brand. For example, Visa, Mastercard, American Express,
Discover.
binCardType:
type: string
description: 'The type of card: Credit or Debit.'
binCardCategory:
type: string
description: >-
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:
type: string
description: The name of the financial institution that issued the card.
binCardIssuerCountry:
type: string
description: The issuing financial institution's country name.
binCardIssuerCountryCodeA2:
type: string
description: >-
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:
type: string
description: >-
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.
binCardIsRegulated:
type: string
description: Indicates whether the card is regulated.
binCardUseCategory:
type: string
description: The use category classification for the card.
binCardIssuerCountryCodeA3:
type: string
description: >-
The issuing financial institution's three-character ISO country
code.
See [this resource](https://www.iso.org/obp/ui/#search) for a list
of
codes.
type_:Holdername:
type: string
type_:Initiator:
type: string
type_:Orderdescription:
type: string
type_:PaymentCategories:
type: object
properties:
amount:
type: number
format: double
description: Price/cost per unit of item or category.
description:
type: string
description: Description of item or category
label:
type: string
description: Name of item or category.
qty:
type: integer
default: 1
description: Quantity of item or category
required:
- amount
- label
type_:SplitFundingContent:
type: object
properties:
accountId:
type: string
description: The accountId for the account the split should be sent to.
amount:
type: number
format: double
description: Amount from the transaction to sent to this recipient.
description:
type: string
description: A description for the split.
recipientEntryPoint:
type: string
description: The entrypoint the split should be sent to.
type_:SplitFunding:
type: array
items:
$ref: '#/components/schemas/type_:SplitFundingContent'
type_:PaymentDetail:
type: object
properties:
categories:
type: array
items:
$ref: '#/components/schemas/type_:PaymentCategories'
description: >-
Array of payment categories/line items describing the amount to be
paid.
**Note**: These categories are for information only and aren't
validated against the total amount provided.
checkImage:
type: object
additionalProperties:
description: Any type
description: Object containing image of paper check.
checkNumber:
type: string
description: >-
A check number to be used in the ach transaction. **Required** for
payment method = 'check'.
currency:
type: string
description: >-
The currency for the transaction, `USD` or `CAD`. If your paypoint
is configured for CAD, you must send the `CAD` value in this field,
otherwise it defaults to USD, which will cause the transaction to
fail.
serviceFee:
type: number
format: double
description: >-
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:
$ref: '#/components/schemas/type_:SplitFunding'
description: >-
Split funding instructions for the transaction. See [Split a
Transaction](/developers/developer-guides/money-in-split-funding)
for more.
totalAmount:
type: number
format: double
description: >-
Total amount to be charged. If a service fee is sent, then this
amount should include the service fee."
required:
- totalAmount
type_:Sequence:
type: string
type_:Signaturedata:
type: string
type_:Storedmethodid:
type: string
type_:StoredMethodUsageType:
type: string
type_:QueryPaymentData:
type: object
properties:
AccountExp:
$ref: '#/components/schemas/type_:Accountexp'
accountId:
$ref: '#/components/schemas/type_:Accountid'
AccountType:
$ref: '#/components/schemas/type_:Accounttype'
AccountZip:
$ref: '#/components/schemas/type_:Accountzip'
binData:
$ref: '#/components/schemas/type_:BinData'
HolderName:
$ref: '#/components/schemas/type_:Holdername'
Initiator:
$ref: '#/components/schemas/type_:Initiator'
MaskedAccount:
$ref: '#/components/schemas/type_:Maskedaccount'
orderDescription:
$ref: '#/components/schemas/type_:Orderdescription'
paymentDetails:
$ref: '#/components/schemas/type_:PaymentDetail'
Sequence:
$ref: '#/components/schemas/type_:Sequence'
SignatureData:
$ref: '#/components/schemas/type_:Signaturedata'
StoredId:
$ref: '#/components/schemas/type_:Storedmethodid'
description: Identifier of stored payment method used in transaction.
StoredMethodUsageType:
$ref: '#/components/schemas/type_:StoredMethodUsageType'
type_:TransStatus:
type: integer
type_:Authcode:
type: string
type_:AvsResponse:
type: string
type_:AvsResponseText:
type: string
type_:CvvResponse:
type: string
type_:CvvResponseText:
type: string
type_:EmvAuthResponseData:
type: string
type_:ResultCodev2:
type: string
type_:ResultCodeText:
type: string
type_:QueryResponseData:
type: object
properties:
authcode:
$ref: '#/components/schemas/type_:Authcode'
avsresponse:
$ref: '#/components/schemas/type_:AvsResponse'
avsresponse_text:
$ref: '#/components/schemas/type_:AvsResponseText'
cvvresponse:
$ref: '#/components/schemas/type_:CvvResponse'
cvvresponse_text:
$ref: '#/components/schemas/type_:CvvResponseText'
emv_auth_response_data:
$ref: '#/components/schemas/type_:EmvAuthResponseData'
orderid:
$ref: '#/components/schemas/type_:OrderId'
response:
type: string
description: 'Response text for operation: ''Success'' or ''Declined''.'
response_code:
type: string
description: >-
Internal result code processing the transaction. Value 1 indicates
successful operation, values 2 and 3 indicate errors.
response_code_text:
type: string
description: >-
Text describing the result. If resultCode = 1, will return
'Approved' or a general success message. If resultCode = 2 or 3,
will contain the cause of the decline.
responsetext:
type: string
description: >-
Text describing the result. If resultCode = 1, will return
'Approved' or a general success message. If resultCode = 2 or 3,
will contain the cause of the decline.
resultCode:
$ref: '#/components/schemas/type_:ResultCodev2'
resultCodeText:
$ref: '#/components/schemas/type_:ResultCodeText'
transactionid:
type: string
description: The transaction identifier in Payabli.
type:
type: string
description: Type of transaction or operation.
type_:Source:
type: string
type_:SettlementStatus:
type: integer
type_:QueryTransactionEventsEventData:
oneOf:
- type: object
additionalProperties:
description: Any type
- type: string
type_:QueryTransactionEvents:
type: object
properties:
EventData:
$ref: '#/components/schemas/type_:QueryTransactionEventsEventData'
description: >-
Any data associated to the event received from processor. Contents
vary by event type.
EventTime:
type: string
format: date-time
description: Date and time of event.
TransEvent:
type: string
description: >-
Event descriptor. See [TransEvent
Reference](/guides/pay-in-transevents-reference) for more details.
type_:TransactionTime:
type: string
format: date-time
type_:QueryResponseSettlementsRecordsItem:
type: object
properties:
BatchAmount:
type: number
format: double
description: The batch amount.
BatchNumber:
$ref: '#/components/schemas/type_:BatchNumber'
Category:
$ref: '#/components/schemas/type_:Category'
CreatedAt:
$ref: '#/components/schemas/type_:CreatedAt'
Customer:
$ref: '#/components/schemas/type_:QueryTransactionPayorData'
DepositDate:
$ref: '#/components/schemas/type_:DepositDate'
ExpectedDepositDate:
$ref: '#/components/schemas/type_:ExpectedDepositDate'
externalPaypointID:
$ref: '#/components/schemas/type_:ExternalPaypointId'
GatewayTransId:
type: string
description: Internal identifier used for processing.
Id:
type: integer
invoiceData:
$ref: '#/components/schemas/type_:BillData'
isHold:
type: integer
description: |-
Describes whether the transaction is being held or not.
1 - Transaction is held
0 - Transaction isn't being held
MaskedAccount:
$ref: '#/components/schemas/type_:Maskedaccount'
Method:
type: string
description: The payment method.
NetAmount:
$ref: '#/components/schemas/type_:Netamountnullable'
description: Net amount paid.
Operation:
type: string
description: The operation performed.
OrderId:
$ref: '#/components/schemas/type_:OrderId'
ParentOrgName:
$ref: '#/components/schemas/type_:OrgParentName'
PaymentData:
$ref: '#/components/schemas/type_:QueryPaymentData'
PaymentTransId:
type: string
description: The transaction ID for the payment.
PaymentTransStatus:
$ref: '#/components/schemas/type_:TransStatus'
PaypointDbaname:
type: string
description: Paypoint DBA name.
PaypointEntryname:
type: string
description: Paypoint entryname.
PaypointLegalname:
type: string
description: Paypoint legal name.
ResponseData:
$ref: '#/components/schemas/type_:QueryResponseData'
ScheduleReference:
type: integer
description: Reference to the subscription originating the transaction.
SettledAmount:
type: number
format: double
description: The transaction amount.
SettlementDate:
type: string
format: date-time
description: >-
The date and time when the transaction was settled. This field is
null when the transaction's `SettlementStatus` is -1, -5, or -6
(Exception, Held, or Released).
Source:
$ref: '#/components/schemas/type_:Source'
Status:
$ref: '#/components/schemas/type_:SettlementStatus'
TransactionEvents:
type: array
items:
$ref: '#/components/schemas/type_:QueryTransactionEvents'
description: Events associated with this transaction.
TransactionTime:
$ref: '#/components/schemas/type_:TransactionTime'
TransMethod:
type: string
description: 'Payment method used: card or ach.'
Type:
type: string
description: 'The transaction type: credit or debit.'
type_:PageIdentifier:
type: string
type_:QueryResponseSettlementsSummary:
type: object
properties:
heldAmount:
type: number
format: double
description: Funds being held for fraud or risk concerns.
pageidentifier:
$ref: '#/components/schemas/type_:PageIdentifier'
pageSize:
type: integer
description: Number of records per page.
refunds:
type: number
format: double
description: Total refunds deducted from the transfer.
serviceFees:
type: number
format: double
description: >-
Service fees are any pass-through fees charged to the customer at
the time of payment. These aren't transferred to the merchant when
the batch is transferred and funded.
totalAmount:
type: number
format: double
description: The total sum of the settlements in the response.
totalNetAmount:
type: number
format: double
description: The total sum of the settlements in the response.
totalPages:
type: integer
description: Number of pages in the response.
totalRecords:
type: integer
description: Number of records in the response.
transferAmount:
type: number
format: double
description: >-
The transfer amount is the net batch amount plus or minus any
returns, refunds, billing and fees items, chargebacks, adjustments,
and third party payments. This is the amount from the batch that's
transferred to the merchant bank account.
type_:QueryResponseSettlements:
type: object
properties:
Records:
type: array
items:
$ref: '#/components/schemas/type_:QueryResponseSettlementsRecordsItem'
Summary:
$ref: '#/components/schemas/type_:QueryResponseSettlementsSummary'
```
## SDK Code Examples
```typescript Example query response
import { PayabliClient, PayabliEnvironment } from "@payabli/sdk-node";
async function main() {
const client = new PayabliClient({
environment: PayabliEnvironment.Sandbox,
apiKey: "YOUR_API_KEY_HERE",
});
await client.query.listSettlementsOrg(123, {
fromRecord: 251,
limitRecord: 0,
sortBy: "desc(field_name)",
});
}
main();
```
```python Example query response
from payabli import payabli
from payabli.environment import payabliEnvironment
client = payabli(
environment=payabliEnvironment.SANDBOX,
api_key="YOUR_API_KEY_HERE"
)
client.query.list_settlements_org(
org_id=123,
from_record=251,
limit_record=0,
sort_by="desc(field_name)"
)
```
```csharp Example query response
using PayabliPayabliApi;
using System.Threading.Tasks;
namespace Usage;
public class Example
{
public async Task Do() {
var client = new PayabliPayabliApiClient(
apiKey: "YOUR_API_KEY_HERE",
clientOptions: new ClientOptions {
BaseUrl = PayabliPayabliApiEnvironment.Sandbox
}
);
await client.Query.ListSettlementsOrgAsync(
123,
new ListSettlementsOrgRequest {
FromRecord = 251,
LimitRecord = 0,
SortBy = "desc(field_name)"
}
);
}
}
```
```go Example query response
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.payabli.com/api/Query/settlements/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("requestToken", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
```
```ruby Example query response
require 'uri'
require 'net/http'
url = URI("https://api-sandbox.payabli.com/api/Query/settlements/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"] = ''
response = http.request(request)
puts response.read_body
```
```java Example query response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;
HttpResponse response = Unirest.get("https://api-sandbox.payabli.com/api/Query/settlements/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29")
.header("requestToken", "")
.asString();
```
```php Example query response
request('GET', 'https://api-sandbox.payabli.com/api/Query/settlements/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29', [
'headers' => [
'requestToken' => '',
],
]);
echo $response->getBody();
```
```swift Example query response
import Foundation
let headers = ["requestToken": ""]
let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Query/settlements/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()
```