HydraBooks

Smoke Test — nimsforeststripe

1.9 KB Pushed by api Updated 20 Mar 2026 Raw

Smoke Test — nimsforeststripe

Local Development

  1. Start in dev mode:
STRIPE_SECRET_KEY=sk_test_... make run
  1. Health check:
curl http://localhost:8080/api/v1/health
# Expected: {"status":"ok","stripe_healthy":true}
  1. Get balance:
curl -H "X-API-Token: <token>" http://localhost:8080/api/v1/balance
# Expected: {"object":"balance","available":[...],"pending":[...]}
  1. List customers:
curl -H "X-API-Token: <token>" http://localhost:8080/api/v1/customers
# Expected: {"data":[...],"has_more":false}
  1. Create customer:
curl -X POST -H "X-API-Token: <token>" \
  -H "Content-Type: application/json" \
  -d '{"email":"test@example.com","name":"Test User"}' \
  http://localhost:8080/api/v1/customers
# Expected: 201 with customer object
  1. List charges:
curl -H "X-API-Token: <token>" http://localhost:8080/api/v1/charges
  1. Create payment intent:
curl -X POST -H "X-API-Token: <token>" \
  -H "Content-Type: application/json" \
  -d '{"amount":1000,"currency":"eur","description":"Test payment"}' \
  http://localhost:8080/api/v1/payment-intents
# Expected: 201 with payment intent (client_secret included)

With NATS (Production)

  1. Verify taproot:
# Publish tap.stripe.customers.create to NATS
nats pub tap.stripe.customers.create '{"subject":"tap.stripe.customers.create","data":{"email":"taproot@test.com","name":"Taproot Test"},"source":"test","ts":"2026-01-01T00:00:00Z"}'
# Connector should create customer and publish tap.stripe.customer.created
  1. Verify sync:
# Check logs for periodic sync messages
# "[Sync] polling Stripe events..."
# "[Sync] emitted N events"

Docker

  1. Build and run:
GOOS=linux GOARCH=amd64 go build -o nimsforeststripe ./cmd/nimsforeststripe
docker build -t nimsforeststripe:test .
docker run --rm -p 8097:8097 -v /path/to/config.yaml:/root/.nimsforeststripe/config.yaml nimsforeststripe:test