Skip to content

Add Slash as the bank for nibblets' virtual cards - #26

Merged
IAmJSD merged 1 commit into
bank/2-cardsfrom
bank/3-slash
Oct 21, 2026
Merged

IAmJSD merged 1 commit into
bank/2-cardsfrom
bank/3-slash

Conversation

@IAmJSD

@IAmJSD IAmJSD commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Part 3 of 7 in the bank stack, on #25.

What this adds

@nibblet/bank-slash issues USD virtual cards on your Slash account.

  • Single use: Slash's own isSingleUse, which Slash closes after the first authorisation. Multi-use cards stay open until killed.
  • Limit: every card carries a collective utilisation limit (one that never resets) of the card's limit, so Slash itself declines anything over it.
  • Details: GET /card/{id}?include_pan=true&include_cvv=true.
  • Spending: GET /card/{id}/utilization.
  • Kill: PATCH status: "closed".
  • Recovery: each card is tagged with its id in userData, so find can recognise a card made by an issue that timed out.
  • Settings: SLASH_API_KEY (cards.view and cards.manage), plus optional SLASH_ACCOUNT_ID (the account to make cards under, and whose balance Settings shows) and SLASH_BASE_URL. Compose passes them to the server. Set banks up from Settings, with forms their plugins describe #31 (part 6) moves these settings into a form in Settings → Bank; the environment stays as a fallback.

The endpoint and field names come from Slash's official TypeScript SDK (slash-sdk, generated from their OpenAPI spec). I couldn't reach Slash's docs or API from the build environment, so this hasn't been run against a real Slash account. Worth a try with a test card before relying on it.

Screenshots

From #28's UI, in the mock server (?mock=1): Slash in Settings → Bank with its account balance, and a Slash card on a nibblet.

Slash, USD, 2486.50 USD available

A multi-use Slash card ending 4821 with a 120.00 USD limit

Checks

pnpm format:check, pnpm -r typecheck and pnpm test pass on this branch on its own.


Generated by Claude Code

@IAmJSD
IAmJSD added this pull request to stack #29 October 19, 2026 15:34
@IAmJSD
IAmJSD force-pushed the bank/3-slash branch 2 times, most recently from 3c6e723 to d6075dc Compare October 19, 2026 18:52
`@nibblet/bank-slash` issues USD virtual cards on the person's Slash
account: `isSingleUse` cards, which Slash closes after one authorisation,
and ones for several purchases, each with a collective (never resetting)
utilisation limit of the card's limit, so Slash itself declines anything
over it. It reports spending from the card's utilisation, finds a card an
interrupted issue made by the id it tags it with, and shows the account's
balance in Settings.

It turns on with `SLASH_API_KEY` (optionally `SLASH_ACCOUNT_ID`), passed to
the server by compose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KGXXQcj3hZN2jiB6As6kk5
@IAmJSD
IAmJSD merged commit db5de75 into main Oct 21, 2026
4 checks passed
@IAmJSD
IAmJSD deleted the bank/3-slash branch October 21, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants