ShipKit.one
Payment

Creem

Creem

This repo includes a Creem one-time payment integration aligned with the PayPal/Stripe flow. Use the steps below to configure credentials, create the product, and validate locally/production.

1) Environment variables

Add the following to .env and keep .env.example / .env.local.example in sync:

CREEM_API_KEY=your_api_key_here
CREEM_WEBHOOK_SECRET=your_webhook_secret_here
CREEM_MODE=test
CREEM_PRODUCT_LIFETIME_ID=your_creem_product_id

CREEM_MODE supports test or production (default is production).

References:

2) Create the product in Creem

Create a one-time product (maps to the lifetime tier) and set its product_id as CREEM_PRODUCT_LIFETIME_ID.

3) Checkout and return

  • The client calls POST /api/orders/create with provider: "creem".
  • The server creates an order and calls POST /v1/checkouts to get the checkout_url.
  • After payment, Creem redirects back to: /dashboard/billing?provider=creem&request_id={orderId}.

4) Webhook setup

Webhook endpoint:

https://{your-domain.com}/api/webhooks/creem

Signature validation: header creem-signature, HMAC-SHA256 with CREEM_WEBHOOK_SECRET over the raw body, compare hex.

Reference:

Recommended events:

checkout.completed
subscription.paid
subscription.update
subscription.trialing
subscription.active
subscription.paused
subscription.canceled
subscription.expired
refund.created
dispute.created

5) Local validation

  1. Set CREEM_MODE=test and a test API key.
  2. Run pnpm dev.
  3. Complete a test payment and confirm webhook delivery.
  4. Check /dashboard/billing for order/payment updates.

On this page