> This page is for version FRAML API (default).
> For other versions, use one of these documentation indexes:
> - FRAML API (default): https://docs.flagright.com/framl-api/llms.txt
> - Management API: https://docs.flagright.com/management-api/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.flagright.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.flagright.com/_mcp/server.

Let's take an example of a generic crypto wallet and payment provider to see how the Flagright API can be used as the compliance and anti-fincrime infrastructure for the fiat transactions. Flagright also enables crypto businesses to centralize their on-chain alerts onto Flagright case management through the [Management API](https://docs.flagright.com/management-api/api-reference/api-reference/post-alerts).

## 1. On Ramp

An on-ramp or deposit is when a `User` transfers money from an external fiat source (e.g., bank, credit card) to their crypto wallet.

For deposits, the origin payment method is the external source, for example, a `CARD` transfer, and the destination payment method is the wallet type. In this case, the `originUserId` would be empty and the `destinationUserId` would be the `userId` of the user. The `originAmountDetails` would have the fiat currency and the `destinationAmountDetails` would have the cryptocurrency.

`originPaymentMethod` would contain information on the `CARD` transaction and the `destinationPaymentMethod` would contain the payload for the crypto wallet details of the user where the money is being deposited.

> **Info**
>
> To make the following request, you'll need an API Key. Please [reach out](mailto:support@flagright.com) if you don't have one.

You would make an API call to the `POST /transactions` to verify this transaction before processing, with the payload like so:

#### POST /transactions

```bash
    curl --request POST \
    --url https://sandbox.api.flagright.com/transactions \
    --header 'Content-Type: application/json' \
    --data '{
    "transactionId": "7b80a539eea6e78acbd6d458e5971482",
    "type": "DEPOSIT",
    "destinationUserId": "9350a2611e0771cba03310f74bf6",
    "originAmountDetails": {
        "country": "NL",
        "transactionAmount": 800,
        "transactionCurrency": "EUR"
    },
    "destinationAmountDetails": {
        "country": "DE",
        "transactionAmount": 0.34,
        "transactionCurrency": "ETH"
    },
    "timestamp": 1641654664,
    "originPaymentDetails": {
        "method": "CARD",
        "swiftCode": "AAAABB11CC",
        "cardFingerprint": "3ef913ae22cfae303aeefbcc2e22cfae303a1",
        "cardBrand": "VISA",
        "3dsDone": true,
        "cardAuthenticated": true
    },
    "destinationPaymentDetails": {
        "method": "WALLET",
        "walletId": "20ac00fed8ef913aefb17cfae1097cce"
    }
    }'
```

## 2. Off Ramp

An off-ramp or withdrawal is when a `User` transfers money from the crypto wallet to an external fiat source.

For withdrawals, the destination payment method is the external fiat source, for example, a SWIFT transfer, and the origin payment method is the wallet type. In this case, the `originUserId` would be the userId of the user and the `destinationUserId` would be empty. The `originAmountDetails` would have the cryptocurrency and the `destinationAmountDetails` would have the fiat currency.

`originPaymentMethod` would contain information on the crypto wallet and the `destinationPaymentMethod` would contain the payload for the SWIFT details of the user where the money is being withdrawn.

> **Info**
>
> To make the following request, you'll need an API Key. Please [reach out](mailto:support@flagright.com) if you don't have one.

You would make an API call to the `POST /transactions` to verify this transaction before processing, with the payload like:

#### POST /transactions

```bash
    curl --request POST \
    --url https://sandbox.api.flagright.com/transactions \
    --header 'Content-Type: application/json' \
    --data '{
    "transactionId": "7b80a539eea6e78acbd6d458e5971482",
    "type": "DEPOSIT",
    "originUserId": "9350a2611e0771cba03310f74bf6",
    "originAmountDetails": {
        "country": "DE",
        "transactionAmount": 800,
        "transactionCurrency": "EUR"
    },
    "destinationAmountDetails": {
        "country": "DE",
        "transactionAmount": 0.34,
        "transactionCurrency": "ETH"
    },
    "timestamp": 1641654664,
    "originPaymentDetails": {
        "method": "WALLET",
        "walletId": "20ac00fed8ef913aefb17cfae1097cce"
    },
    "destinationPaymentDetails": {
        "method": "SWIFT",
        "swiftCode": "AAAABB11CC",
        "accountNumber": "32213423221",
        "accountType": "SAVINGS"
    }
    }'
```

## 3. Crypto to Crypto Transfer

For peer-to-peer transfer, the destination payment method and the origin payment method are of wallet type. In this case, the `originUserId` would be the userId of the user making the payment and the `destinationUserId` would be the userId of the user receiving the payment.

`originPaymentMethod` would contain information on the wallet and the `destinationPaymentMethod` would contain the payload for the wallet details of the user where the money is being transferred.

You would make an API call to the `POST /transactions` to verify this transaction before processing, with the payload like:

#### POST /transactions

```bash
    curl --request POST \
    --url https://sandbox.api.flagright.com/transactions \
    --header 'Content-Type: application/json' \
    --data '{
    "transactionId": "7b80a539eea6e78acbd6d458e5971482",
    "type": "DEPOSIT",
    "originUserId": "9350a2611e0771cba03310f74bf6",
    "destinationPaymentMethod": "ac00fed8ef913aefb17cfae1097cce07a0",
    "originAmountDetails": {
        "country": "DE",
        "transactionAmount": 22,
        "transactionCurrency": "BTC"
    },
    "destinationAmountDetails": {
        "country": "NL",
        "transactionAmount": 417.34,
        "transactionCurrency": "ETH"
    },
    "timestamp": 1641654664,
    "originPaymentDetails": {
        "method": "WALLET",
        "walletId": "2704ebec3fab4402a4cbbf7190ff31fa"
    },
    "destinationPaymentDetails": {
        "method": "WALLET",
        "walletId": "ac00fed8ef913aefb17cfae1097cce"
    }
    }'
```