Skip to content

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

  1. Create a client with a Swapped Connect sessionId (from your backend).
  2. Call loadSession() and confirm the session is active (Initiated).
  3. 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

StepWhat happensDocs
1. AssetsLoad destination tokens for the sessionAssets
2. Create orderUser amount → createOrderOrders & checkout
3. CheckoutShow Cash App URL / Lightning invoiceOrders & checkout
4. WaitCompletion, failure, or expiryExpiry, Events
5. DoneSummary; restartSession() for another paymentSummary

Session must stay active before createOrder. After a completed payment, call restartSession() before creating another order.

Step-by-step walkthrough: Example.

Methods by topic

TopicMethods / helpers
AssetsgetSupportedAssets, getCashAppAssetKey
Orders & checkoutcreateOrder, getActiveOrder, reset
ExpirygetActiveOrderExpiresAt, getCashAppOrderTimeLeft, isCashAppOrderExpired
SummarygetCompletedTransactionSummary
EventsonOrderCompleted, onOrderFailed, onOrderExpired
ErrorsHow failures surface and what to do