Set up Square
Place Carden preparation and reporting around a merchant-owned Square Order and Payment implementation.
On this page
Confirm backend ownership
- Select the merchant and Carden environment used by the Square backend.
- Keep Square access tokens, application secrets, webhook signature keys, source tokens, and idempotency keys in that backend.
- Create a Carden key for the Square integration; a Stripe or QuickBooks key is rejected even if it has a similarly named scope.
- Choose linked QuickBooks preparation, inline CanonicalInvoice preparation, reporting only, or separate service keys.
Create an Order, then attach its Payment
- Configure QuickBooks as a source, or supply a complete authoritative invoice inline.
- Create a Square-integration Carden key with enrichment:write and payments:write; add invoices:read only for linked-source access.
- Ask Carden to prepare Square Order context and review the exact total and source references.
- Add the actual location_id and a Square idempotency_key, then call CreateOrder once.
- Call CreatePayment once with its own idempotency key, payment source, returned order_id, and matching amount.
- Persist the attempt and deliver a normalized report; later verified provider states become new immutable report events.
HTTP
POST /api/v1/square/order-enrichment
POST /api/v1/square/order-enrichment/from-invoice
POST /api/v1/square/payment-reportsDo not merge Carden preparation metadata into CreateOrder. Save it beside the merchant attempt and use preparation.id only for later Carden correlation.
Supply provider-owned fields
- Use the merchant's actual Square location; Carden never chooses or fabricates one.
- Generate Square idempotency keys in the merchant payment system and keep Order and Payment identities separate.
- Use actual catalog IDs only when the merchant has established them; the Carden fragment uses factual ad hoc lines.
- Pass the actual Square order_id to CreatePayment and persist paymentId, orderId, and locationId for reconciliation.
- Verify Square provider webhook signatures with the exact configured notification URL, signature key, and raw body.
Validate before production
- Prepare a known sandbox invoice and inspect Order arithmetic.
- Create the Order and Payment once with merchant-owned idempotency.
- Report APPROVED, COMPLETED, CANCELED, FAILED, PENDING, and refund cases through normalized fixtures.
- Exercise duplicate Carden delivery, denied provider scope, ambiguous Square transport outcomes, and out-of-order provider events.
- Confirm that a Carden report failure never repeats CreateOrder or CreatePayment.