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

# Marketplace

> Configure marketplace fees and route payouts with creditedRecipient

Marketplace mode lets your organization collect fees on payments routed through
Meridian while sending the remaining payout to a separate recipient wallet.

<img src="https://mintcdn.com/meridian-11ea0994/bFpKoggNrqHdqzi-/images/marketplace-settings.png?fit=max&auto=format&n=bFpKoggNrqHdqzi-&q=85&s=bacd0276beed7b310077746dbb035ad9" alt="Command Centre settings page showing Marketplace toggle, Marketplace Fee input, and Save Changes button" style={{ width: "100%", borderRadius: "0.5rem" }} width="880" height="801" data-path="images/marketplace-settings.png" />

## Enable marketplace mode

<Steps>
  <Step title="Open Settings">
    Sign in to Meridian Command Centre and open **Settings** under **Financial
    Services**.
  </Step>

  <Step title="Turn on Marketplace">Toggle **Marketplace** on.</Step>

  <Step title="Set your fee">
    Enter your fee in basis points. Example: `500` bps = `5%`.
  </Step>

  <Step title="Save changes">
    Click **Save Changes** to apply the setting to your organization.
  </Step>
</Steps>

<Note>
  Older internal messages may call this "Platform" mode. In Command Centre the
  setting is labeled **Marketplace**.
</Note>

## Update your x402 payment requirements

Keep `payTo` pointed at the Meridian facilitator address for the target network.
Use `extra.creditedRecipient` to tell Meridian which wallet should receive the
net payout.

Below is a `paymentRequirements` example for the recommended Permit2-based
flow on a chain without native EIP-3009 support. The example uses MegaETH; use
the same pattern on BSC and BOT chain with that network's token and chain id.

```ts theme={"system"}
const paymentRequirements = {
  amount: value.toString(),
  recipient: address,
  network: "megaeth",
  scheme: "exact",
  maxAmountRequired: value.toString(),
  resource: `${FACILITATOR_URL}/v1/samples`,
  description: `Payment for ${formatUnits(value, TOKEN_DECIMALS)} ${TOKEN_SYMBOL}`,
  mimeType: "application/json",
  payTo: MEGAETH_FACILITATOR_ADDRESS,
  asset: MEGAETH_TOKEN_ADDRESS,
  extra: {
    creditedRecipient: recipientAddress,
    name: TOKEN_SYMBOL,
    version: "1",
    destinationChainId: MEGAETH_CHAIN_ID,
  },
};
```

<Note>
  On chains without EIP-3009 support, use the ERC-20 token address in `asset`,
  approve Permit2 `0x000000000022D473030F116dDEE9F6B43aC78BA3`, and sign with
  `x402ExactPermit2Proxy` `0x402085c248EeA27D92E8b30b2C58ed07f9E20001`. See
  [Payment Types](/api-reference/payment-types/overview).
</Note>

## How payouts work

* `payTo` remains the Meridian facilitator, not the seller wallet.
* On Permit2 networks such as MegaETH, BSC, and BOT chain, `asset` should be the ERC-20 token address for the current Permit2 flow.
* On Permit2 networks, `extra.name` and `extra.version` should describe the token used in the Permit2 flow.
* `extra.creditedRecipient` receives the payment amount remaining after fees.
* Your marketplace fee accrues inside the facilitator contract as a platform
  balance for your organization.
* Fees do **not** automatically land in your wallet. Withdraw them from the
  Settings page using **Withdraw Marketplace Fees**, or withdraw them directly
  on-chain from the proxy contract.

If your marketplace fee is `500` bps, Meridian records `5%` of each payment as
marketplace fees. In the simple case where no other fee applies, the remaining
`95%` is settled to `creditedRecipient`.

<Tip>
  Marketplace fees are tracked on-chain inside the facilitator and can later be
  withdrawn to your connected wallet from Command Centre.
</Tip>

## Withdraw marketplace fees on-chain

You can also withdraw accumulated marketplace fees directly from the Meridian
proxy contract by calling:

```solidity theme={"system"}
withdrawPlatformFees(address token)
```

Call this function on the network's Meridian proxy/facilitator address from the
same wallet address that is configured as the marketplace platform address. The
platform address is inferred from `msg.sender`, so it is **not** passed as a
function argument.

```ts theme={"system"}
await facilitator.write.withdrawPlatformFees([tokenAddress]);
```

Use the token address for the asset in which fees accrued on that network, for example USDC on BSC or USDm on MegaETH.

## Related guides

* [Smart Contracts](/payments/smart-contracts)
* [Balances](/command-centre/balances)
