Square
Prepare factual Square Order context, execute payments in the merchant backend, and confirm actual Square outcomes from signed events.
On this page
Your backend keeps control of Square
Carden's Square integration is a server-to-server companion for a merchant's existing Square backend. Carden prepares a Square Order fragment from an authoritative inline or linked QuickBooks invoice. The merchant backend supplies Square credentials, location, customer, payment source, and provider idempotency, and creates the Order and Payment. Square then sends signed payment, refund, and dispute events to Carden, which verifies them and links each Payment to its preparation.
| System | Responsibility |
|---|---|
| QuickBooks or inline input | Authoritative invoice, item, quantity, tax, shipping, discount, and reference facts. |
| Carden | Validation, immutable preparation, a mergeable Square Order fragment, signed payment/refund/dispute events, and optional merchant-reported observations. |
| Merchant backend | Square auth, location and customer selection, Order and Payment idempotency, execution, and setting reference_id to the Carden preparation ID. |
| Square | Order calculation, payment processing, provider events, processing-fee records, and seller payout records. |
Create an Order before its Payment
Carden emits ad hoc Square order lines in source sequence with factual names, exact decimal quantities, and base_price_money in invoice currency. A fractional quantity (up to five decimal places) carries a quantity_unit with Square's generic unit and the source precision; the invoice's own unit of measure, product code, and commodity code are preserved only as Square line metadata when present. Metadata is not a dedicated commercial-card transmission field. The invoice currency must be one Square settles in (USD, CAD, GBP, AUD, JPY, EUR) and must match the Square seller location.
Invoice tax is carried as a fixed, non-taxable, total-phase order service charge named "Invoice tax (as invoiced)" (one per line under line-item representation), never as a Square OrderLineItemTax. Square calculates OrderLineItemTax money from a percentage or catalog tax and treats applied_money as derived output, so emitting a tax object would require a rate the invoice never stated and would let Square recompute, round, and reallocate the amount per line. Source discounts stay fixed-amount Square discounts at the transaction or line-item level selected by the invoice contract, and positive shipping is a second fixed service charge. The adapter validates that the Square Order arithmetic equals the intended invoice total.
The returned fragment intentionally omits provider-owned location_id and idempotency_key. The merchant backend adds those values, creates the Order once, and uses the returned order_id in a separately idempotent CreatePayment whose amount matches the Square-computed total.
Implement Square in order
Keep bundled pricing and savings separate
Square bundled pricing generally combines processing costs into one rate. A lower underlying interchange category does not automatically lower the merchant's Square price. Confirm the seller's actual pricing agreement before treating qualification as recoverable savings.
Carden observes Square payments, refunds, and disputes from signed webhook events. Each Payment's and Refund's processing_fee entries (INITIAL and later ADJUSTMENT amounts) are projected into per-object fee evidence alongside the retained raw payload; refunds keep their reason, and disputes are recorded canonically with Square's state, disputed amount, reason, and evidence deadline. Inquiry states (INQUIRY_*) are tracked as inquiries; LOST and ACCEPTED outcomes withdraw the disputed funds from the retained payment amount. Unlinked refunds, which name no Square payment, are retained but not projected.
Processing fees are Square's bundled price, not interchange or a payout. Carden does not derive settlement rows from them, does not import PayoutEntry records, and does not establish network qualification. Cost Plus adjustments may appear for eligible custom arrangements.