Onramp - Buy Crypto
Onramp - Buy Cryptocurrency
Convert fiat currency to cryptocurrency using your virtual balance.
What is ONRAMP?
ONRAMP allows you to purchase cryptocurrency using fiat funds from your virtual account.
Supported cryptocurrencies:
- USDC (USD Coin)
- USDT (Tether)
- ETH (Ethereum)
- BTC (Bitcoin)
- And more…
Deals vs Orders
Important: ONRAMP operations use the /deals endpoint, not /orders. A deal represents the intent to buy crypto and can be paid in full or partially. Each payment creates one or more orders that execute the purchase.
Key differences:
- Deal: The crypto purchase intent (can be partially funded)
- Order: The actual execution of the purchase (created automatically by the deal)
- Partial payments: You can pay a deal in multiple installments for ONRAMP
- Destination: Deals only need the destination wallet/account
Automatic Payment Execution
Balance Required: By default, you need sufficient balance in your virtual account to close an ONRAMP deal. ONRAMP payments execute automatically when there’s a credit to your currency balance.
How it works:
- Create an ONRAMP deal for X amount of crypto
- Deal requires Y fiat in your virtual account
- When your virtual account receives funds (PAYIN, etc.), the deal automatically executes
- Orders are created and crypto is purchased
Pre-approved Merchants:
- Some merchants can operate deals without requiring upfront balance
- This allows creating deals before funds are available
- Contact Koywe to request pre-approval for this feature
Quick Example
Step-by-Step Integration
Step 1: Get Crypto Wallet
You need a wallet address to receive the cryptocurrency:
Step 2: Check Fiat Balance
Balance Required: Unless your merchant is pre-approved, you need sufficient balance to close the deal. The deal will execute automatically when funds are available.
Step 3: Get Quote
Step 4: Create Deal
What happens next: The deal will automatically create orders as payments are processed. You can fund the deal in one payment or multiple partial payments.
Step 5: Monitor Deal and Orders
Supported Networks
Network Selection: Specify the network when creating the wallet address or using destination account.
Partial Payments (ONRAMP Only)
Unique to ONRAMP: Unlike OFFRAMP (which must be paid completely), ONRAMP deals can be paid in multiple partial payments. Each partial payment creates an order that purchases the corresponding amount of crypto.
How Partial Payments Work
Example: Partial Payment Deal
Use Case: Partial payments are useful for:
- Dollar-cost averaging (DCA) strategies
- Staged purchases over time
- Managing cash flow while building crypto position
- Allowing customers to pay in installments