# Off-Ramp Flow

The off-ramp path handles the last mile of capital movement: getting value out of the protocol and into someone's bank account. This is the most complex ramp operation because it involves regulated outbound payment rails and requires full beneficiary information.

Your backend calls `createThirdPartyWithdrawalRequest` with the participant code, currency, amount, and a complete `thirdPartyBankInfo` object that includes the recipient's name, bank account number, SWIFT/BIC code, and bank name. You also supply a `paymentDetail` describing the purpose, a `relationshipWithPayee` field, and a `purposeOfTransaction` for compliance.

Two fields deserve special attention. The `idempotencyKey` must be unique for every request. Use something like `crypto.randomUUID()` to generate it. This prevents duplicate withdrawals if a network retry or timeout causes your system to re-send the same call. The `clientReference` is your own internal identifier for the withdrawal. Use it for reconciliation on your side, matching MCE settlement confirmations back to the original request.

The `transactionChargeType` determines how fees are applied to the transfer. The `amountReceived` field represents the net amount the recipient should receive after fees. Make sure your UI clearly communicates to the user what they are sending versus what the beneficiary will receive, especially if fees are deducted from the transfer amount.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://city-protocol.gitbook.io/docs/neofinance-as-a-service/on-off-ramp-module/off-ramp-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
