Skip to main content

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:
  1. Lock — cardholder locks collateral, activating a credit line
  2. Draw — your backend draws USDC to your settlement address when the card is used
  3. Repay — debt is repaid at end of billing cycle, collateral unlocks
Every Sprinter endpoint returns { calls: ContractCall[] } — unsigned transaction calldata. No custody handoff, no intermediaries.

What You Need from Sprinter

Your card program handlesSprinter handles
KYC, compliance, card issuanceCollateral locking & credit line activation
Card network authorization & settlementUSDC credit draws to your settlement address
Cardholder UX, rewards, tiersHealth factor monitoring, LTV enforcement
Deposit addresses, funding detectionEarn vaults (collateral earns yield while locked)
Billing, statementsRepayment & collateral unlock

Integration

1

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.
# Lock USDC as collateral on Base
curl -X GET 'https://api.sprinter.tech/credit/accounts/0xUSER/lock?amount=1000000000&asset=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'

# Or lock + earn vault (collateral earns yield)
curl -X GET 'https://api.sprinter.tech/credit/accounts/0xUSER/lock?amount=1000000000&asset=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&earn=STRATEGY_ID'
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.
2

Set Card Spending Limit

Query the cardholder’s credit position to determine the spending limit for your card program.
curl -X GET https://api.sprinter.tech/credit/accounts/0xUSER/info
{
  "data": {
    "USDC": {
      "totalCreditCapacity": "900.00",
      "remainingCreditCapacity": "900.00",
      "totalCollateralValue": "1000.00",
      "principal": "0",
      "interest": "0",
      "healthFactor": "Infinity",
      "dueDate": null
    }
  }
}
Map remainingCreditCapacity to the card spending limit. Poll periodically to update as collateral values or debt change.
3

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:
Draw at the moment of each card authorization. Your backend receives the auth webhook, calls Sprinter /draw, executes on-chain, and responds — all within ~2 seconds.
curl -X GET 'https://api.sprinter.tech/credit/accounts/0xUSER/draw?amount=50000000&receiver=0xYOUR_SETTLEMENT_ADDRESS'
This requires a delegated signer authorized to execute on behalf of the cardholder. See the Authorization Webhook Handler for a complete TypeScript implementation.
ParameterDescription
accountCardholder’s wallet address
amountUSDC amount (6 decimals — $50 = 50000000)
receiverYour settlement or deposit address
Returns { calls: ContractCall[] } — execute on-chain to deliver USDC.
A 0.50% origination fee is deducted from each draw. See Fees.
4

Repay & Unlock

At end of billing cycle, repay the cardholder’s outstanding debt. Once debt is cleared, collateral can be unlocked.
# Check outstanding debt
curl -X GET https://api.sprinter.tech/credit/accounts/0xUSER/info

# Repay (anyone can repay on behalf of any account)
curl -X GET 'https://api.sprinter.tech/credit/accounts/0xUSER/repay?amount=50000000'

# Unlock collateral
curl -X GET 'https://api.sprinter.tech/credit/accounts/0xUSER/unlock?amount=1000000000&asset=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
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. Two approaches: See the Authorization Webhook Handler for a complete implementation with signature validation, credit checks, and the full delegated draw flow.

Integration Notes

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.
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.
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.
Always decline if the draw cannot be confirmed on-chain. A declined transaction is recoverable; an unauthorized spend is not.
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 FlowSprinter API
Cardholder locks collateralGET /credit/accounts/{account}/lock
Lock + earn vaultGET /credit/accounts/{account}/lock?earn=STRATEGY_ID
Check spending limitGET /credit/accounts/{account}/info
Draw USDC to settlementGET /credit/accounts/{account}/draw?receiver={addr}
Repay debtGET /credit/accounts/{account}/repay
Unlock collateralGET /credit/accounts/{account}/unlock
Get protocol configGET /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.