Appearance
Cash App (Core)
Deposit with Cash App via client.cashApp. Route here when the payment method has type: cash_app (see Payment methods).
The user picks a destination asset and a fiat amount (currently USD), then pays in Cash App or with a Lightning invoice.
Prerequisites
- Create a client with a Swapped Connect
sessionId(from your backend). - Call
loadSession()and confirm the session is active (Initiated). - Let the user pick Cash App from payment methods.
ts
import {
createSwappedConnectClient,
IntegrationProvider,
} from '@swapped/connect-sdk';
const client = createSwappedConnectClient({
sessionId: 'your-session-id',
});
await client.loadSession();
const cashApp = await client.paymentMethods.getOne({
provider: IntegrationProvider.CashApp,
});Cash App is not in the exchanges category. Filter by provider (or type: cash_app).
Flow overview
| Step | What happens | Docs |
|---|---|---|
| 1. Assets | Load destination tokens for the session | Assets |
| 2. Create order | User amount → createOrder | Orders & checkout |
| 3. Checkout | Show Cash App URL / Lightning invoice | Orders & checkout |
| 4. Wait | Completion, failure, or expiry | Expiry, Events |
| 5. Done | Summary; restartSession() for another payment | Summary |
Session must stay active before createOrder. After a completed payment, call restartSession() before creating another order.
Step-by-step walkthrough: Example.
Methods by topic
| Topic | Methods / helpers |
|---|---|
| Assets | getSupportedAssets, getCashAppAssetKey |
| Orders & checkout | createOrder, getActiveOrder, reset |
| Expiry | getActiveOrderExpiresAt, getCashAppOrderTimeLeft, isCashAppOrderExpired |
| Summary | getCompletedTransactionSummary |
| Events | onOrderCompleted, onOrderFailed, onOrderExpired |
| Errors | How failures surface and what to do |