Skip to main content
Your iOS app can offer fiat on-ramps and off-ramps directly inside your own SwiftUI or UIKit experience. ParaSwift exposes methods on ParaManager, ParaHeadlessOnRampCheckout (with the optional ParaSwiftMeld module), and an onRampEvents AsyncStream for hosted provider checkouts, headless Coinbase Apple Pay orders, headless Brale ACH bank transfers, and routed headless card and Apple Pay checkouts.
Providers, enabled networks, allowed assets, Apple Pay domains, and Brale Plaid mobile OAuth settings are configured per API key in the Developer Portal. Set those up first in Set Up Fiat Onramps.

Discover Providers and Assets

Read your key’s configuration and catalog items before rendering buy or sell options. getOnRampConfig returns feature flags, your default asset, and inline Apple Pay providers enabled for your key, while getOnRampCatalog returns paginated asset implementations and provider limits.
RampCatalog.swift

Hosted Checkout (Buy and Off-Ramp)

Hosted checkout supports card and bank orders across Stripe, MoonPay, Ramp Network, Coinbase (Widget), Transak, and Banxa, as well as off-ramp sales (SELL) for supported providers. Create an order with createHostedOnRampOrder, launch the returned portal URL with launchOnRampPortal (backed by ASWebAuthenticationSession), and inspect the flat order state with getOnRampOrder.
Create a .buy order for a provider supporting isBuy, launch the hosted portal, and inspect the flat order when control returns to your app.
HostedBuy.swift
Initialize ParaManager(environment:apiKey:appScheme:) with your registered custom URL scheme (or rely on the bundle identifier fallback) so launchOnRampPortal can return to your app automatically. When running an off-ramp (type: .sell), broadcast the seller’s deposit via sendOffRampDeposit whenever callback.rawStatus == "deposit_required" and orderResult.pendingDeposit is present.

Coinbase Apple Pay (Headless, iOS)

Coinbase headless guest checkout displays a native Apple Pay payment page inside a WKWebView hosted on your verified merchant domain.
Headless Coinbase Apple Pay requires at least one allowlisted domain configured in both Coinbase Developer Platform and the Developer Portal (see Coinbase setup), plus a verified U.S. phone number and email on the user’s account.

Method Sequence

  1. Optionally call checkCoinbaseOnrampLimits(_:) and createCoinbaseOnrampLimitUpgrade(_:) to check guest checkout limits and open upgradeUrl in a browser or WKWebView when limits.upgradeable == true and remaining capacity is below the order amount.
  2. Call createCoinbaseOnrampOrder(_:) with isQuote: true to fetch a quote, then with isQuote: false (or nil) to create the order and receive paymentLink.url and purchaseId.
  3. Load paymentLink.url in a WKWebView so the user can authorize Apple Pay, parsing WebView events with ParaManager.parseCoinbaseApplePayEvent(_:origin:allowedOrigins:).
  4. Call settleCoinbaseOnrampPurchase(purchaseId:walletId:) after payment completes (onramp_api.polling_success or onramp_api.commit_success) or on dismissal to confirm settlement (server-side settlement is idempotent and queries Coinbase directly).
CoinbaseApplePay.swift
userPhoneNumber and userEmail are placeholders for the buyer’s verified contact details. In production, the server validates both against the user’s verified Para records. Listen for onramp_api.polling_success or onramp_api.commit_success with ParaManager.parseCoinbaseApplePayEvent(_:origin:allowedOrigins:) and call settleCoinbaseOnrampPurchase after payment completes (server-side settlement is idempotent and queries Coinbase directly, so calling on dismissal is also safe).

Order States and Partner Events

  • Order states: Real orders track through ParaOnRampPurchaseStatus cases .initiated, .finished, .cancelled, .failed, or .unknown(String). Quotes (isQuote: true) do not persist an order row.
  • Partner events: paraManager.onRampEvents yields .launched(ParaOnRampEventPayload) when createCoinbaseOnrampOrder creates a real order and .completed(ParaOnRampEventPayload) when settleCoinbaseOnrampPurchase confirms .finished. Server webhooks emit onramp.completed and onramp.cancelled.
When domain is omitted on iOS, Para uses the first allowlisted Apple Pay domain configured on your API key in the Developer Portal. On non-production API keys, orders run in Coinbase sandbox mode (?useApplePaySandbox=true) and simulate immediate settlement.

Brale ACH (Pay by Bank, Headless)

Brale ACH lets U.S. users fund an EVM or Solana wallet from a bank account using Plaid Link iOS (LinkKit) and ParaManager’s Brale checkout methods. createBraleAchCheckout(_:) sets platform to "ios" automatically when you leave it nil.
Production Brale ACH requires the Growth plan or higher, ACH enabled in the Developer Portal, and a biometric-authenticated user (guest and external-wallet-only logins are unsupported). For banks that require OAuth redirects in Plaid Link, enter your iOS Plaid OAuth redirect URI (https://... Universal Link) in the ACH section of the Developer Portal (saving notifies Para for Brale allowlisting), or pass redirectUri on ParaCreateBraleAchCheckoutParams to override it; until allowlisted by Brale, Para leaves it out of the Plaid link token.

Method Sequence

  1. Call createBraleAchCheckout(_:) with walletId and amountUsd (plus optional customer: ParaBraleAchCustomer(legalName:) and assetImplementationId).
  2. Inspect checkout.nextAction:
    • "launch_plaid": Open Plaid Link iOS using checkout.plaidLinkToken, then call linkBraleAchBank(checkoutId:publicToken:).
    • "confirm_deposit": Show checkout.savedBank.
  3. Call getBraleAchAuthorization(amountLabel:bankLabel:) and display the returned text to the user before requesting consent.
  4. Call submitBraleAchDeposit(checkoutId:authorizationTextVersion:) to authorize the debit and launch the order.
  5. Check progress with getBraleAchCheckout(checkoutId:) or listBraleAchTransfers().
BraleAchFlow.swift

Order States and Partner Events

  • Checkout stages and nextAction: A checkout transitions across stage "link_required" (nextAction: "launch_plaid"), "linked" (nextAction: "confirm_deposit"), and "submitted" (nextAction: "wait").
  • Brale transfer and order states: braleStatus reports "pending", "compliance review", "processing", "complete", "canceled", "failed", "refunding", or "refunded". Transfers in "compliance review" keep the checkout (stage: "submitted", nextAction: "wait") and order (.initiated) open until settled .finished or failed .cancelled.
  • Partner events: paraManager.onRampEvents yields .launched(ParaOnRampEventPayload) when submitBraleAchDeposit runs. ACH settlement takes 1 to 3 business days and .completed does not emit over the bridge stream; listen for onramp.completed on your backend instead.
Subscribe to both onramp.completed and onramp.cancelled webhooks for Brale ACH. If a bank returns an ACH debit after initial delivery, Brale reverses the transfer and Para emits onramp.cancelled after onramp.completed.

Headless Card, Apple Pay & Reusable KYC

Use ParaHeadlessOnRampCheckout (ObservableObject) with the optional ParaSwiftMeld Swift Package library product (ParaHeadlessOnRampPaymentView, linked in Xcode alongside ParaSwift when needed) to run routed headless card and Apple Pay checkouts in SwiftUI. Keeping ParaSwiftMeld separate ensures apps that only use hosted or Brale/Coinbase flows do not link Meld’s native payment dependencies. Headless card and Apple Pay orders are currently fulfilled through .banxa; pass applePay: ParaHeadlessOnRampApplePayRequest(...) when presenting an .applePay order. Pair getKycStatus(), createKycSession(), and shareKyc(_:) (for .banxa or .transak) when checkout.step == .verificationRequired.
HeadlessCheckoutView.swift
Unlike hosted, Coinbase Apple Pay, and Brale ACH flows, createHeadlessOnRampOrder does not emit .launched or .completed on paraManager.onRampEvents. ParaHeadlessOnRampCheckout polls getOnRampOrder after submission, and server webhooks (onramp.completed and onramp.cancelled) remain authoritative.

Listen for SDK Events and Test Mode

Consume paraManager.onRampEvents in a background Task to react to lifecycle transitions emitted by the SDK. Both .launched and .completed deliver a ParaOnRampEventPayload aligned with the onramp.completed webhook payload.
RampEvents.swift
Test mode is controlled by your API key’s environment (Beta runs in test mode; production rejects testMode: true). In test mode, Brale ACH orders deliver SBC on Sepolia, Base Sepolia, Avalanche Fuji, or Solana Devnet (Optimism has no ACH test network), and Coinbase Apple Pay orders simulate settlement immediately.