Strimz

Quickstart

Sign up, get a key, send a test payment, wire a webhook. About five minutes.

This page takes you from zero to a confirmed test transaction in your dashboard. Every command here works as written. No placeholders.

Prerequisites

  • Node.js 18+ or Bun 1.0+ (or any HTTP client) - A wallet with Arc-testnet USDC. See Modes for the faucet.

Create your account

Go to strimz.finance/signup. You can sign in with email, an existing wallet, or Google. Strimz uses Privy under the hood. If you sign in with email, Privy creates an embedded Arc wallet for you in the background.

You don't need to do anything with the embedded wallet right now. It's useful later if you want to receive payouts without connecting an external wallet.

Issue a test API key

In the dashboard, open API keys and click Issue key. Pick Test mode for now. You'll get a string that starts with sk_test_. Copy it straight away. The full key is only shown once. If you lose it, revoke it and issue a new one.

export STRIMZ_KEY=sk_test_xxxxxxxxxxxxxxxxxxxx

Test mode is fully isolated

Test-mode keys can never charge a live customer. Live-mode keys can never accidentally settle in the test environment. Different on-chain deployments, different RPCs, different DBs. See Modes.

Install the SDK

bash pnpm add @strimz/sdk

If you'd rather not add a Node dependency, skip ahead to step 4 and use plain HTTPS. Every endpoint is documented in the API reference.

Create your first payment session

A payment session is a hosted checkout. You create one on the server and send your customer to the checkoutUrl it returns. They connect a wallet, sign the payment, and Strimz fires a webhook once it confirms on-chain.

server.ts
import { Strimz } from '@strimz/sdk'
 
const strimz = new Strimz({ apiKey: process.env.STRIMZ_KEY! })
 
const session = await strimz.paymentSessions.create({
  amount: '50000000',          // 50 USDC, expressed in 6-decimal units
  currency: 'USDC',
  description: 'Pro plan, August',
  successUrl: 'https://your-site.com/thanks',
  cancelUrl:  'https://your-site.com/cancelled',
})
 
console.log(session.checkoutUrl)

Open the printed checkoutUrl in a browser, connect any test-mode wallet that has Arc-testnet USDC, and complete the payment. Now refresh the Payment sessions page in your dashboard. You'll see the new session, and within a few seconds its status moves from pending to confirmed.

Where do I get test USDC?

Visit Circle's faucet and choose Arc testnet. You'll need an Arc-testnet RPC in your wallet. See Modes for the URL.

Receive your first webhook

Polling for state changes works but it gets old fast. A webhook endpoint is the right shape:

const endpoint = await strimz.webhookEndpoints.create({
  url: 'https://your-site.com/webhooks/strimz',
  events: ['payment.completed', 'payment.failed'],
  mode: 'test',
})
 
console.log(endpoint.signingSecret) // shown ONCE. Store it now.

Now wire the receiver:

receiver.ts
import { verifyWebhookSignature } from '@strimz/sdk'
 
app.post('/webhooks/strimz', (req, res) => {
  const ok = verifyWebhookSignature({
    secret: process.env.STRIMZ_WEBHOOK_SECRET!,
    body: req.rawBody,
    signatureHeader: req.headers['strimz-signature'] as string,
  })
  if (!ok) return res.status(401).end()
 
  const event = JSON.parse(req.rawBody.toString())
  switch (event.type) {
    case 'payment.completed':
      console.log('payment confirmed:', event.data.id, event.data.amount)
      break
    case 'payment.failed':
      console.error('payment failed:', event.data.id)
      break
  }
  res.status(200).end()
})

verifyWebhookSignature does a timing-safe equality check and rejects anything older than 300 seconds. The signature format and the algorithm itself are documented on Verifying webhooks.

What you just did

You signed up, issued an API key, created a hosted checkout, took a real test payment, and wired a webhook to react to it. The production version of this code is identical. Swap sk_test_ for sk_live_ and point the webhook at your real URL.

Next steps

On this page