# List payments Retrieve payment records with transaction details and security compliance This endpoint provides secure payment data access with: - PCI-compliant payment information (masked card data) - Payment method categorization and tracking - Integration with AR transactions for complete context - Payment processor integration (PayPal, Stripe, etc.) - Date-based filtering for reconciliation periods - Client relationship data for payment attribution Security & Compliance: - PCI DSS compliant data handling (last 4 digits only) - Secure payment processor ID tracking - Payment confirmation date logging - Audit trail for payment processing Payment Method Support: - Credit/debit card payments with masked PAN - ACH/bank transfer processing - Check and wire transfer tracking - Digital wallet integration (PayPal, Apple Pay, etc.) Reconciliation Features: - Payment-to-invoice matching via AR transactions - Payment confirmation status tracking - Processor reference ID management - Multi-currency payment support Business Applications: - Payment reconciliation and matching - Revenue recognition and cash flow analysis - Client payment history and patterns - Payment method performance analysis - Compliance reporting and audit trails Real Example: bash curl --location 'https://{{host}}/v1/payments' \ --header 'Authorization: bearer {{token}} \ --header 'Content-Type: application/json' \ --data '{ "pageSize": 25, "page": 0 }' Endpoint: POST /gql/v1/payments Version: 1.0.0 Security: BearerAuth ## Request fields (application/json): - `pageSize` (integer) Maximum number of payment records to return Example: 25 - `page` (integer) Page number for pagination (0-based) - `clientId` (integer) Filter payments by specific client ID Example: 789 - `paymentMethod` (string) Filter by payment method type Enum: "CREDIT_CARD", "DEBIT_CARD", "ACH", "BANK_TRANSFER", "CHECK", "WIRE", "PAYPAL", "APPLE_PAY", "GOOGLE_PAY" - `startDate` (string) Start date for payment date range filter Example: "2024-01-01T00:00:00" - `endDate` (string) End date for payment date range filter Example: "2024-12-31T23:59:59" - `status` (string) Filter by payment status Enum: "PENDING", "CONFIRMED", "FAILED", "CANCELLED", "REFUNDED" - `sortOrder` (string) Sort order for payment date Enum: "asc", "desc" ## Response 200 fields (application/json): - `deid_payment` (array) - `deid_payment.id` (integer) Unique payment identifier Example: 45201 - `deid_payment.arTranId` (integer) Associated AR transaction identifier Example: 125890 - `deid_payment.paymentMethod` (string) Payment method type Example: "CREDIT_CARD" - `deid_payment.amount` (number) Payment amount Example: 2750 - `deid_payment.paymentDate` (string) Date when payment was processed Example: "2024-03-15T14:30:22+00:00" - `deid_payment.confirmationDate` (string,null) Date when payment was confirmed Example: "2024-03-15T14:32:18+00:00" - `deid_payment.status` (string) Current payment status Example: "CONFIRMED" - `deid_payment.processorId` (string) Payment processor identifier Example: "stripe" - `deid_payment.processorReferenceId` (string) Payment processor transaction reference Example: "pi_3N1K2mL4uZ5v6w7x8y9z0a1b" - `deid_payment.last4Digits` (string,null) Last 4 digits of card (PCI compliant) Example: "4242" - `deid_payment.cardType` (string,null) Credit card type Example: "VISA" - `deid_payment.currency` (string) Payment currency code Example: "USD" - `deid_payment.clientId` (integer) Associated client identifier Example: 789 - `deid_payment.createdAt` (string) Payment record creation timestamp Example: "2024-03-15T14:30:22.123456+00:00" - `deid_payment.updatedAt` (string) Payment record last update timestamp Example: "2024-03-15T14:32:18.789012+00:00" - `deid_payment.client` (object) Associated client information - `deid_payment.client.id` (integer) Example: 789 - `deid_payment.client.name` (string) Example: "TechFlow Enterprises" - `deid_payment.client.clientRef` (string) Example: "TF-2024-789" - `deid_payment.ar_tran` (object) Associated AR transaction details - `deid_payment.ar_tran.pmsRef` (string) Example: "INV-2024-3456" - `deid_payment.ar_tran.transactionDate` (string) Example: "2024-03-01T00:00:00+00:00" - `deid_payment.ar_tran.amount` (number) Example: 2750 - `deid_payment_aggregate` (object) - `deid_payment_aggregate.aggregate` (object) - `deid_payment_aggregate.aggregate.count` (integer) Total number of payment records matching criteria Example: 15 - `deid_payment_aggregate.aggregate.sum` (object) - `deid_payment_aggregate.aggregate.sum.amount` (number) Total payment amount across all matching records Example: 28750 ## Response 400 fields (application/json): - `error` (string) - `code` (string) ## Response 401 fields (application/json): - `error` (string) - `code` (string) ## Response 403 fields (application/json): - `error` (string) - `code` (string) ## Response 500 fields (application/json): - `error` (string) - `code` (string)