Sep06WithdrawRequest

data class Sep06WithdrawRequest(val assetCode: String, val type: String, val jwt: String, val fundingMethod: String? = null, val dest: String? = null, val destExtra: String? = null, val account: String? = null, val memo: String? = null, val memoType: String? = null, val amount: String? = null, val countryCode: String? = null, val refundMemo: String? = null, val refundMemoType: String? = null, val customerId: String? = null, val locationId: String? = null, val walletName: String? = null, val walletUrl: String? = null, val lang: String? = null, val onChangeCallback: String? = null, val extraFields: Map<String, String>? = null)

Request to initiate a programmatic withdrawal from a Stellar anchor.

A withdrawal occurs when a user sends a Stellar asset to an anchor's account, and the anchor delivers the equivalent amount in an off-chain asset (fiat to bank account, crypto to external blockchain, cash pickup, etc.).

Unlike SEP-24's interactive flow, SEP-6 withdrawals are fully programmatic - all required information must be provided in the API request.

Constructors

Link copied to clipboard
constructor(assetCode: String, type: String, jwt: String, fundingMethod: String? = null, dest: String? = null, destExtra: String? = null, account: String? = null, memo: String? = null, memoType: String? = null, amount: String? = null, countryCode: String? = null, refundMemo: String? = null, refundMemoType: String? = null, customerId: String? = null, locationId: String? = null, walletName: String? = null, walletUrl: String? = null, lang: String? = null, onChangeCallback: String? = null, extraFields: Map<String, String>? = null)

Properties

Link copied to clipboard

Stellar account (G...) or muxed account (M...) that will send the withdrawal. May differ from the account authenticated via SEP-10.

Link copied to clipboard

Amount the user intends to withdraw. May be necessary for KYC determination.

Link copied to clipboard

Code of the on-chain asset the user wants to withdraw. Must match a code in the /info response's withdraw object.

Link copied to clipboard

ISO 3166-1 alpha-3 code of the user's current address.

Link copied to clipboard

SEP-12 customer ID if already known to the anchor.

Link copied to clipboard
val dest: String?

Destination account for the withdrawal (crypto address, bank account number, IBAN, mobile number, or email address).

Link copied to clipboard

Additional destination information such as routing number, BIC, memo, or partner name handling the withdrawal.

Link copied to clipboard

Additional fields required by the anchor.

Link copied to clipboard

Method of delivering the withdrawal (replaces deprecated type).

Link copied to clipboard
val jwt: String

SEP-10 JWT token for authentication. Required for all withdrawal requests.

Link copied to clipboard
val lang: String?

Language code (RFC 4646) for error messages.

Link copied to clipboard

ID of the chosen location for cash pickup.

Link copied to clipboard
val memo: String?

Memo value for the Stellar transaction. Only needed if SEP-10 authentication is not used.

Link copied to clipboard

Deprecated: Type of memo ("text", "id", or "hash"). Memos for user identification should use type "id".

Link copied to clipboard

URL for transaction status update callbacks.

Link copied to clipboard

Memo the anchor must use when sending refund payments. If not specified, the anchor uses the same memo from the original payment.

Link copied to clipboard

Type of the refund memo: "id", "text", or "hash". Required if refundMemo is specified.

Link copied to clipboard

Type of withdrawal method: "crypto", "bank_account", "cash", "mobile", "bill_payment", or other custom values. Deprecated but still required for compatibility. Use fundingMethod for new implementations.

Link copied to clipboard

Deprecated: Use client_domain in SEP-10 JWT instead.

Link copied to clipboard

Deprecated: Use client_domain in SEP-10 JWT instead.