withdraw
Initiates an interactive withdrawal flow.
Returns a URL to display in a webview where the user can complete the withdrawal process. After the user sends funds to the anchor's Stellar account, the anchor will deliver the withdrawn assets through the specified off-chain channel.
Return
Sep24InteractiveResponse with URL to display and transaction ID
Parameters
request
Withdrawal request parameters
Throws
If JWT is invalid or expired
On validation error
On anchor server error
Example:
val response = sep24.withdraw(Sep24WithdrawRequest(
assetCode = "USDC",
jwt = jwtToken,
account = keyPair.getAccountId(),
amount = "100"
))
println("Transaction ID: ${response.id}")
println("Interactive URL: ${response.url}")
// Display response.url in a webviewContent copied to clipboard