Connected platform guide
Connect Polar to Drawspan
Use paid-order and refund webhooks to issue, renew and revoke licences for Polar products.
Before you start
- A Polar sandbox account and organisation at sandbox.polar.sh for testing.
- A Polar product, price, and Checkout Link.
- A Drawspan product with a reusable licence plan.
- No Polar License Keys benefit on the product unless the duplicate licensing flow is intentional.
- In Connected platforms, choose Connect platform, then Polar.
- Give the connection a name your team will recognise. Keep its workspace open.
- Expand step 1 and copy the webhook URL. Paste that URL into the provider dashboard below.
- Save the provider secret in the matching Drawspan endpoint. For Lemon Squeezy, generate it in Drawspan first. Gumroad has no signing secret.
- Expand step 2, link the product, then follow the testing instructions before enabling live sales.
Read the shared testing, expiry, email and recovery rules. Drawspan grants access to customers and seats; it does not email separate licence keys or issue ownerless licences.
Configure the webhook
Open Polar organisation → Settings → Webhooks → Add Endpoint.
Create one endpoint in the sandbox organisation and another in the production organisation.
| Field | Value |
|---|---|
| URL | The Drawspan webhook URL (the same URL for Test and Live) |
| Format | Raw |
| Secret | The webhook secret saved in the matching Drawspan endpoint. Sandbox and production must use different secrets. |
| Events | Select the two events below |
Select events
Select or create the events in the order shown below. The names follow the provider’s event picker.
order.paidIssue a one-time licence or start and renew a subscription term.order.refundedRevoke the linked licence only for a full refund. Partial refunds leave access unchanged.
Link products
Drawspan matches this provider by Product ID: The Polar product ID.
- Open Products in the matching Polar organisation and select the product.
- Open the ⋮ menu beside Edit Product and choose Copy Product ID.
- In Drawspan, paste the sandbox or production Product ID and choose the licence plan it should issue.
- Map monthly, annual, and one-time products separately when they issue different Drawspan terms.
- Full product URLs are accepted. A legacy Price ID can select a price-specific plan; Product ID mappings take precedence.
Test the connection
- Open a Checkout Link for the mapped product in the Polar sandbox organisation.
- Pay with 4242 4242 4242 4242, a future expiry date, and any CVC.
- Use a customer email that belongs to a sandbox organisation member or one of that member’s aliases if you need to inspect the delivered email.
- In Drawspan, refresh the connection and inspect Recent webhooks. Confirm the signed order, mapped Product ID, and test verification result. Sandbox data does not grant production access.
Inspect the event’s outcome, then check the customer, product, seats and expiry separately. A verified sandbox mapping does not prove production issuance or email delivery. For a local development rehearsal with test processing enabled, also verify the licence and captured email, then refund the test purchase. For subscriptions, exercise renewal, cancellation and a renewal refund. See the verification checklist.
Purchases, renewals, refunds, and cancellations
| Change | What Drawspan does |
|---|---|
| Initial payment | order.paid issues access for the purchased Product ID. |
| Renewal | Only subscription_cycle payments renew through the provider period end. Subscription updates and metered-cycle orders do not renew access. |
| Seats | The initial purchase uses Polar’s positive seat count. Later renewals keep the existing seat count. |
| Cancellation | subscription.canceled schedules the end. Paid access remains until a full refund or the recorded term expires. |
| Pause or revocation | These state events leave the stored term unchanged. Without another renewal, access expires at its recorded date. |
| Resume | Access changes only after the next successful order.paid event. |
| Full one-time refund | order.refunded revokes access when the complete paid amount is refunded. |
| Partial refund | Record the event without changing one-time or subscription access. Adjust the customer’s licence manually if needed. |
| Subscription payment refund | A full refund revokes the correlated subscription licence, including access renewed by later payments. Partial refunds leave it unchanged. |
Limits and recovery
- Polar retries failed deliveries up to ten times and can disable an endpoint after ten consecutive failures. Restore or recreate a disabled endpoint before testing again.
- Keep the endpoint response fast. Polar recommends responding within two seconds.
- If the secret changes, save the new value in the matching Drawspan endpoint before another delivery.
- Keep the sandbox and production secrets different. Drawspan uses the verified secret to identify the environment and rejects an identical pair.
- Recreate every product, price, webhook, secret, and mapping in production. Sandbox data does not carry over.
After correcting an accepted event, open Recent webhooks in its connection and choose Retry processing. Signature-rejected events cannot be retried inside Drawspan; resend them from the provider after fixing the secret. A missed event that was never accepted still requires a provider resend or manual correction. Recovery details.
Troubleshooting
- Signature rejected
- Copy the secret from the same Polar endpoint as the Drawspan URL. Drawspan accepts current Standard Webhooks signatures and legacy Polar signatures.
- A canceled subscription still has access
- This is expected until the paid term expires. Cancellation, pause and revocation events alone do not remove that term.
- A full subscription refund did not revoke access
- Partial refunds leave access unchanged. For a confirmed full refund, recover the original purchase or renewal if unresolved, then retry the retained receipt.
- The customer received a second licence key
- Remove Polar’s License Keys benefit from the product if Drawspan should be the only licensing system.