Payment data model

View field support, webhooks, and list parameters for each integration on the Supported Integrations page.

FieldTypeRequiredDescription
idstringNo
created_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)No(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
total_amountnumberNo
contact_idstringNo(reference to AccountingContact)
payment_methodstringNo
typeenumNoValues: INVOICE, BILL
currencystringNo
notesstringNo
invoice_idstringNo(reference to AccountingInvoice)
bill_idstringNoreferences AccountingBill
link_idstringNo
account_idstringNo(reference to AccountingAccount)
referencestringNo
organization_idstringNoreference to an AccountingOrganization
allocationsPaymentAllocation[]NoWhat this payment was applied to (invoices, bills, credit memos, etc.). Replaces separate invoice/bill payment endpoints.
allocations[].object_typeenumNoThe type of object this payment was applied to Values: INVOICE, BILL, CREDITMEMO, VENDORCREDIT, SALESORDER, PURCHASEORDER
allocations[].object_idstringNoThe id of the object this payment was applied to
allocations[].amountnumberNoThe amount of the payment applied to this object
allocations[].currencystringNoISO 4217 currency code of the applied amount
allocations[].exchange_ratenumberNoThe exchange rate at the time the payment was applied, for multi-currency
allocations[].allocated_atstring (date-time)NoDate and time when the payment was applied, in ISO 8601 format and UTC (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
statusenumNoValues: SUCCEEDED, PENDING, AUTHORIZED, FAILED, CANCELED
salesorder_idstringNoreference to an AccountingSalesorder, e.g. the POS order this payment settled
tender_typeenumNonormalized tender category; the provider's original label stays in payment_method Values: CARD, CASH, GIFT_CARD, BANK_TRANSFER, WALLET, CHECK, STORE_CREDIT, BUY_NOW_PAY_LATER, EXTERNAL, OTHER
tip_amountnumberNo
fee_amountnumberNoprocessing/processor fee
location_idstringNostore/site where the payment was taken (commerce_location)
device_idstringNoPOS terminal/register/device (hr device)
card_brandstringNo
card_last4stringNo
paid_atstring (date-time)NoDate and time the payment was made (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
exchange_ratenumberNoExchange rate to the base/home currency at the payment date
category_idsstring[]Nodimension refs -> AccountingCategory
net_amountnumberNototal_amount minus fee_amount

TypeScript

TypeScript
export type PaymentPayment = {
	id?: string;
	created_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	total_amount?: number;
	contact_id?: string; // (reference to AccountingContact)
	payment_method?: string;
	type?: 'INVOICE' | 'BILL';
	currency?: string;
	notes?: string;
	invoice_id?: string; // (reference to AccountingInvoice)
	bill_id?: string; // references AccountingBill
	link_id?: string;
	account_id?: string; // (reference to AccountingAccount)
	reference?: string;
	organization_id?: string; // reference to an AccountingOrganization
	allocations?: []; // What this payment was applied to (invoices, bills, credit memos, etc.). Replaces separate invoice/bill payment endpoints.
	status?: 'SUCCEEDED' | 'PENDING' | 'AUTHORIZED' | 'FAILED' | 'CANCELED';
	salesorder_id?: string; // reference to an AccountingSalesorder, e.g. the POS order this payment settled
	tender_type?: 'CARD' | 'CASH' | 'GIFT_CARD' | 'BANK_TRANSFER' | 'WALLET' | 'CHECK' | 'STORE_CREDIT' | 'BUY_NOW_PAY_LATER' | 'EXTERNAL' | 'OTHER'; // normalized tender category; the provider's original label stays in payment_method
	tip_amount?: number;
	fee_amount?: number; // processing/processor fee
	location_id?: string; // store/site where the payment was taken (commerce_location)
	device_id?: string; // POS terminal/register/device (hr device)
	card_brand?: string;
	card_last4?: string;
	paid_at?: string-time; // Date and time the payment was made (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	exchange_rate?: number; // Exchange rate to the base/home currency at the payment date
	category_ids?: string[]; // dimension refs -> AccountingCategory
	net_amount?: number; // total_amount minus fee_amount
	raw?: any;
} 

Zod

Zod
import { z } from 'zod';

export const ZodPaymentPayment = z.object({
	id: z.string().optional(),
	created_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	total_amount: z.number().optional(),
	contact_id: z.string().optional().describe("(reference to AccountingContact)"),
	payment_method: z.string().optional(),
	type: z.enum("INVOICE", "BILL").optional(),
	currency: z.string().optional(),
	notes: z.string().optional(),
	invoice_id: z.string().optional().describe("(reference to AccountingInvoice)"),
	bill_id: z.string().optional().describe("references AccountingBill"),
	link_id: z.string().optional(),
	account_id: z.string().optional().describe("(reference to AccountingAccount)"),
	reference: z.string().optional(),
	organization_id: z.string().optional().describe("reference to an AccountingOrganization"),
	allocations: z.array().optional().describe("What this payment was applied to (invoices, bills, credit memos, etc.). Replaces separate invoice/bill payment endpoints."),
	status: z.enum("SUCCEEDED", "PENDING", "AUTHORIZED", "FAILED", "CANCELED").optional(),
	salesorder_id: z.string().optional().describe("reference to an AccountingSalesorder, e.g. the POS order this payment settled"),
	tender_type: z.enum("CARD", "CASH", "GIFT_CARD", "BANK_TRANSFER", "WALLET", "CHECK", "STORE_CREDIT", "BUY_NOW_PAY_LATER", "EXTERNAL", "OTHER").optional().describe("normalized tender category; the provider's original label stays in payment_method"),
	tip_amount: z.number().optional(),
	fee_amount: z.number().optional().describe("processing/processor fee"),
	location_id: z.string().optional().describe("store/site where the payment was taken (commerce_location)"),
	device_id: z.string().optional().describe("POS terminal/register/device (hr device)"),
	card_brand: z.string().optional(),
	card_last4: z.string().optional(),
	paid_at: z.string-time().optional().describe("Date and time the payment was made (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	exchange_rate: z.number().optional().describe("Exchange rate to the base/home currency at the payment date"),
	category_ids: z.array().optional().describe("dimension refs -> AccountingCategory"),
	net_amount: z.number().optional().describe("total_amount minus fee_amount"),

});

Python

Python
import dataclasses

@dataclasses.dataclass
class PaymentPaymentType(str, Enum):
	INVOICE = 'INVOICE'
	BILL = 'BILL'

@dataclasses.dataclass
class PaymentPaymentStatus(str, Enum):
	SUCCEEDED = 'SUCCEEDED'
	PENDING = 'PENDING'
	AUTHORIZED = 'AUTHORIZED'
	FAILED = 'FAILED'
	CANCELED = 'CANCELED'

@dataclasses.dataclass
class PaymentPaymentTender_type(str, Enum):
	CARD = 'CARD'
	CASH = 'CASH'
	GIFT_CARD = 'GIFT_CARD'
	BANK_TRANSFER = 'BANK_TRANSFER'
	WALLET = 'WALLET'
	CHECK = 'CHECK'
	STORE_CREDIT = 'STORE_CREDIT'
	BUY_NOW_PAY_LATER = 'BUY_NOW_PAY_LATER'
	EXTERNAL = 'EXTERNAL'
	OTHER = 'OTHER'

@dataclasses.dataclass
class PaymentPayment:
	id: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""(ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	total_amount: Optional[int]
	"""(reference to AccountingContact)"""
	contact_id: Optional[str]
	payment_method: Optional[str]
	type: Optional[PaymentPaymentType]
	currency: Optional[str]
	notes: Optional[str]
	"""(reference to AccountingInvoice)"""
	invoice_id: Optional[str]
	"""references AccountingBill"""
	bill_id: Optional[str]
	link_id: Optional[str]
	"""(reference to AccountingAccount)"""
	account_id: Optional[str]
	reference: Optional[str]
	"""reference to an AccountingOrganization"""
	organization_id: Optional[str]
	"""What this payment was applied to (invoices, bills, credit memos, etc.). Replaces separate invoice/bill payment endpoints."""
	allocations: Optional[PropertyPaymentPaymentAllocations]
	status: Optional[PaymentPaymentStatus]
	"""reference to an AccountingSalesorder, e.g. the POS order this payment settled"""
	salesorder_id: Optional[str]
	"""normalized tender category; the provider's original label stays in payment_method"""
	tender_type: Optional[PaymentPaymentTender_type]
	tip_amount: Optional[int]
	"""processing/processor fee"""
	fee_amount: Optional[int]
	"""store/site where the payment was taken (commerce_location)"""
	location_id: Optional[str]
	"""POS terminal/register/device (hr device)"""
	device_id: Optional[str]
	card_brand: Optional[str]
	card_last4: Optional[str]
	"""Date and time the payment was made (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	paid_at: Optional[str]
	"""Exchange rate to the base/home currency at the payment date"""
	exchange_rate: Optional[int]
	"""dimension refs -> AccountingCategory"""
	category_ids: Optional[List[List[str]]]
	"""total_amount minus fee_amount"""
	net_amount: Optional[int]
Are we missing anything? Let us know
Was this page helpful?