Skip to main content

Square

The Square gateway supports online subscription billing via the Square Subscriptions API and Square Web Payments SDK.

Configuration

Environment variables

Set SQUARE_SANDBOX=true to use the Square sandbox environment.

Webhooks

Configure a webhook subscription in the Square Developer Dashboard. Set the notification URL to https://yourapp.com/subscribd/webhook/square and enable:
  • subscription.created
  • subscription.updated
  • subscription.canceled
  • subscription.expired
  • invoice.payment_made
  • invoice.payment_failed
  • payment.completed
  • payment.failed
Copy the Signature Key and set it as SQUARE_WEBHOOK_SIGNATURE_KEY.

Limitations

  • interval_count must be 1. Square does not support billing cycles with interval_count > 1. Subscribd throws SubscriptionException if you attempt to create a subscription on a plan with interval_count > 1 using this gateway.
  • Trial extension is not supported natively. ExtendTrial updates the local trial_ends_at only.
  • Proration is handled by Subscribd’s built-in ProrationEngine.
  • Pausing is not supported natively. Subscribd updates the local status only.

Next steps