Strimz

SDKs

Server and browser SDKs for Strimz.

SDKs

Server: @strimz/sdk

pnpm add @strimz/sdk
import { Strimz } from '@strimz/sdk'
 
const strimz = new Strimz({ apiKey: process.env.STRIMZ_KEY! })
 
const session = await strimz.paymentSessions.create({ amount: '50000000', currency: 'USDC' })
const sub = await strimz.subscriptions.retrieve('sub_xyz')
const refund = await strimz.refunds.create({
  transactionId: 'tx_xyz',
  amount: '50000000',
  reason: 'customer_request',
})

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 }) {
  return (
    <StrimzProvider config={{ baseUrl: 'https://api.strimz.finance' }}>{children}</StrimzProvider>
  )
}
 
export function Checkout({ sessionId }: { sessionId: string }) {
  return <StrimzPayButton sessionId={sessionId} onSuccess={(tx) => console.log(tx)} />
}

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

On this page