Overview
Pre-funded accounts allow you to maintain a balance with KillB for instant transaction execution without waiting for payment confirmation.
Pre-funded accounts offer the fastest transaction experience and are ideal for high-volume operations.
Benefits
Instant Execution
Transactions execute immediately without payment delays
Better Rates
Reduced fees for pre-funded transactions
Simplified Flow
No payment URLs or confirmations needed
Predictable Settlement
Know exactly when funds will arrive
How It Works
Create Pre-Fund Account
Request a dedicated account for your currency/network
Deposit Funds
Transfer funds to the provided address/account
Check Balance
Verify your pre-funded balance
Create Ramps
Use pre-fund methods in quotations
Instant Execution
Ramps execute immediately from your balance
Creating Pre-Fund Accounts
POST /api/v2/customers/pre-fund/create
{
"currency": "USDC",
"network": "POLYGON"
}
Response:
{
"id": "prefund-account-id",
"type": "PRE_FUND",
"address": "0xABC...DEF",
"currency": "USDC",
"network": "POLYGON",
"active": true,
"createdAt": "2024-01-15T10:30:00.000Z"
}
Supported Pre-Fund Methods
Crypto:
PRE_FUND_POLYGON - USDC/USDT on Polygon
PRE_FUND_ERC20 - USDC/USDT on Ethereum
PRE_FUND_SOLANA - USDC/USDT on Solana
PRE_FUND_TRON - USDC/USDT on Tron
PRE_FUND_ARBITRUM - USDC/USDT on Arbitrum
Fiat:
PRE_FUND - USD, COP, MXN fiat balance
Using Pre-Fund in Ramps
Specify pre-fund method in quotation:
{
"fromCurrency": "USDC",
"toCurrency": "COP",
"amount": 100,
"amountIsToCurrency": false,
"cashInMethod": "PRE_FUND_POLYGON",
"cashOutMethod": "PSE"
}
The ramp will execute instantly if you have sufficient pre-funded balance.
Checking Balance
Get your pre-funded balances:
GET /api/v2/customers/balances
[
{
"id": "balance-id",
"currency": "USDC",
"amount": "1000.50",
"accountId": "prefund-account-id"
},
{
"id": "balance-id-2",
"currency": "COP",
"amount": "5000000.00",
"accountId": "prefund-fiat-id"
}
]
const getPreFundBalance = async () => {
const response = await fetch(
'https://teste-94u93qnn.uc.gateway.dev/api/v2/customers/balances',
{
headers: {
'Authorization': `Bearer ${token}`
}
}
);
const balances = await response.json();
// Find USDC balance
const usdcBalance = balances.find(b => b.currency === 'USDC');
console.log('USDC Balance:', usdcBalance.amount);
return balances;
};
Depositing Funds
Crypto Deposit
Send USDC/USDT to the pre-fund account address:
// Using ethers.js
const depositToPreFund = async (amount) => {
const preFundAccount = await getPreFundAccount('USDC', 'POLYGON');
const usdcContract = new ethers.Contract(USDC_ADDRESS, ERC20_ABI, signer);
// Send USDC
const tx = await usdcContract.transfer(
preFundAccount.address,
ethers.utils.parseUnits(amount.toString(), 6) // USDC has 6 decimals
);
await tx.wait();
console.log('Deposit confirmed:', tx.hash);
};
Fiat Deposit
Contact support to arrange fiat pre-funding via wire transfer or ACH.
Best Practices
const checkBeforeRamp = async (requiredAmount) => {
const balances = await getPreFundBalance();
const usdcBalance = parseFloat(balances.find(b => b.currency === 'USDC').amount);
if (usdcBalance < requiredAmount) {
throw new Error(`Insufficient balance. Need ${requiredAmount}, have ${usdcBalance}`);
}
};
const balance = await getPreFundBalance();
const threshold = 1000; // Alert at $1000
if (balance.amount < threshold) {
await sendAlert('Pre-fund balance low', balance);
}
- Track all deposits
- Monitor all ramps using pre-fund
- Calculate expected balance
- Compare with actual balance
- Investigate discrepancies
Next Steps