From crypto-infra-skills
Use when designing or reviewing a crypto debit/credit card product. Covers card issuer integration (Marqeta, Stripe Issuing, GPS, Galileo), funding flow (auth → settle), ledger architecture for crypto-to-fiat conversion, KYC/AML compliance, BIN sponsorship, FX and crypto pricing, and chargeback handling. Use whenever the user mentions crypto card, debit card, card issuing, authorization flow, settlement, BIN sponsor, or interchange.
How this skill is triggered — by the user, by Claude, or both
Slash command
/crypto-infra-skills:category-crypto-cardThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Trigger this skill when the user asks to:
Trigger this skill when the user asks to:
A crypto card is NOT a "card that spends crypto." Visa/Mastercard rails are fiat-only.
What actually happens:
The card is a fiat card. Crypto is just the funding source.
Direct issuer (rare, very hard):
Issuer-processor (most common):
Sponsored program (fastest to launch):
Pick based on: speed-to-market vs unit economics. Early-stage = sponsored. At scale = direct issuer-processor.
Authorization
├── Approved → Captured (funds locked, awaiting clearing)
│ ├── Cleared (settlement matches auth) → Settled
│ ├── Cleared with adjustment (e.g., tip) → Settled (different amount)
│ └── Reversed (auth expired without settle) → Released
└── Declined (any reason)
Settled transactions
├── Refund (merchant credit) → Refunded
├── Chargeback initiated → Disputed
│ ├── Won → Resolved
│ └── Lost → Charged back (you take the loss or pass to user)
Your ledger must model all of these. Don't conflate auth with settlement — they're different objects with different timing.
The hot path. Sub-2-second decision required.
On authorization webhook:
1. Validate the auth (card, MCC, merchant, amount, currency)
2. Look up user's crypto balance + price feed
3. Compute required crypto = fiat_amount * (1 + price_buffer) / crypto_price
4. Apply user spending limits (per-tx, per-day, per-month)
5. Apply program rules (blocked MCCs, blocked merchants, velocity)
6. If sufficient + within limits: lock the crypto + approve
7. If not: decline with appropriate reason code
8. Return decision in <500ms (provider timeout is 1-2s, leave margin)
Price buffer: crypto moves fast. Between auth and settle (can be days), price might drop 5%. Buffer protects against under-collateralization. Typical: 10-20% for volatile assets, 1-2% for stables.
Velocity rules: abusive patterns include rapid micro-transactions and merchant-induced double-auth. Have rate limits at user and card level.
Double-entry, append-only, with multi-currency:
TransactionEntry
├── id, timestamp, type, status
├── debit_account_id
├── debit_amount + debit_currency
├── credit_account_id
├── credit_amount + credit_currency
├── exchange_rate (if cross-currency)
└── correlation_id (links auth → capture → settle → refund)
Account types:
The auth flow ledger entries:
Auth approved:
DEBIT user_btc_wallet (locked crypto)
CREDIT card_pending_btc (now locked)
+ record price snapshot + fiat amount for reconciliation
Settlement received (fiat amount):
Resolve the lock + execute the conversion:
DEBIT card_pending_btc (release lock)
CREDIT crypto_liquidity_btc (we now own the crypto)
DEBIT fiat_settlement_account (we owe USD)
CREDIT user_fiat_ledger (paid for purchase)
Plus a separate sale transaction at current price to cover fiat:
DEBIT crypto_liquidity_btc
CREDIT fiat_treasury (sold for USD at execution price)
The reconciliation between auth-time price and settle-time price is where you profit or lose on FX/crypto movement.
Card programs have specific KYC requirements that exceed typical exchange KYC:
Provider integration: Persona, Sumsub, Onfido for the identity side. Sanctions via ComplyAdvantage, ChainAnalysis (for crypto-side), or your BIN sponsor's mandated tool.
Critical: sanctions screening at auth time must add <50ms to the auth decision. Pre-compute risk scores, cache aggressively, hit a real-time service only for new merchants.
Three rates involved in any cross-currency transaction:
Your P&L on the card includes interchange (revenue), scheme fees (cost), processing fees (cost), and the spread you charge on FX/crypto conversion.
Don't undercharge the spread. Major card products charge 2-5% on FX/crypto spread. Most of your unit economics live here.
Crypto card chargebacks are operationally hard because:
Policy decisions to make upfront:
Daily reconciliation is mandatory:
Discrepancies > $0.01 should trigger investigation, not be written off.
| Excuse | Reality |
|---|---|
| "We'll integrate KYC at launch" | KYC is auth flow infrastructure, not a feature. Integrate from day one. |
| "Let users hold the crypto, we just sell at swipe" | Custody is the entire product. If you don't hold custody, you're a thin wrapper on someone else's card. |
| "We don't need a price buffer, crypto is liquid" | Crypto is volatile. A 10% buffer protects you from a flash crash between auth and settle. |
| "Auth and settle are basically the same thing" | They are not. Different amounts, different timing, different reversal logic. Model them separately. |
| "We can save on issuer fees by using a cheaper BIN" | Premium BINs get higher interchange. Cheap BIN = cheap interchange = thin margins. |
| "Refunds are just negative authorizations" | Refunds are independent settlement events. Some come without a prior auth. Handle them as first-class. |
Before launch:
| Product | Custody model | Settlement | Differentiator |
|---|---|---|---|
| Crypto.com Card | Custodial | Real-time crypto → fiat | CRO staking rebates |
| Coinbase Card | Custodial | Real-time | Fiat-backed with crypto cashback |
| Bybit Card | Custodial | Real-time | High limits, strong Asia presence |
| Bitpanda Card | Custodial | Real-time | EU focus, regulated |
| Kast | Custodial, stablecoin-first | USDC settlement | Stablecoin native, no FX games |
| Plutus | Custodial | Real-time | PLU rewards token |
Strategic implication: "another crypto card" is hard. Win on geography (underserved region), asset (stablecoins-only, or a specific chain), or program economics (rebates, no FX spread).
references/card-issuer-integrations.md — vendor comparison (Marqeta, Stripe Issuing, etc.)references/ledger-architecture.md — double-entry ledger patterns for crypto cardsnpx claudepluginhub hryer/crypto-infra-skills --plugin crypto-infra-skillsProvides behavioral guidelines to reduce common LLM coding mistakes, focusing on simplicity, surgical changes, assumption surfacing, and verifiable success criteria.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.