WWooshPayment docs
API

API reference

WooshPayment REST endpoints for custom integrations. Today primarily internal server-to-server endpoints; public merchant API on the roadmap.

4 min read

Public merchant API: Q3 roadmap. Today WooshPayment exposes REST endpoints used by our frontend and script tag, authenticated via session JWT (cookie-based or Authorization: Bearer <jwt>). There is no system yet for custom merchant API keys generatable from the dashboard. We'll announce it by email when it's ready.

Below you'll find the endpoints actually exposed today by our backend (https://api.wooshpayment.com). They are useful for debugging, headless integrations and custom scripts.

Base URL

https://api.wooshpayment.com

Authentication

JWTs are issued at login (POST /api/auth/login or POST /api/auth/register) and signed with JWT_SECRET. You must pass them as:

Authorization: Bearer <jwt>

JWTs contain { merchantId, shopDomain } as claims and last 30 days. Almost every endpoint marked requireAuth below requires this header.

Rate limit

  • Login: 10 / 15 min per IP
  • Register: 5 / 15 min per IP
  • Checkout create: dedicated limiter
  • Init payment: dedicated limiter
  • Discount validation: dedicated limiter

Over limit โ†’ 429.

Main endpoints

Auth

MethodPathNotes
POST/api/auth/registerCreates merchant (email, password, shopName) โ†’ JWT
POST/api/auth/loginEmail/password login โ†’ JWT, with timing-equalize
POST/api/auth/password/reset-requestSends password reset email
POST/api/auth/password/reset-confirmSets new password with token
GET/api/auth/shopify/installStarts Shopify OAuth (with handoff JWT token)
GET/api/auth/shopify/callbackOAuth callback: saves accessToken + installs ScriptTag

Merchant

MethodPathAuth
GET/api/merchant/meYes
GET/api/merchant/config/:identifierNo (public for checkout)
PATCH/api/merchant/configYes
PATCH/api/merchant/accountYes
PATCH/api/merchant/slugYes
POST/api/merchant/slug/regenerateYes
GET/api/merchant/subdomainYes
PATCH/api/merchant/shopYes
GET/api/merchant/statsYes
GET/api/merchant/stats/funnelYes
POST/api/merchant/domainYes โ€” adds checkout.yourstore.com
GET/api/merchant/domain/statusYes
POST/api/merchant/domain/verifyYes โ€” triggers DNS verification
DELETE/api/merchant/domainYes
GET/api/merchant/whopYes
POST/api/merchant/whop/connectYes โ€” body { apiKey }
DELETE/api/merchant/whopYes
GET/api/merchant/woocommerceYes
POST/api/merchant/woocommerce/connectYes
DELETE/api/merchant/woocommerceYes
GET/api/merchant/script-tag/statusYes
POST/api/merchant/script-tag/installYes โ€” manual reinstall
POST/api/merchant/previewYes โ€” renders checkout preview

Checkout (public, no auth)

MethodPathNotes
POST/api/checkout/createCreates session from Shopify/Woo cart
GET/api/checkout/session/:tokenSession status
GET/api/checkout/session-bundle/:tokenFull bundle (cart + branding + shipping + pixels)
GET/api/checkout/:token/upsellsUpsell config
GET/api/checkout/:token/pixelsPixel config
GET/api/checkout/:token/order-bumpsOrder bump config
POST/api/checkout/:token/refresh-statusRe-fetches Whop status
POST/api/checkout/:token/init-paymentInitiates Whop payment
POST/api/checkout/:token/payFinalizes payment
POST/api/checkout/:token/complete-codConfirms COD
POST/api/checkout/:token/validate-discountValidates discount code

Merchant checkout (auth)

MethodPathNotes
GET/api/checkout/merchant/ordersLists merchant orders
GET/api/checkout/merchant/orders/:tokenSingle order detail
POST/api/checkout/merchant/orders/:token/refundFull refund
POST/api/checkout/merchant/orders/:token/backfill-statusForce Whop status sync

Platform billing

MethodPathNotes
GET/api/platform-billing/plansPublic plan catalog
GET/api/platform-billing/currentMerchant's current subscription
POST/api/platform-billing/subscribePlan upgrade via Whop
POST/api/platform-billing/cancelCancels subscription, downgrades to Starter

Incoming webhooks (to our servers)

MethodPathNotes
POST/webhooks/whop/payment-updateWhop signs with HMAC-SHA256
POST/webhooks/shopify/*Shopify (uninstall, customers, etc.)

See Webhook.

Response format

Successful responses are JSON with shape varying per endpoint (not always { ok, data }).

Standard errors:

{
  "error": "Human-readable message",
  "code": "INVALID_INPUT" 
}

Main codes: INVALID_INPUT, INVALID_WHOP_KEY, WHOP_TIMEOUT, EMAIL_EXISTS, DOMAIN_EXISTS, INVALID_CREDENTIALS, RATE_LIMITED, INVALID_SLUG, SLUG_COLLISION.

Body limits

Maximum body per request: 1 MB. Over โ†’ 413.

CORS

Allowlist:

  • https://wooshpayment.com
  • https://*.wooshpayment.com (all subdomains)
  • https://{custom_domain} if the merchant has a verified custom domain (auto-detect of the apex)
  • https://{shop}.myshopify.com for the script tag

Origins not in allowlist โ†’ 403.

SDK

  • Node/TypeScript: roadmap (npm @wooshpayment/sdk)
  • PHP / Python: no official client today

For now: call the API directly with fetch / axios / requests โ€” it's standard REST.

Versioning

Stable endpoints. Backward-compatible changes (added fields) are not breaking. Breaking changes will carry a version prefix + 6 months of warning.