$npx -y skills add binance/binance-skills-hub --skill onchain-payBinance Onchain Pay enables users to buy cryptocurrency with fiat (e.g., EUR, USD) or send existing crypto from their Binance account directly to any external on-chain wallet address in a single flow—no manual withdrawal needed. Enables partners to integrate crypto buying service
| 1 | # Binance Onchain-Pay Open API Skill |
| 2 | |
| 3 | Call Binance Onchain-Pay Open API endpoints with automatic RSA SHA256 request signing. |
| 4 | |
| 5 | ## Use Cases & Scenarios |
| 6 | |
| 7 | This skill is designed for the following scenarios: |
| 8 | |
| 9 | ### 1. 💳 Fiat-to-Crypto Purchase & Send |
| 10 | **When to use**: User wants to buy crypto with fiat currency and send directly to an external on-chain wallet address |
| 11 | - Buy USDT with USD/EUR/TWD using credit card → Send to MetaMask address on BSC |
| 12 | - Purchase BTC with Google Pay → Transfer to hardware wallet |
| 13 | - Buy USDC with P2P → Send to DeFi protocol contract address |
| 14 | |
| 15 | **Key APIs**: `trading-pairs` → `payment-method-list` → `estimated-quote` → `pre-order` |
| 16 | |
| 17 | ### 2. 🔄 Direct Crypto Transfer (Send Primary) |
| 18 | **When to use**: User has crypto in Binance account and wants to send to external address |
| 19 | - Send existing USDT from Binance Spot to friend's wallet address |
| 20 | - Transfer ETH to Uniswap contract for trading |
| 21 | - Move crypto from Binance to self-custodial wallet (Trust Wallet, Ledger, etc.) |
| 22 | |
| 23 | **Key APIs**: `pre-order` with `SEND_PRIMARY` customization |
| 24 | |
| 25 | ### 3. 🔗 Cross-Chain Bridge Operations |
| 26 | **When to use**: User needs to buy crypto on one chain and transfer to another network |
| 27 | - Buy USDC on Ethereum → Bridge to Polygon for lower fees |
| 28 | - Purchase tokens on BSC → Transfer to Base network |
| 29 | - Fiat to crypto on Solana → Send to Arbitrum for DeFi |
| 30 | |
| 31 | **Key APIs**: `crypto-network` → `pre-order` with network selection |
| 32 | |
| 33 | ### 4. 🏪 Merchant Payment Integration |
| 34 | **When to use**: Integrate crypto payment gateway for e-commerce or services |
| 35 | - Accept fiat payments and auto-convert to crypto |
| 36 | - Enable "Pay with Crypto" checkout flow |
| 37 | - Process subscription payments with crypto |
| 38 | |
| 39 | **Key APIs**: `pre-order` with `externalOrderId` tracking |
| 40 | |
| 41 | ### 5. 🤖 Smart Contract Interaction (Onchain-Pay Easy) |
| 42 | **When to use**: Buy crypto and execute smart contract in one transaction |
| 43 | - Buy USDT and deposit to lending protocol |
| 44 | - Purchase tokens and stake in DeFi pool |
| 45 | - Fiat on-ramp directly to GameFi or NFT marketplace |
| 46 | |
| 47 | **Key APIs**: `pre-order` with `ON_CHAIN_PROXY_MODE` customization |
| 48 | |
| 49 | ### 6. 📊 Query & Monitoring |
| 50 | **When to use**: Check order status, available networks, or payment methods |
| 51 | - Monitor order processing status (pending, completed, failed) |
| 52 | - List supported fiat currencies and cryptocurrencies |
| 53 | - Check available payment methods for specific country/amount |
| 54 | - Verify network fees and limits |
| 55 | |
| 56 | **Key APIs**: `order`, `crypto-network`, `trading-pairs`, `payment-method-list` |
| 57 | |
| 58 | --- |
| 59 | |
| 60 | ## Quick Reference |
| 61 | |
| 62 | | Endpoint | API Path | Required Params | Optional Params | |
| 63 | |----------|----------|-----------------|-----------------| |
| 64 | | Payment Method List (v1) | `papi/v1/ramp/connect/buy/payment-method-list` | fiatCurrency, cryptoCurrency, totalAmount, amountType | network, contractAddress | |
| 65 | | Payment Method List (v2) | `papi/v2/ramp/connect/buy/payment-method-list` | (none) | lang | |
| 66 | | Trading Pairs | `papi/v1/ramp/connect/buy/trading-pairs` | (none) | (none) | |
| 67 | | Estimated Quote | `papi/v1/ramp/connect/buy/estimated-quote` | fiatCurrency, requestedAmount, payMethodCode, amountType | cryptoCurrency, contractAddress, address, network | |
| 68 | | Pre-order | `papi/v1/ramp/connect/buy/pre-order` | externalOrderId, merchantCode, merchantName, ts | fiatCurrency, fiatAmount, cryptoCurrency, requestedAmount, amountType, address, network, payMethodCode, payMethodSubCode, redirectUrl, failRedirectUrl, redirectDeepLink, failRedirectDeepLink, customization, destContractAddress, destContractABI, destContractParams, affiliateCode, gtrTemplateCode, contractAddress | |
| 69 | | Get Order | `papi/v1/ramp/connect/order` | externalOrderId | (none) | |
| 70 | | Crypto Network | `papi/v1/ramp/connect/crypto-network` | (none) | (none) | |
| 71 | | P2P Trading Pairs | `papi/v1/ramp/connect/buy/p2p/trading-pairs` | (none) | fiatCurrency | |
| 72 | |
| 73 | --- |
| 74 | |
| 75 | ## How to Execute a Request |
| 76 | |
| 77 | ### Step 1: Gather credentials |
| 78 | |
| 79 | Use the default account (prod) unless the user specifies otherwise. You need: |
| 80 | |
| 81 | - **BASE_URL**: API base URL |
| 82 | - **CLIENT_ID**: Client identifier |