Documentation Index
Fetch the complete documentation index at: https://docs.sprinter.tech/llms.txt
Use this file to discover all available pages before exploring further.
Overview
If you run a card program (Rain, Stripe Issuing, Marqeta, etc.), Sprinter Credit lets your cardholders spend against locked DeFi collateral instead of prefunded balances. You keep your existing card stack — KYC, issuance, settlement — and plug in Sprinter as the credit engine. Your integration is three API calls:- Lock — cardholder locks collateral, activating a credit line
- Draw — your backend draws USDC to your settlement address when the card is used
- Repay — debt is repaid at end of billing cycle, collateral unlocks
{ calls: ContractCall[] } — unsigned transaction calldata. No custody handoff, no intermediaries.
What You Need from Sprinter
| Your card program handles | Sprinter handles |
|---|---|
| KYC, compliance, card issuance | Collateral locking & credit line activation |
| Card network authorization & settlement | USDC credit draws to your settlement address |
| Cardholder UX, rewards, tiers | Health factor monitoring, LTV enforcement |
| Deposit addresses, funding detection | Earn vaults (collateral earns yield while locked) |
| Billing, statements | Repayment & collateral unlock |
Before You Start
Card programs that draw credit on behalf of cardholders (e.g. just-in-time at card swipe) need a delegation model. You should decide upfront:- Which account type? EOA (existing wallet) or Smart Account — this affects onboarding and how delegation is set up. See Credit Accounts.
- Which operator model? A Credit Operator lets your backend draw credit without cardholder interaction. Most card programs use the
ExclusiveOperator— see Delegated Credit Draws below for implementation.
Integration
Cardholder Locks Collateral
When a cardholder wants to activate credit-backed spending, they lock collateral via your app. Optionally wrap into an earn vault so collateral earns yield while locked.Returns
{ calls: ContractCall[] } — execute in the cardholder’s wallet. Once locked, the credit line is active.Use GET /credit/protocol to fetch available collateral assets and earn strategies.Set Card Spending Limit
Query the cardholder’s credit position to determine the spending limit for your card program.Map
remainingCreditCapacity to the card spending limit. Poll periodically to update as collateral values or debt change.Draw USDC on Card Use
When the card is used, draw USDC from the cardholder’s credit line to your settlement address. Two funding models:
Returns
Just-in-time draws require a delegation model (Operator or Smart Account). If you haven’t set this up yet, see Before You Start.
- Just-in-Time (at swipe)
- Pre-funding (batch)
Draw at the moment of each card authorization. Your backend receives the auth webhook, calls Sprinter This requires a delegated signer authorized to execute on behalf of the cardholder. See the Authorization Webhook Handler for a complete TypeScript implementation.
/draw, executes on-chain, and responds — all within ~2 seconds.| Parameter | Description |
|---|---|
account | Cardholder’s wallet address |
amount | USDC amount (6 decimals — $50 = 50000000) |
receiver | Your settlement or deposit address |
{ calls: ContractCall[] } — execute on-chain to deliver USDC.A 0.50% origination fee is deducted from each draw. See Fees.
Repay & Unlock
At end of billing cycle, repay the cardholder’s outstanding debt. Once debt is cleared, collateral can be unlocked.Credit runs on a 30-day billing cycle with a 7-day grace period. See Fees.
Delegated Credit Draws
Just-in-time card authorizations require drawing credit without cardholder interaction. This requires a Credit Operator — a contract that lets your backend act on the user’s credit position without custody. See Credit Accounts for choosing between EOA + Operator vs Smart Account. Two approaches:- Operator Contract (Recommended)
- Smart Accounts (Non-Custodial)
Deploy an Safety: The operator can only draw to whitelisted receivers — never touch collateral. Revocation has a time delay to prevent abuse during active billing cycles.
ExclusiveOperator contract. Your backend address is the authorized caller. Cardholders opt in by setting the operator on their credit position.Setup:- Deploy
ExclusiveOperatorwith your backend as thecaller - Cardholder calls
setOperator()on the Credit Hub - Cardholder calls
addCreditReceiver()to whitelist your settlement address
Integration Notes
From Credit to Action
From Credit to Action
The draw is the trigger — settlement is where value is delivered. When a card is swiped, Sprinter draws USDC to your settlement address, and your card network (Visa, Mastercard) clears the transaction. The cardholder bought coffee, paid for a flight, or shopped online — all funded by credit backed by their DeFi collateral. They never sold an asset, and the merchant received fiat through your normal settlement rails. See From Credit to Action.
Settlement Address
Settlement Address
The
receiver in draw calls is your card program’s settlement address — the on-chain address where USDC must land for card network clearing. For pre-funding, this can be a per-user deposit address instead.Health Monitoring
Health Monitoring
Poll
healthFactor from the info endpoint and adjust card spending limits accordingly. A health factor approaching 1.0 means the position is close to liquidation — reduce or freeze the card limit. See Risk Management.Collateral Yield
Collateral Yield
Use the
earn parameter when locking to wrap collateral into a yield-bearing vault. This makes credit structurally cheaper — collateral earns while the card is active. Use GET /credit/protocol to discover available strategies.Fail Closed
Fail Closed
Always decline if the draw cannot be confirmed on-chain. A declined transaction is recoverable; an unauthorized spend is not.
Signer Security
Signer Security
The signing key that executes JIT draws must be secured with HSM or cloud KMS (AWS KMS, GCP Cloud KMS) in production. Never store it in environment variables on shared infrastructure.
Try It
The Card Issuer Demo runs the full credit-backed card lifecycle on Base — collateral locking, credit draw to a settlement address, repay, and unlock — with a mock card issuer that simulates the card program side.Card Program Demo
Clone the repo, add a wallet with USDC and ETH on Base, and run
npm run dev. The mock card issuer handles the card program side — focus on the Sprinter Credit steps.API Reference
Every step maps to a single Sprinter endpoint:| Card Program Flow | Sprinter API |
|---|---|
| Cardholder locks collateral | GET /credit/accounts/{account}/lock |
| Lock + earn vault | GET /credit/accounts/{account}/lock?earn=STRATEGY_ID |
| Check spending limit | GET /credit/accounts/{account}/info |
| Draw USDC to settlement | GET /credit/accounts/{account}/draw?receiver={addr} |
| Repay debt | GET /credit/accounts/{account}/repay |
| Unlock collateral | GET /credit/accounts/{account}/unlock |
| Get protocol config | GET /credit/protocol |
Credit Draw
Core credit draw lifecycle — lock, draw, repay, unlock.
Credit Engine
Health factor, LTVs, and liquidation mechanics.
Credit API Reference
Full API reference with interactive playground.