Integrate server-side. Run provisioning, quoting, ordering, and approval signing from your backend with your API key. The sections below explain each step. For an interactive tester and a copy-paste sandbox script, see the sandbox playground.
Embedded wallets run on Stellar today, so the wallet’s chain is Stellar. All endpoints use the raw
Authorization header (no Bearer prefix); see Authentication. You do not need the wallet’s per-chain rules (trustlines, reserves, transaction expiry) to use an embedded wallet; the embedded wallet handles them for you.Who holds the key
You, the integrating partner, choose who holds the owner key:- You hold the owner key yourself, on behalf of your program; or
- Your end customer holds and controls the owner key, so the customer alone can authorize transactions and you never hold or see the customer’s private key.
Whether holding the key makes you a custodian or money transmitter depends on your own facts, activities, and jurisdiction. This is not legal advice; determine your own obligations with your legal and compliance advisors.
Provision a wallet
Provision an embedded wallet by sending the public half of a P-256 key you generated. Submit exactly one of:signerPublicKey— compressed SEC1 hex (66 characters,02/03prefix)signerPublicKeyPem— SPKI PEM (-----BEGIN PUBLIC KEY-----)signerPublicKeyJwk— EC JWK withcrv: P-256(typical WebCrypto export)
publicKey.
200 returns the wallet, including the address and the signer you registered:
publicKey as walletAddress in your quote and walletId as cryptoWalletId in your order. See POST /ramp/wallet for the full schema.
See your wallets
To reuse a wallet you already provisioned, list an organization’s wallets and reuse the existingpublicKey; there is no need to re-provision. Embedded wallets carry a signerPublicKey and claimedOwnership: true.
Quoting and ordering
An embedded wallet is quoted and ordered exactly like any other wallet, so the quote and order follow the standard procedure. Pass the wallet’spublicKey as walletAddress on the quote and cryptoWalletId (or publicKey) on the order. The direction, blockchain, and amounts ride on the quote; for the wallet’s chain, blockchain is stellar today.
Quote with walletAddress so the account reserve and trustline a new wallet needs are priced into the fee (Stellar onramps only; see Stellar → Wallet & gas). This is how most embedded wallets are first populated: a brand-new wallet is bootstrapped by its first onramp, with reserve and trustline costs folded into the quote fee; the partner never sends XLM. Without walletAddress, order creation will ask you to re-quote. The standard flows cover both directions end to end: Onramps and Offramps.
The create response carries no approval. Order creation only opens the order. The approval is minted later (after fiat is received for an onramp, or after Etherfuse builds the burn transaction for an offramp) and surfaces on the order read.
Signing is the different part
Everything above is shared with any wallet. The signing is what makes an embedded wallet an embedded wallet, and it is the same propose-then-approve loop in both directions:- Etherfuse mints an approval on the order asynchronously: for an onramp after fiat is received, for an offramp after the burn transaction is built. It is never returned when you create the order.
- The
order_updatedwebhook and the WebSocket stream both deliver the full order including the pendingapproval, so you are notified the moment one is ready (polling GET /ramp/order/ is the fallback). - You re-read the order, take the
approvalobject{ approvalMessageId, approvalMessage, summary }, sign the exactapprovalMessagebytes with the owner key, and submit the signature to POST /ramp/order//approvals. - Etherfuse accepts the approval and broadcasts the transaction.
First-funds acceptance. This one is a quirk of the chain, not of Etherfuse. The first time an embedded wallet receives funds it has no trustline, so the tokens arrive as a Stellar claimable balance, and the owner has to sign an acceptance that both opens the trustline and claims the funds (a
ChangeTrust plus ClaimClaimableBalance transaction). For an embedded wallet that acceptance is delivered as an owner approval to sign, exactly like any other approval; you do not build it. The order then carries stellarClaimableBalanceId.Offramp approval. An offramp authorizes a burn rather than a claim. The approval (an
Offramp <amount> <code> summary) appears once Etherfuse builds the burn transaction, with no incoming-fiat step first, so it is available earlier in the lifecycle than an onramp’s. Sign and submit it exactly the same way.Sign the approval
TheapprovalMessage is an opaque authorization payload: sign the string verbatim; you do not parse or construct it. Show users what they are approving with summary (for example Claim 99.61 CETES or Offramp 50 USDC).
Return the ECDSA signature as a hex string in the signature field. Everything is hex in JSON. What varies is the byte layout inside: server-side signers typically output ~142 characters (DER-wrapped r and s); browser WebCrypto outputs 128 characters (raw r‖s). Etherfuse accepts both.
{ approvalMessageId, approvalMessage, signature }. Include publicKey (your signerPublicKey) when you want the request self-describing; when omitted, Etherfuse uses the key registered on the wallet.
A 200 means the approval was accepted and broadcast follows automatically. The response includes completed: true when the transaction is fully approved (today every embedded wallet uses a single owner key, so this is always true on success).
| Status | Meaning |
|---|---|
200 | Accepted; broadcast follows automatically |
400 | Bad signature, publicKey mismatch, or approvalMessage does not match the pending proposal |
409 | Stale approvalMessageId, or order is canceled/refunded; re-read the order |
410 | Approval expired; a replacement is minted; re-read and sign the fresh one |
approval, so there is usually no recovery procedure: re-read and sign the fresh one.
Embedded wallet offramps use this same approval flow, not
burnTransaction. If you provisioned an embedded wallet, wait for approval on the order and sign it; ignore the bring-your-own-wallet burn path in Offramps.Related
Sandbox playground
Interactive tester and minimal sandbox onramp script