Invoice Payments
Invoice payment recording and reconciliation.
externalpermissionstable6 procedures
query
invoicePayments.listByInvoiceInferred outputList payments for a specific invoice.
Input
{
invoiceId: string;
includeDeleted?: boolean | undefined;
}Output
Array<{
recordedBy: {
id: string;
name: string;
} | null;
id: string;
organizationId: string;
invoiceId: string;
amount: string;
paymentDate: string;
paymentMethod: "other" | "bank_transfer" | "check" | "credit_card" | "cash" | null;
reference: string | null;
notes: string | null;
source: "xero" | "quickbooks" | "myob" | "manual" | "stripe";
externalPaymentId: string | null;
stripePaymentIntentId: string | null;
stripeChargeId: string | null;
recordedByResourceId: string | null;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
}>mutation
invoicePayments.recordInferred outputRecord a new payment for an invoice.
Input
{
amount: number;
invoiceId: string;
paymentDate: string;
notes?: string | undefined;
paymentMethod?: "other" | "bank_transfer" | "check" | "credit_card" | "cash" | undefined;
reference?: string | undefined;
}Output
{
id: string;
organizationId: string;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
notes: string | null;
amount: string;
invoiceId: string;
paymentDate: string;
paymentMethod: "other" | "bank_transfer" | "check" | "credit_card" | "cash" | null;
reference: string | null;
source: "xero" | "quickbooks" | "myob" | "manual" | "stripe";
externalPaymentId: string | null;
stripePaymentIntentId: string | null;
stripeChargeId: string | null;
recordedByResourceId: string | null;
}mutation
invoicePayments.updateInferred outputUpdate an existing payment. Only manual payments can be updated.
Input
{
id: string;
notes?: string | null | undefined;
amount?: number | undefined;
paymentDate?: string | undefined;
paymentMethod?: "other" | "bank_transfer" | "check" | "credit_card" | "cash" | null | undefined;
reference?: string | null | undefined;
}Output
{
id: string;
organizationId: string;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
notes: string | null;
amount: string;
invoiceId: string;
paymentDate: string;
paymentMethod: "other" | "bank_transfer" | "check" | "credit_card" | "cash" | null;
reference: string | null;
source: "xero" | "quickbooks" | "myob" | "manual" | "stripe";
externalPaymentId: string | null;
stripePaymentIntentId: string | null;
stripeChargeId: string | null;
recordedByResourceId: string | null;
}mutation
invoicePayments.deleteInferred outputDelete a payment (soft delete). Only manual payments can be deleted.
Input
{
id: string;
}Output
{
success: boolean;
payment: {
id: string;
organizationId: string;
createdAt: Date;
updatedAt: Date | null;
deletedAt: Date | null;
notes: string | null;
amount: string;
invoiceId: string;
paymentDate: string;
paymentMethod: "other" | "bank_transfer" | "check" | "credit_card" | "cash" | null;
reference: string | null;
source: "xero" | "quickbooks" | "myob" | "manual" | "stripe";
externalPaymentId: string | null;
stripePaymentIntentId: string | null;
stripeChargeId: string | null;
recordedByResourceId: string | null;
};
}query
invoicePayments.getSummaryInferred outputGet payment summary for an invoice.
Input
{
invoiceId: string;
}Output
{
invoiceId: string;
invoiceTotal: number;
amountPaid: number;
amountDue: number;
isPaid: boolean;
isPartiallyPaid: boolean;
paymentsBySource: Array<{
source: "xero" | "quickbooks" | "myob" | "manual" | "stripe";
count: number;
total: number;
}>;
}mutation
invoicePayments.syncFromAccountingInferred outputTrigger a sync from the connected accounting system. Optionally specify specific invoice IDs to sync, or sync all non-paid invoices.
Input
{
invoiceIds?: Array<string> | undefined;
}Output
{
success: boolean;
message: string;
invoiceCount: number;
}