StrimzStrimz

SDKs

Server and browser SDKs for Strimz.

Server: @strimz/sdk

pnpm add @strimz/sdk

Server-side only: StrimzClient takes your secret key, which never belongs in browser code.

import { StrimzClient } from '@strimz/sdk'
 
const strimz = new StrimzClient({ apiKey: process.env.STRIMZ_KEY! })
 
const session = await strimz.paymentSessions.create({ amount: '50000000', currency: 'USDC' })
const sub = await strimz.subscriptions.retrieve('cmq4wpz2k000cje6l8e3v7nbd')
const page = await strimz.transactions.list({ limit: 25 })

strimz.refunds.create returns { refund, signingInstructions }; see Process a refund.

Resources:

  • paymentSessions, subscriptions, subscriptionPlans, refunds
  • webhookEndpoints, webhookDeliveries
  • invoices, storefronts, agents
  • customers, transactions, apiKeys, merchants

Every method returns a typed, Zod-validated response.

Browser: @strimz/sdk-react

pnpm add @strimz/sdk-react
'use client'
import { StrimzProvider, StrimzPayButton } from '@strimz/sdk-react'
 
export function App({ children }: { children: React.ReactNode }) {
  return (
    <StrimzProvider publishableKey={process.env.NEXT_PUBLIC_STRIMZ_PUBLISHABLE_KEY!}>
      {children}
    </StrimzProvider>
  )
}
 
export function Checkout({ sessionId }: { sessionId: string }) {
  return <StrimzPayButton sessionId={sessionId} onSuccess={(txHash) => console.log(txHash)} />
}

The browser SDK uses publishable keys (pk_test_… and pk_live_…), which are safe to ship to the client.

On this page