Skip to main content

Endpoint

Overview

Creates a Polar checkout session for DROP service subscription. Redirects to Polar checkout page.

Request

Requires authentication via Bearer token.

Query Parameters

string
required
Plan identifier: "pro-lite" or "pro"
string
required
Billing cycle: "monthly" or "yearly"

Response

Redirects to Polar checkout page (302 redirect).

Implementation Details

Code Reference

Status Codes

Found
Redirect to Polar checkout page
Bad Request
Missing or invalid plan/billingCycle parameters
Unauthorized
Missing or invalid authentication token
Not Found
User not found

Example Request

Available Plans

  • pro-lite: Pro Lite plan
    • monthly: Monthly billing
    • yearly: Yearly billing
  • pro: Pro plan
    • monthly: Monthly billing
    • yearly: Yearly billing

Environment Variables

string
required
Polar product ID for Pro Lite monthly
string
required
Polar product ID for Pro Lite yearly
string
required
Polar product ID for Pro monthly
string
required
Polar product ID for Pro yearly
string
required
Polar API access token
string
default:"production"
Polar server: "sandbox" or "production"
string
App URL for success redirect (default: https://nulldrop.xyz)

Notes

  • Existing Polar customer ID is reused if available
  • Metadata includes plan, billingCycle, and userId
  • Success URL redirects to app settings page
  • Only works for DROP service