> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pesapay.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Send on Stellar

> Pay USDC from the user's wallet to another Stellar address, with no XLM needed.

A send is a native USDC payment on Stellar. Pesa builds the transaction, the user signs it, and Pesa's relay pays the fee.

```ts theme={null}
import { createTransfersClient, STELLAR_CCTP, verifyStellarPayment } from "@pesa/sdk";

const quote = await pesa.quote({
  route: "stellar-send",
  source_chain: "stellar:pubnet",
  source_address: stellarAddress,
  dest_address: recipient,          // what the user typed
  amount_in: "50000000",            // 5 USDC, 7 decimals
});
const transfer = await pesa.createTransfer(quote.id, crypto.randomUUID());

const action = await pesa.getActions(transfer.id);
if (action?.kind !== "stellar_tx") throw new Error("unexpected action");

const tx = verifyStellarPayment(action.xdr, {
  passphrase: STELLAR_CCTP.mainnet.passphrase,
  source: stellarAddress,
  destination: recipient,
  issuer: STELLAR_CCTP.mainnet.usdcIssuer,
  amount7: 50_000_000n,
});

const signedXdr = await signWithStellarWallet(tx);   // sign the returned Transaction
const done = await pesa.submit(transfer.id, { kind: "stellar_tx", signed_xdr: signedXdr });
```

The transfer goes `AWAITING_SIGNATURE → STELLAR_SIGNED → DELIVERED`. The recipient needs a USDC trustline. A Stellar contract address (`C...`) needs none.

## Signing with a Privy Stellar wallet

Privy's Stellar wallet signs a hash. Sign the transaction's hash and attach the signature:

```ts theme={null}
import { useSignRawHash } from "@privy-io/expo/extended-chains";

const { signRawHash } = useSignRawHash();
const { signature } = await signRawHash({
  address: stellarAddress,
  chainType: "stellar",
  hash: `0x${tx.hash().toString("hex")}`,
});
tx.addSignature(stellarAddress, Buffer.from(signature.slice(2), "hex").toString("base64"));
const signedXdr = tx.toXDR();
```

`addSignature` checks the signature against the public key, so a wrong signature fails before anything is sent.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.