Skip to main content
Structure A view that runs one Crossmint offramp session.
The user adds a bank account, gets a quote, verifies their identity when the session needs it, and confirms one deposit that the payer signs and sends. The view then follows the payout. The Crossmint environment comes from the API key. Attach event handlers with onReady(_:), onStatusChange(_:), onComplete(_:), onCancel(_:), and onError(_:). The view takes the height of the page, unless fill is true. A change to the credentials, the appearance, the locale, fill, or to whether the payer has signMessage reloads the page. The payer and the handlers can change without a reload. Identity verification uses the camera. Add NSCameraUsageDescription to your app’s Info.plist.

Initializers

init(apiKey:credentials:payer:appearance:locale:fill:consoleLogLevel:)

Creates an offramp view.

Parameters

Instance Properties

Instance Methods

onCancel(_:)

Adds an action to perform when the user closes the flow. Without it, the Continue, Close, and Cancel buttons do nothing.

onComplete(_:)

Adds an action to perform when the deposit is confirmed. It can run again for a reopened withdrawal, so deduplicate by orderId.

onError(_:)

Adds an action to perform when something goes wrong. retriable shows if a new attempt can work.

onReady(_:)

Adds an action to perform when the first screen shows. It runs once per load.

onStatusChange(_:)

Adds an action to perform when the flow moves to another step.