> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getpara.com/llms.txt
> Use this file to discover all available pages before exploring further.

# createHostedOnRampOrder

> Creates a hosted on-ramp or off-ramp order and returns a launch-scoped portal URL

async

Creates a hosted on-ramp or off-ramp order with a scoped launch token and optional native callback URL, and emits ONRAMP\_LAUNCHED.

Copy method signature

### Returns

[`{ onRampPurchase: OnRampPurchase; portalUrl: string }`](https://docs.getpara.com/v3/references/types/onramppurchase)

The created order record and hosted Para Portal checkout URL.

## Usage

Create a hosted on-ramp or off-ramp order for a catalog asset, then open `portalUrl` in a browser session or WebView.

```typescript theme={null}
import { OnRampProvider, OnRampPurchaseType } from "@getpara/web-sdk";

const { onRampPurchase, portalUrl } = await para.createHostedOnRampOrder({
  walletId: wallet.id,
  nativeCallbackUrl: "yourapp://onramp",
  params: {
    provider: OnRampProvider.MOONPAY,
    type: OnRampPurchaseType.BUY,
    assetImplementationId: item.assetImplementationId,
    fiatQuantity: "25",
  },
});
```

```typescript Signature theme={null}
createHostedOnRampOrder(
  params: WalletParams & {
    params: OnRampPurchaseCreateParams;
    nativeCallbackUrl?: string;
  }
): Promise<{ onRampPurchase: OnRampPurchase; portalUrl: string }>
```

Emits `ONRAMP_LAUNCHED` immediately when the order is created.

> [!NOTE]
>
> `portalUrl` embeds a single-order launch token in its URL fragment (`#rampLaunchToken=...`). Pass `nativeCallbackUrl` on mobile so the hosted portal redirects back to your app with `status` and `purchaseId` query parameters.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.