# Retrieve Filtered Payments Get record(s) using filters Endpoint: GET /rest/2.0/PAYMENT Version: 1.0 Security: JWT ## Query parameters: - `queryAnsiSql` (string, required) SQL Where part ## Header parameters: - `sessionId` (string, required) ## Response 200 fields (application/json): - `retrieveResponse` (object) - `retrieveResponse.PaymentDate` (string) Payment Date - `retrieveResponse.PaymentType` (string) Payment Type - `retrieveResponse.Autoallocate` (integer) Auto-Allocate Payment - `retrieveResponse.BillingProfileId` (integer) BillingProfileId - `retrieveResponse.Created` (string) System controlled field: Date and time the record was created - `retrieveResponse.InvoiceIdDisplay` (string) InvoiceIdDisplay: Displayed on the invoice - `retrieveResponse.ExternalReferenceId` (string) External Reference Id - `retrieveResponse.Id` (string) Payment Item ID - `retrieveResponse.UpdatedUserId` (string) System controlled field: Id of the last user that updated the record - `retrieveResponse.Updated` (string) System controlled field: Date and time the record was last updated - `retrieveResponse.CreatedUserId` (string) System controlled field: Id of the user that created the record - `retrieveResponse.CreditCardExpDate` (string) CreditCardExpDate - `retrieveResponse.CreditCardName` (string) CreditCardName - `retrieveResponse.CreditCardNumber` (string) CreditCardNumber - `retrieveResponse.CreditCardCCV` (string) CreditCardCCV - `retrieveResponse.CreditCardTransactionMessage` (string) Error Message - `retrieveResponse.VoidWithoutGateway` (integer) Void Type: Void - annuls the payment and notifies payment gateway to return funds to the customer.Reversal - annuls the payment without notifying payment gateway of this event. - `retrieveResponse.PendingAmount` (string) PendingAmount - `retrieveResponse.CreditCardType` (string) CreditCardType - `retrieveResponse.AchBankAcctNum` (string) AchBankAcctNum: Ach Bank Account Number - `retrieveResponse.Address1` (string) Address1: Credit Card Address - `retrieveResponse.City` (string) City: Credit Card City - `retrieveResponse.State` (string) State: Credit Card State - `retrieveResponse.Country` (string) Country: Credit Card Country - `retrieveResponse.Zip` (string) Zip: Credit Card Zip - `retrieveResponse.VoidedPaymentId` (integer) Voided To - `retrieveResponse.GatewayTransactionId` (string) Gateway Transaction Id - `retrieveResponse.EcomTransactionResponseId` (integer) Transaction Response Id - `retrieveResponse.EcomTransactionId` (integer) Transaction Request Id: Transaction Id - `retrieveResponse.PaymentGatewayProfileId` (integer) Payment Gateway Profile - `retrieveResponse.VoidFlag` (string) Voided - `retrieveResponse.LockboxRecordId` (integer) LockboxRecordId - `retrieveResponse.SourcePaymentId` (integer) Source Payment Item Id: Points to the original payment that begot this payment as the result of action - `retrieveResponse.PaymentAllocationStrategy` (string) Payment Auto-Allocation: System can auto allocate payments to invoices in several ways: Oldest First - The system starts with the oldest open invoice and continues until it fully allocates the payment. Match to Invoice by Amount - The system finds the invoice that matches the payment amount. In case of multiple matches, it chooses the oldest invoice. Match by Custom Attribute Value - Use this option to create an allocation strategy based on custom fields. The system will match the incoming payment value in the field designated on the (Setup>Accounting Configuration>Payment Allocation page) against the values in the invoices with an identically named field. A payment allocation happens if a value passed in a custom field on the payment matches the value in an identically named custom field on an invoice. If no matching invoices are found, the payment remains unallocated. Keeps Unallocated - This setting requires users to allocate payments manually. - `retrieveResponse.AllocatedToExtAccount` (string) Allocated to Other Accounts: Portion of payment distributed to other accounts via action - `retrieveResponse.SinglePaymentGroup` (string) Single Payment Group: Single Payment Group for link a negative and positive payment - `retrieveResponse.ApproveInvoiceId` (integer) ApproveInvoiceId - `retrieveResponse.GatewayTransactionStatus` (string) Gateway Transaction Status: Status of the payment as assigned by the payment gateway. Displayed for informational purposes only. Effect of the payment on the balance, and allocation to invoice is based on the Payment Status field. - `retrieveResponse.GatewayTransactionStatusDate` (string) Gateway Transaction Status Date - `retrieveResponse.PayoutId` (string) Payout ID: The payout ID is an ID of a payout record generated by payment gateway when the funds are deposited into your account, use it for payment reconciliation purposes. - `retrieveResponse.CreditCardToken` (string) CreditCardToken - `retrieveResponse.WalletId` (integer) WalletId: Wallet - `retrieveResponse.LateApprovedBy` (integer) Late Approved By - `retrieveResponse.OperatorId` (string) Operator Id - `retrieveResponse.AccountingPeriodId` (integer) Accounting Period - `retrieveResponse.AchToken` (string) AchToken - `retrieveResponse.HostedPaymentPageExternalId` (string) HostedPaymentPage External Id - `retrieveResponse.BpPayoutId` (integer) Payout Id - `retrieveResponse.AutomaticPayment` (integer) Automatic Payment: Is Payment Automatic or Manual - `retrieveResponse.PaymentCreditAllocationMethod` (string) Payment and Credit Allocation Method: This setting defines the method used to allocate payments and credits to invoices for the Account. When the field is set to 'Allocate To Invoice' the system will enable payments and credits to be allocated at the invoice level for the account. When set to 'Allocate To Invoice Detail' the system will enable payments and credits to be allocated to individual Invoice Details - `retrieveResponse.TaxAllocation` (string) Allocation Target: Allocation Target defines which amounts on the invoice or invoice detail will be the target of the allocations. Select whether allocations should target Cost, Tax Cost, or both Cost and Tax Cost. - `retrieveResponse.PaStrategyIds` (string) Payment Allocation Strategy Id List - `retrieveResponse.PaymentNote` (string) Notes - `retrieveResponse.CreditCardTransactionStatus` (string) Payment Status - `retrieveResponse.CheckNumber` (string) Check Number - `retrieveResponse.CreditCardTransactionStatusCode` (string) Payment Status Code ## Response 400 fields (application/json): - `error` (string) Bad request - `message` (string) Bad request ## Response 401 fields (application/json): - `error` (string) Unauthorized - `message` (string) Unauthorized ## Response 404 fields (application/json): - `error` (string) Not found - `message` (string) Not found ## Response 429 fields (application/json): - `error` (string) Too many requests - `message` (string) Too many requests ## Response 500 fields (application/json): - `error` (string) Internal error - `message` (string) Internal error