package:para/para.dart provides the ParaOnRamp and ParaHeadlessOnRamp extensions on Para, ParaHeadlessOnRampCheckout (with the optional para_meld companion plugin), and an onRampEvents stream for hosted provider checkouts, headless iOS Coinbase Apple Pay orders, headless Brale ACH bank transfers, and routed headless card and iOS 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 buttons.getOnRampConfig returns feature flags, your default asset, and inline Apple Pay providers available for the current device, while getOnRampCatalog returns paginated asset implementations and provider limits.
ramp_catalog.dart
On Android devices, the SDK identifies the host OS automatically and excludes
OnRampProvider.cdp (Coinbase Apple Pay) from config.inlineApplePayProviders and catalog results, because Apple Pay is iOS-only.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 portal with launchOnRampPortal, and fetch the flat order state with getOnRampOrder.
- Buy (On-Ramp)
- Sell (Off-Ramp)
Create an
OnRampPurchaseType.buy order for a provider supporting isBuy, launch the hosted portal, and inspect the flat order state on return.hosted_buy.dart
appScheme is required when initializing Para.fromConfig; pass callbackUrlScheme to launchOnRampPortal (or FlutterWebAuthSession) to override it so launchOnRampPortal appends nativeCallbackUrl while preserving the #rampLaunchToken fragment. For off-ramps (OnRampPurchaseType.sell), call sendOffRampDeposit when portalResult.status == 'deposit_required' and updated.pendingDeposit is non-null.Coinbase Apple Pay (Headless, iOS Only)
Coinbase headless guest checkout renders an Apple Pay payment sheet inside an iOS WebView hosted on your verified merchant domain.Method Sequence
- Optionally call
checkCoinbaseOnrampLimitsandcreateCoinbaseOnrampLimitUpgradeto inspect guest checkout limits and openupgradeUrlin an external browser or WebView whenlimits.upgradeable == true. - Call
createCoinbaseOnrampOrderwithisQuote: truefor a quote, then withisQuote: false(ornull) to create the order and obtainpaymentLink.urlandpurchaseId. - Render
paymentLink.urlinside an in-app iOS WebView (webview_flutter). - Call
settleCoinbaseOnrampPurchase(purchaseId:, walletId:)after payment returns to confirm settlement.
coinbase_apple_pay.dart
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, and settleCoinbaseOnrampPurchase should only run after presentPaymentSheet confirms payment (onramp_api.polling_success or onramp_api.commit_success).Order States and Partner Events
- Order states: Orders track through
OnRampPurchaseStatusvaluesinitiated,finished,cancelled,failed, orunknown. Quote requests (isQuote: true) do not create an order record or emit partner events. - Partner events:
para.onRampEventsemitsParaOnRampEventType.launchedwhencreateCoinbaseOnrampOrdercreates a real order andParaOnRampEventType.completedwhensettleCoinbaseOnrampPurchaseconfirms settlement. Server webhooks emitonramp.completedandonramp.cancelled.
When
domain is omitted on iOS, Para selects the first allowlisted Apple Pay domain configured on your API key in the Developer Portal. On non-production keys, Apple Pay 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 a Flutter Plaid Link plugin (such asplaid_flutter) and Para’s Brale checkout methods. When platform is omitted on CreateBraleAchCheckoutParams, para fills it from the current host OS automatically.
Method Sequence
- Call
createBraleAchCheckoutwithwalletIdandamountUsd(plus optionalcustomerandassetImplementationId). - Inspect
checkout.nextAction:'launch_plaid': Launch Plaid Link withcheckout.plaidLinkToken, then calllinkBraleAchBank(checkoutId:, publicToken:).'confirm_deposit': Showcheckout.savedBank.
- Call
getBraleAchAuthorization(amountLabel:, bankLabel:)and present the returnedtextto the user. - Call
submitBraleAchDeposit(checkoutId:, authorizationTextVersion:)to authorize the debit and launch the order. - Poll or list status via
getBraleAchCheckout(checkoutId:)orlistBraleAchTransfers().
brale_ach.dart
Order States and Partner Events
- Checkout stages and
nextAction: Checkouts transition acrossstage'link_required'(nextAction:'launch_plaid'),'linked'(nextAction:'confirm_deposit'), and'submitted'(nextAction:'wait'). - Brale transfer and order states:
braleStatusreports'pending','compliance review','processing','complete','canceled','failed','refunding', or'refunded'. Transfers in'compliance review'keep the checkout (stage:'submitted',nextAction:'wait') and order (OnRampPurchaseStatus.initiated) open until settledfinishedor failedcancelled. - Partner events:
para.onRampEventsemitsParaOnRampEventType.launchedwhensubmitBraleAchDepositruns. ACH settlement takes 1 to 3 business days andParaOnRampEventType.completeddoes not fire on settlement; subscribe to the serveronramp.completedwebhook instead.
Headless Card, Apple Pay & Reusable KYC
UseParaHeadlessOnRampCheckout (package:para/para.dart) together with the optional para_meld companion plugin to render routed card and iOS Apple Pay checkouts natively without requiring apps that skip headless Meld to link MeldSDK or io.meld:meldsdk. Because para_meld is marked publish_to: none and declares para: { path: ../.. }, reference para_meld via path: or git url: + path: packages/para_meld and source para from the matching path: or git: ref (or add a dependency_overrides entry) so pub get does not hit a source mismatch. Headless card and Apple Pay orders are currently fulfilled through OnRampProvider.banxa; pass applePay: ParaMeldApplePayRequest(...) when presenting an iOS Apple Pay order. Pair getKycStatus(), createKycSession(), and shareKyc() (with KycShareProvider.banxa or KycShareProvider.transak) when checkout.step == HeadlessOnRampCheckoutStep.verificationRequired.
Google Pay is in the works for routed headless checkout. Talk to us if you need Google Pay support.
headless_checkout.dart
createHeadlessOnRampOrder does not emit ParaOnRampEventType.launched or ParaOnRampEventType.completed on para.onRampEvents. ParaHeadlessOnRampCheckout polls getOnRampOrder after submission, and server webhooks (onramp.completed and onramp.cancelled) remain authoritative.
Listen for SDK Events and Test Mode
Listen topara.onRampEvents to handle launch and settlement notifications from the Para bridge. Both ParaOnRampEventType.launched and ParaOnRampEventType.completed deliver an OnRampEventPayload matching the onramp.completed webhook shape.
ramp_events.dart
Test mode is controlled by your API key’s environment (Beta keys run 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.