binance/binance-skills-hub/onchain-pay

Claude Code and agent skill by binance/binance-skills-hub

Trust tier 3
  • community
  • ext:[{"type":"config","description":"Configuration overrides"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Binance 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 services: - payment-method-list: Get available payment methods (Card, P2P, Google Pay, Apple Pay, etc.) with limits for a fiat/crypto pair - trading-pairs: List all supported fiat currencies and cryptocurrencies - estimated-quote: Get real-time price quote including exchange rate, fees, and estimated crypto amount - pre-order: Create a buy order and get redirect URL to Binance payment flow - order: Query order status and details (processing, completed, failed, etc.) - crypto-network: Get supported blockchain networks with withdraw fees and limits - p2p/trading-pairs: List P2P-specific trading pairs

Install

npx vskill@latest install binance/binance-skills-hub/onchain-pay

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as binance/binance-skills-hub/onchain-pay.

Binance Onchain-Pay Open API Skill

Call Binance Onchain-Pay Open API endpoints with automatic RSA SHA256 request signing.

Use Cases & Scenarios

This skill is designed for the following scenarios:

1. 💳 Fiat-to-Crypto Purchase & Send

When to use: User wants to buy crypto with fiat currency and send directly to an external on-chain wallet address

  • Buy USDT with USD/EUR/TWD using credit card → Send to MetaMask address on BSC
  • Purchase BTC with Google Pay → Transfer to hardware wallet
  • Buy USDC with P2P → Send to DeFi protocol contract address

Key APIs: trading-pairs → payment-method-list → estimated-quote → pre-order

2. 🔄 Direct Crypto Transfer (Send Primary)

When to use: User has crypto in Binance account and wants to send to external address

  • Send existing USDT from Binance Spot to friend's wallet address
  • Transfer ETH to Uniswap contract for trading
  • Move crypto from Binance to self-custodial wallet (Trust Wallet, Ledger, etc.)

Key APIs: pre-order with SEND_PRIMARY customization

3. 🔗 Cross-Chain Bridge Operations

When to use: User needs to buy crypto on one chain and transfer to another network

  • Buy USDC on Ethereum → Bridge to Polygon for lower fees
  • Purchase tokens on BSC → Transfer to Base network
  • Fiat to crypto on Solana → Send to Arbitrum for DeFi

Key APIs: crypto-network → pre-order with network selection

4. 🏪 Merchant Payment Integration

When to use: Integrate crypto payment gateway for e-commerce or services

  • Accept fiat payments and auto-convert to crypto
  • Enable "Pay with Crypto" checkout flow
  • Process subscription payments with crypto

Key APIs: pre-order with externalOrderId tracking

5. 🤖 Smart Contract Interaction (Onchain-Pay Easy)

When to use: Buy crypto and execute smart contract in one transaction

  • Buy USDT and deposit to lending protocol
  • Purchase tokens and stake in DeFi pool
  • Fiat on-ramp directly to GameFi or NFT marketplace

Key APIs: pre-order with ON_CHAIN_PROXY_MODE customization

6. 📊 Query & Monitoring

When to use: Check order status, available networks, or payment methods

  • Monitor order processing status (pending, completed, failed)
  • List supported fiat currencies and cryptocurrencies
  • Check available payment methods for specific country/amount
  • Verify network fees and limits

Key APIs: order, crypto-network, trading-pairs, payment-method-list


Quick Reference

EndpointAPI PathRequired ParamsOptional Params
Payment Method List (v1)papi/v1/ramp/connect/buy/payment-method-listfiatCurrency, cryptoCurrency, totalAmount, amountTypenetwork, contractAddress
Payment Method List (v2)papi/v2/ramp/connect/buy/payment-method-list(none)lang
Trading Pairspapi/v1/ramp/connect/buy/trading-pairs(none)(none)
Estimated Quotepapi/v1/ramp/connect/buy/estimated-quotefiatCurrency, requestedAmount, payMethodCode, amountTypecryptoCurrency, contractAddress, address, network
Pre-orderpapi/v1/ramp/connect/buy/pre-orderexternalOrderId, merchantCode, merchantName, tsfiatCurrency, fiatAmount, cryptoCurrency, requestedAmount, amountType, address, network, payMethodCode, payMethodSubCode, redirectUrl, failRedirectUrl, redirectDeepLink, failRedirectDeepLink, customization, destContractAddress, destContractABI, destContractParams, affiliateCode, gtrTemplateCode, contractAddress
Get Orderpapi/v1/ramp/connect/orderexternalOrderId(none)
Crypto Networkpapi/v1/ramp/connect/crypto-network(none)(none)
P2P Trading Pairspapi/v1/ramp/connect/buy/p2p/trading-pairs(none)fiatCurrency

How to Execute a Request

Step 1: Gather credentials

Use the default account (prod) unless the user specifies otherwise. You need:

  • BASE_URL: API base URL
  • CLIENT_ID: Client identifier
  • API_KEY: The sign access token
  • PEM_PATH: Absolute path to the RSA private key PEM file

Use the account marked (default) in .local.md.

Step 2: Build the JSON body

Build a compact JSON body from user-specified parameters. Remove any parameters the user did not provide.

IMPORTANT: Address and Network Validation

  • address (destination wallet address) and network (blockchain network) are REQUIRED for all pre-order requests
  • If the user has configured Default Address and Default Network in .local.md, use them automatically
  • If not configured or not provided by user, ASK the user to provide both values before proceeding
Step 3: Sign and call using the bundled script
bash
bash <skill_path>/scripts/sign_and_call.sh \
"<BASE_URL>" \
"<API_PATH>" \
"<CLIENT_ID>" \
"<API_KEY>" \
"<PEM_PATH>" \
'<JSON_BODY>'
Step 4: Return results

Display the JSON response to the user in a readable format.


Authentication

See `references/authentication.md` for full signing details.

Summary:

  1. Payload = JSON_BODY + TIMESTAMP (milliseconds)
  2. Sign payload with RSA SHA256 using PEM private key
  3. Base64 encode the signature (single line)
  4. Send as POST with headers: X-Tesla-ClientId, X-Tesla-SignAccessToken, X-Tesla-Signature, X-Tesla-Timestamp, Content-Type: application/json

Parameters Reference

Payment Method List v1 (buy/payment-method-list)
ParameterTypeRequiredDescription
fiatCurrencystringYesFiat currency code (e.g., USD, EUR, BRL, UGX)
cryptoCurrencystringYesCrypto currency code (e.g., BTC, USDT, USDC, SEI)
totalAmountnumberYesAmount value
amountTypenumberYes1 = fiat amount, 2 = crypto amount
networkstringNoBlockchain network (e.g., BSC, ETH, SOL, BASE, SEI)
contractAddressstringNoToken contract address (required for non-native tokens)
Payment Method List v2 (v2/buy/payment-method-list)

Get all available payment methods without specifying fiat/crypto parameters. Simplified version of v1.

ParameterTypeRequiredDescription
langstringNoLanguage code for localized payment method names (e.g., en, cn, es)

Differences from v1:

  • Simpler: No need to specify fiatCurrency, cryptoCurrency, or amount
  • Comprehensive: Returns all available payment methods for the merchant
  • Use case: Useful for displaying all options before user input

Response Format: Same as v1, returns list of payment methods with their limits and properties.

Estimated Quote (buy/estimated-quote)
ParameterTypeRequiredDescription
fiatCurrencystringYesFiat currency code
cryptoCurrencystringNoCrypto currency code (optional if contractAddress provided)
requestedAmountnumberYesAmount value
payMethodCodestringYesPayment method (e.g., BUY_CARD, BUY_GOOGLE_PAY, BUY_P2P, BUY_WALLET)
amountTypenumberYes1 = fiat amount, 2 = crypto amount
networkstringYes*Blockchain network (can use default from .local.md)
contractAddressstringNoToken contract address
addressstringYes*Destination wallet address for receiving crypto

\* Recommended: These parameters should be provided. If not specified by user, check .local.md for defaults. If no defaults exist, ask user before proceeding.

Pre-order (buy/pre-order)

Create a buy pre-order and return the redirect link for payment.

ParameterTypeRequiredDescription
externalOrderIdstringYesPartner's unique order ID (must be unique)
merchantCodestringYesMerchant code assigned to you by Binance (provided by user)
merchantNamestringYesMerchant display name (provided by user)
tsnumberYesCurrent timestamp in milliseconds
fiatCurrencystringNo*Fiat currency code (e.g., TWD, USD, EUR)
fiatAmountnumberNo*Fiat amount to spend
cryptoCurrencystringNo*Crypto currency to buy (e.g., USDT, BTC, ETH)
requestedAmountnumberNo*Amount value (fiat or crypto based on amountType)
amountTypenumberNo*1 = fiat amount, 2 = crypto amount
addressstringNoDestination wallet address for receiving crypto
networkstringNoBlockchain network (e.g., BSC, ETH, SOL)
payMethodCodestringNoPayment method code (e.g., BUY_CARD, BUY_P2P, BUY_GOOGLE_PAY, BUY_APPLE_PAY, BUY_PAYPAL, BUY_WALLET, BUY_REVOLUT)
payMethodSubCodestringNoPayment method sub-code (e.g., card, GOOGLE_PAY, WECHAT)
redirectUrlstringNoSuccess redirect URL
failRedirectUrlstringNoFailure redirect URL
redirectDeepLinkstringNoDeep link for success (mobile apps)
failRedirectDeepLinkstringNoDeep link for failure (mobile apps)
customizationobjectNoCustom configuration object (see Customization section below)
destContractAddressstringNoDestination contract address (for Onchain-Pay Easy mode)
destContractABIstringNoContract ABI name (for Onchain-Pay Easy mode)
destContractParamsobjectNoContract parameters (for Onchain-Pay Easy mode)
affiliateCodestringNoAffiliate code for commission tracking
gtrTemplateCodestringNoGTR template code (e.g., OTHERS)
contractAddressstringNoToken contract address (for non-native tokens)

\* Either fiatAmount or (requestedAmount + amountType) should be provided. If fiatCurrency is not provided, the system will auto-select available fiat currencies.

Response Example:

json
{
"code": "000000",
"message": "success",
"data": {
"link": "https://app.binance.com/uni-qr/ccnt?...",
"linkExpireTime": 1772852565045
},
"success": true
}
Get Order (order)
ParameterTypeRequiredDescription
externalOrderIdstringYesThe external order ID to query

Customization Options

The customization field in pre-order API accepts various flags to customize the buy flow behavior. Each merchant must have the corresponding permission configured in db.merchant_info table.

Available Customization Flags

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
922
Repository forks
175
7-day trend score
34

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • configConfiguration overrides

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/binance/binance-skills-hub/onchain-pay/badge)](https://verified-skill.com/skills/binance/binance-skills-hub/onchain-pay)

Something wrong with this skill or its page? Tell us.