A step-by-step developer guide for non-custodial fiat-to-crypto deposits on Stellar.
Status: in development. The on-ramp endpoints and MCP tools described below are not live yet. The request body follows the shipped on-ramp intent schema; the response fields shown are the planned contract and may change before release.
The Stellar Intel on-ramp flow allows wallets, applications, and agents to guide users from local fiat currencies (USD, EUR, NGN, BRL, etc.) into Stellar assets such as USDC or XLM. The process consists of four main phases:
unsignedChangeTrustXdr if the wallet does not yet trust the asset.handoffUrl for KYC and payment completion.Retrieve the best rate and fee estimate across supported anchors using the quote endpoint:
GET /api/v1/onramp/quote?sourceAsset=NGN&destinationAsset=USDC&amount=150000&depositMethod=bank_transfer{
"quoteId": "quote_onramp_8f419c",
"sourceAsset": "NGN",
"destinationAsset": "USDC",
"sourceAmount": "150000.00",
"destinationAmount": "95.60",
"rate": "1568.50",
"fee": {
"fixed": "500.00",
"percent": "0.5"
},
"anchor": {
"id": "cowrie",
"name": "Cowrie Exchange",
"domain": "cowrie.exchange"
},
"expiresAt": "2026-10-17T12:30:00Z"
}Submit the validated parameters to generate a canonical on-ramp intent. The destination must be a valid public key (G…):
{
"type": "onramp",
"sourceAsset": "NGN",
"destinationAsset": "USDC",
"amount": "150000.00",
"sender": "NG123456789012345678",
"destination": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
"depositMethod": "bank_transfer"
}{
"intentId": "onramp_intent_9a4f21",
"status": "pending_trustline",
"unsignedChangeTrustXdr": "AAAAAgAAAABn...",
"handoffUrl": "https://cowrie.exchange/sep24/deposit?transaction_id=...",
"createdAt": "2026-10-17T12:05:00Z"
}unsignedChangeTrustXdrBefore an anchor can credit an issued asset (such as USDC) to a Stellar account, that account must have an active trustline. If the account lacks one, the intent response includes an unsignedChangeTrustXdr:
// Example: Submitting the trustline transaction with Freighter or Stellar SDK
import { signTransaction } from '@stellar/freighter-api';
if (response.unsignedChangeTrustXdr) {
const signedXdr = await signTransaction(response.unsignedChangeTrustXdr, {
networkPassphrase: 'Public Global Stellar Network ; September 2015',
});
await server.submitTransaction(signedXdr);
}If the account already holds the required trustline, unsignedChangeTrustXdr will be null and this step can be safely bypassed.
handoffUrl)Once the trustline is confirmed, launch the handoffUrl in a secure browser tab or in-app webview modal. The user completes the anchor's KYC and receives banking instructions or card payment fields.
Callback Notifications: Anchors send status updates back to the application via webhooks or URL postMessage triggers upon successful payment settlement.
Agents using the hosted Model Context Protocol (MCP) server at /api/mcp get on-ramp tools that work without access to secret keys:
intel.onramp.quote: Returns the best indicative deposit estimate across the anchors that serve a corridor.intel.onramp.prepare: Constructs the unsigned on-ramp intent and returns the app URL where the user completes the deposit.Non-custodial by design: Stellar Intel does not touch user fiat or custody private keys. All deposits occur directly between the user and licensed Stellar anchors adhering to SEP-6 and SEP-24 specifications.