S Spwig Marketplace
Square
Payment Provider

Square

by Spwig ✓ Verified · v1.3.0
0 installs
Free

Install directly from your Spwig admin → Don't have Spwig yet?

Screenshots

About this component

Accept payments in-person and online with Square. Supports credit cards, digital wallets (Apple Pay, Google Pay, Cash App Pay), and Afterpay/Clearpay.

Versions

v1.3.0
2026-08-02

- Subscriptions: added provider-agnostic reusable-payment-method setup. Declares the reusable_setup capability and implements begin_setup(), which returns the Web Payments SDK config (application/location id + environment) — Square tokenises the card to a nonce entirely client-side, so no server call is needed; create_payment_token turns the nonce into a card-on-file at finalize.
- Checkout handler: added an initializeSetup(bundle, container, onToken, onError) entry that mounts the Square card element and tokenises the card WITHOUT charging, returning the nonce for recurring billing.

v1.2.0
2026-08-01

- SECURITY: Idempotency keys for charge/authorize/refund are now derived from an explicit per-attempt id (idempotency_key / payment_attempt_id / refund_id) when supplied, so a retry after a lost response de-duplicates instead of double-charging or double-refunding. A fresh UUID is used only when no stable id is available (Square requires a key).
- charge() now reports success only when the payment is COMPLETED (funds captured); authorize() only when APPROVED. Previously any returned payment object (including PENDING/FAILED, or an uncaptured APPROVED charge) was reported as successful.
- Refunds are reported failed for terminal REJECTED/FAILED statuses instead of success=True.
- Partial refunds no longer silently fall back to USD when the original currency is unknown; the refund is aborted rather than mis-denominated. Full refunds no longer swallow a payment-lookup failure and proceed without amount_money.
- capture() rejects a partial amount (Square supports full capture only) instead of silently capturing the full authorization.
- cancel_payment_intent() reports the operation as unsupported instead of falsely reporting the still-usable payment link as cancelled.
- payment.updated webhooks map unrecognised Square statuses to an explicit 'unknown' state instead of a raw lowercased value.
- Subscription fallback charge maps FAILED/CANCELED payments to 'failed' (was 'pending'), uses an explicit idempotency key, and disable_card() returns False when Square returns an error response.

v1.1.3
2026-03-31

- Added **kwargs to create_payment_intent_for_checkout for forward-compatible parameter passing from orchestration service

v1.1.2
2026-03-10

- Fixed webhook URL in setup instructions (was /payment-providers/webhook/{slug}/, corrected to /webhooks/payments/{slug}/)

v1.0.0
2026-02-09

- Initial release with full payment processing support
- Credit and debit card processing (Visa, Mastercard, Amex, Discover, JCB, Diners)
- Digital wallet support (Apple Pay, Google Pay, Cash App Pay, Afterpay/Clearpay)
- Square Gift Card support
- Hosted checkout via Square Payment Links
- Full and partial refund capabilities
- Webhook integration for real-time payment notifications
- Multi-currency support (USD, CAD, GBP, AUD, JPY, EUR)
- Authorize and capture workflow support

Ready to install Square?

Install from your Spwig admin → Marketplace tab. Don't have a Spwig install yet? The commerce platform is free and open source.

Get Spwig → Browse more