/
Docs
Technical reference for XCash — SOL payments tied to X (Twitter) identities, built on Solana.
- User authenticates via OAuth 2.0 with X (Twitter). Their X UID is stored and a Solana keypair is derived and persisted server-side.
- Sender calls the pay endpoint with a recipient X handle and an amount in lamports. XCash resolves the handle to a wallet address and signs the transfer.
- The transaction is submitted to the Solana Mainnet-Beta RPC. The tx signature is returned to the caller.
- Recipients can withdraw at any time to an external wallet they own.
xcash_session) that is HttpOnly, Secure, and SameSite=Lax. Include it in every authenticated request.- Redirect the user to
GET /xauth/twitter. XCash generates a PKCE challenge and redirects totwitter.com/i/oauth2/authorize. - X redirects back to
/xauth/twitter/callbackwith acodeparameter. - Server exchanges the code for tokens, upserts the user record, and sets the session cookie.
- All subsequent API calls are authenticated via the session cookie — no Bearer token required from the client.
{
"username": "satoshi",
"name": "Satoshi",
"avatar": "https://pbs.twimg.com/...",
"wallet": "7xKX...F3Qm"
}
{
"lamports": 2500000000,
"sol": 2.5
}
// Request
{
"to": "vitalik", // X username (without @)
"lamports": 1000000 // amount in lamports (1 SOL = 1e9)
}
// Response
{
"signature": "5fG3...aP9z",
"explorer": "https://solscan.io/tx/5fG3...aP9z"
}
// Request
{
"to": "ExternalWalletAddress...",
"lamports": 500000000
}
// Response
{
"signature": "3rH1...bK7w"
}
{
"transactions": [
{
"type": "received",
"from": "elonmusk",
"lamports": 1000000,
"signature": "5fG3...aP9z",
"timestamp": "2025-03-24T10:00:00Z"
}
],
"cursor": "next_page_token"
}
| Code | Status | Description |
|---|---|---|
UNAUTHENTICATED |
401 | No valid session cookie present. Redirect to /xauth/twitter. |
USER_NOT_FOUND |
404 | The X handle does not have a registered XCash account. |
INSUFFICIENT_FUNDS |
400 | Sender's balance is too low to cover the transfer and network fee. |
INVALID_ADDRESS |
400 | The provided external wallet address is not a valid Solana public key. |
TX_FAILED |
502 | The Solana RPC accepted but the transaction was not confirmed. Retry with the same parameters. |
429 Too Many Requests.POST) validate a X-CSRF-Token header whose value is injected into the page at render time. Cookie-only requests without this header are rejected with 403.| Layer | Technology |
|---|---|
| Blockchain | Solana Mainnet-Beta · @solana/web3.js |
| Auth | X OAuth 2.0 PKCE |
| Backend | Node.js · TypeScript |
| Session | Signed HTTP-only cookies |
| Database | PostgreSQL — user → wallet mapping |
| Frontend | React/Vite/Tailwindcss |
Last updated: March 2025
By accessing or using XCash, you agree to be bound by these Terms. If you do not agree, do not use the service.
You must be at least 18 years old and legally permitted to use cryptocurrency services in your jurisdiction. By using XCash, you confirm that you meet these requirements.
XCash generates a Solana wallet on your behalf upon registration. Your private key is stored encrypted. XCash is non-custodial in intent — you are responsible for your wallet's security. We strongly recommend exporting and backing up your private key. XCash cannot recover lost keys.
All transactions are executed on Solana Mainnet and are irreversible once confirmed on-chain. XCash is not responsible for transactions sent to incorrect addresses, failed transactions due to network conditions, or losses resulting from user error. Always verify recipient details before sending.
You may not use XCash for money laundering, fraud, financing illegal activity, or any purpose prohibited by applicable law. We reserve the right to suspend accounts that violate these terms.
XCash is provided "as is" without warranties of any kind. We are not liable for any loss of funds, data, or profits arising from use of the service, including but not limited to network failures, smart contract bugs, or third-party service outages.
We may update these Terms at any time. Continued use of XCash after changes constitutes acceptance of the revised Terms. Major changes will be announced on our X community.
For questions regarding these Terms, reach us on X at @xcash_app.
Last updated: March 2025
When you sign up via X OAuth, we collect your X username, display name, and profile photo. We also generate and store a Solana keypair linked to your account. We do not collect passwords, email addresses, or payment card information.
Your data is used solely to operate the XCash service — linking your X identity to your Solana wallet, executing transactions you initiate, and displaying your dashboard. We do not sell your data to third parties.
Transactions executed through XCash are recorded permanently on the Solana blockchain. Your public wallet address and transaction history are publicly visible on-chain. This is an inherent property of blockchain technology and cannot be changed.
Your private key is stored in our database. While we apply security best practices, we recommend exporting your key and managing it yourself for maximum security. We will never ask for your private key over any communication channel.
We use X (Twitter) OAuth for authentication and Solana RPC providers to interact with the blockchain. These services have their own privacy policies and we are not responsible for their data practices.
We retain your account data for as long as your account is active. To request deletion of your account and associated data, contact us on X. Note that on-chain transaction data cannot be deleted.
For privacy-related requests or questions, reach us at @xcash_app on X.