Skip to content

Payment

A payment a client made, with the invoices it paid, its fees, and its refund and dispute status. Returned by GET /gql/v1/payment/{id}, POST /gql/v1/payments, and POST /gql/v1/payments/search, in a payment or payments list; a get by ID returns at most one item, and an empty list when nothing matches. Field names are snake_case, including inside the nested payment object.

A payment is identified by its own AR transaction ID, payment_ar_tran_id. It doesn't carry the IDs of the client or the invoices it paid: use client_ref and invoice_numbers to find them, by searching clients on clientRef and invoices on invoiceNumber.

Fields

NameTypeFormatNullableDescriptionExample
payment_ar_tran_idinteger—NoThe payment's ID: the ID of its AR transaction. Use it with GET /gql/v1/payment/{id}.85394
ar_transaction_datestringdate-time (ISO 8601), no offsetNoWhen the payment was made."2026-08-24T21:51:18.834"
client_namestring—YesName of the client who paid."Acme Holdings LLC"
client_refstring—YesThe client's human-facing reference. Search clients on clientRef to find the client."352411"
invoice_numbersstringcomma-separatedYesNumbers of the invoices the payment paid, separated by , . Search invoices on invoiceNumber to find them."A0053742, A0053743"
engagement_namesstring—YesNames of the engagements the payment was taken for, separated by . ."2026 Tax Return"
payment_payment_methodstring—YesHow the client paid. Values include Credit Card, Debit Card, Bank Transfer, Check, Prepaid, and Unknown."Debit Card"
payment_pp_idstring—YesThe payment processor's reference for the payment."pi_3U7zDVIog7gyKVjp381hs4oG"
paid_by_full_namestring—YesWho made the payment: the payer's name, or the staff member or contact who entered it."Jordan Lee"
staff_admin_idboolean—Notrue when a staff member entered the payment on the client's behalf.false
notesstring—YesNotes on the payment's AR transaction."Paid at year-end meeting"
statusstring—NoThe payment's status. Values include Completed, Failed, Refunded, Refund Pending, and Refund Failed."Completed"
is_payment_successboolean—Notrue when the payment succeeded.true
is_postedboolean—Yestrue once the payment is posted.true
is_partial_paymentboolean—Yestrue when the payment left part of an invoice unpaid.false
is_aiwyn_paymentboolean—Yestrue when the payment was taken through Aiwyn rather than recorded from another system.true
amountnumberdecimal, firm currencyYesTotal the client paid, including fees.101.00
principalnumberdecimal, firm currencyYesThe part of amount applied to invoices, without fees.100.00
total_bill_amountnumberdecimal, firm currencyYesTotal of the invoices the payment paid. null for a payment of an invoice add-on.100
total_processing_fee_amountnumberdecimal, firm currencyYesProcessing fees charged on the payment.0
total_late_fee_amountnumberdecimal, firm currencyYesLate fees charged on the payment.0
total_international_fee_amountnumberdecimal, firm currencyYesInternational fees charged on the payment.1.00
currency_codestringISO 4217YesCurrency the client paid in."GBP"
amount_in_currencynumberdecimal, currency_codeYesamount in the currency the client paid in.80.8
principal_in_currencynumberdecimal, currency_codeYesprincipal in the currency the client paid in.80.0
total_bill_amount_in_currencynumberdecimal, currency_codeYestotal_bill_amount in the currency the client paid in.80.0
total_processing_fee_amount_in_currencynumberdecimal, currency_codeYestotal_processing_fee_amount in the currency the client paid in.0
total_late_fee_amount_in_currencynumberdecimal, currency_codeYestotal_late_fee_amount in the currency the client paid in.0
total_international_fee_amount_in_currencynumberdecimal, currency_codeYestotal_international_fee_amount in the currency the client paid in.0.8
posted_to_bank_dtstringdate-time (ISO 8601)YesWhen the payment was posted to the firm's bank account."2026-08-31T00:27:24.013+00:00"
estimated_deposit_datestringdate-time (ISO 8601), no offsetYesWhen the funds are expected to reach the firm's bank account."2026-09-01T07:00:00"
refund_statusstringcomma-separatedYesStatus of each refund on the payment, separated by , . Values include pending, succeeded, and AlreadyRefunded."succeeded"
refund_datestringMM/DD/YYYY, comma-separatedYesDate of each refund, separated by , ."09/03/2026"
dispute_statusstringcomma-separatedYesStatus of each dispute on the payment, separated by , . Values include PENDING and LOST."PENDING"
dispute_refund_datestringMM/DD/YYYY, comma-separatedYesDate funds were withdrawn for each lost dispute, separated by , ."10/02/2026"
card_typestring—YesCard brand for card payments, such as visa, or the bank name for bank payments, as the payment processor reports it."visa"
last4string—YesLast four digits of the card or account used for the payment."4242"
failure_reasonstring—YesWhy the payment failed.null
failed_atstringdate-time (ISO 8601)YesWhen the payment failed.null
payment_confirmation_datestringdate-time (ISO 8601), no offsetYesWhen the payment was confirmed. Decides whether the payment counts as completed or still pending."2026-09-01T15:00:34.317714"
payment_sourcestring—YesHow the payment was made: MANUAL, AUTO_PAY, SCHEDULED, AUTO_DRAFT, PAYMENT_LINK, CLIENT_PORTAL, PRE_PAYMENT, or UNSPECIFIED."CLIENT_PORTAL"
paymentobjectPaymentRecordNoDetails from the payment record behind this row.—

PaymentRecord

NameTypeFormatNullableDescriptionExample
application_fee_amountnumberdecimal, firm currencyYesApplication fee the payment processor charged on the payment.null
company_namestring—YesCompany name of the payer.null
created_atstringdate-time (ISO 8601)NoWhen the payment record was created."2026-09-01T15:00:34.317714+00:00"
created_by_contact_idinteger—YesContact who made the payment.null
created_by_staff_idinteger—YesStaff member who recorded the payment.null
firm_bank_account_idinteger—YesFirm bank account the payment was deposited into. Often empty, because not every firm records it.null
is_manualboolean—Yestrue when the payment was recorded manually rather than taken through the payment processor.false
payor_namestring—YesName of the payer.null
posted_to_bankboolean—Yestrue once the payment is posted to the bank.false
refunded_amountnumberdecimal, firm currencyYesAmount refunded.null
updated_atstringdate-time (ISO 8601)NoWhen the payment record was last updated."2026-09-01T15:00:34.317714+00:00"