rift_buy_crypto
Buy crypto (USDC or USDT) on Base, Arbitrum, Polygon, Ethereum, or Celo using local fiat through mobile money like M-Pesa. Preview the onramp rate first to see the tokens you'll receive.
Instructions
Buy crypto with mobile money (M-Pesa, etc). REAL PAYMENT — confirm with user. The 'amount' here is in LOCAL FIAT currency (e.g. 1000 = 1000 KES), NOT in USDC. Use rift_preview_exchange_rate with type='onramp' first to show how much USDC they'll get. Requires: login + merchant approval + KYC (for >$20). Does NOT require OTP. User receives a mobile money prompt on their phone.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"shortcode": "<shortcode>",
"amount": "<amount>",
"chain": "<chain>",
"asset": "<asset>",
"mobile_network": "<mobile_network>",
"country_code": "<country_code>"
},
"name": "rift_buy_crypto"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset | Yes | REQUIRED. Crypto to buy: USDC or USDT | |
| chain | Yes | REQUIRED. Destination chain: BASE, ARBITRUM, POLYGON, ETHEREUM, CELO | |
| amount | Yes | REQUIRED. Amount in LOCAL FIAT currency (e.g. 1000 for 1000 KES) — NOT in USDC | |
| shortcode | Yes | REQUIRED. Payment shortcode e.g. MPESA_KE | |
| country_code | Yes | Country: KE, NG, UG, GH, ET, CD, TZ, MW, BR | |
| mobile_network | Yes | Network: Safaricom, Airtel, MTN, Vodacom, Orange Money, Telebirr, TNM, etc |