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

# Quotes and transfers

> Choose an exact amount, execute one quote safely, and follow the current transfer state.

A quote is time-bound and single-use. Execute it once, and do not reuse it as a transfer template. A transfer is the execution of that quote and continues changing after creation.

## Check resource compatibility

Before quoting, confirm that:

* The capability is ready, belongs to the customer, and matches the intended direction and method.
* A stablecoin source is an active issued wallet that supports the input currency.
* Wallet-to-wallet resources use the same currency and network.
* A fiat payout account or destination is ready and supports the output currency and method.

## Choose the exact amount

Create a quote with [`POST /v3/quotes`](/api-reference/money-movement/post-v3-quotes). Send one amount side, both currencies, and response-derived resource IDs with these headers:

```http theme={null}
X-API-Key: ${SWIPELUX_API_KEY}
Idempotency-Key: quote-create-001
Content-Type: application/json
```

<Tabs>
  <Tab title="Exact in">
    Set `in.amount` and omit `out.amount`. The response calculates what the destination receives.

    ```json theme={null}
    {
      "customerId": "${CUSTOMER_ID}",
      "capabilityId": "${STABLECOIN_CAPABILITY_ID}",
      "in": {
        "amount": "1.234567",
        "currency": "USDC",
        "accountId": "${SOURCE_WALLET_ID}"
      },
      "destinationId": "${WALLET_DESTINATION_ID}",
      "out": {
        "currency": "USDC"
      }
    }
    ```
  </Tab>

  <Tab title="Exact out">
    Set `out.amount` and omit `in.amount`. The response calculates what must leave the source.

    ```json theme={null}
    {
      "customerId": "${CUSTOMER_ID}",
      "capabilityId": "${CAPABILITY_ID}",
      "in": {
        "currency": "USDC",
        "accountId": "${SOURCE_WALLET_ID}"
      },
      "destinationId": "${RECIPIENT_DESTINATION_ID}",
      "out": {
        "amount": "100.00",
        "currency": "USD"
      }
    }
    ```
  </Tab>
</Tabs>

Store the quote `data.id`, `data.status`, `data.expiresAt`, returned legs, rate, and fees. Use the returned decimal strings; do not recalculate executable amounts with floating-point arithmetic.

After a stablecoin-funded exact-out quote, read [`GET /v3/customers/{customerId}/accounts/{accountId}`](/api-reference/accounts/get-v3-customers-by-customer-id-accounts-by-account-id). Compare the current source `balances[].available` for the input currency with the returned `data.in.amount`. If funds are insufficient, change or fund the source and create a new quote. Fiat-funded exact-out quotes do not use this source-wallet balance gate.

## Execute once and recover safely

Read the current quote with [`GET /v3/quotes/{quoteId}`](/api-reference/money-movement/get-v3-quotes-by-quote-id). Execute only while its status and `expiresAt` permit it.

Create the transfer with [`POST /v3/transfers`](/api-reference/money-movement/post-v3-transfers):

```http theme={null}
X-API-Key: ${SWIPELUX_API_KEY}
Idempotency-Key: transfer-create-001
Content-Type: application/json
```

```json theme={null}
{
  "quoteId": "${QUOTE_ID}"
}
```

Generate one new `Idempotency-Key` for this intended transfer and persist it before sending the request. If the response is lost, retry the identical method, path, body, and key. Do not create a second execution key to recover an uncertain result.

If the API returns `quote_already_executed`, use its `transferId` to continue with the existing transfer. An idempotent replay can also return `Idempotency-Replayed: true`.

## Follow the current transfer

Read [`GET /v3/transfers/{transferId}`](/api-reference/money-movement/get-v3-transfers-by-transfer-id) after creation and after each webhook. Store the latest `data.state`, `data.stateDetail`, and `data.openTaskIds`.

When task IDs are open, fetch [`GET /v3/transfers/{transferId}/tasks`](/api-reference/money-movement/get-v3-transfers-by-transfer-id-tasks) and complete each task using its current revision and requirements.

For an inbound movement, [`GET /v3/transfers/{transferId}/instructions`](/api-reference/money-movement/get-v3-transfers-by-transfer-id-instructions) can return transfer-specific funding details. Render only the returned instruction variant and exact reference.

Next, implement [Webhooks](/integration/webhooks) so every asynchronous transfer update enters the same current-state handling path.


## Related topics

- [Create transfer (executes a quote)](/api-reference/money-movement/post-v3-transfers.md)
- [Get quote](/api-reference/money-movement/get-v3-quotes-by-quote-id.md)
- [Create quote](/api-reference/money-movement/post-v3-quotes.md)
- [List transfers](/api-reference/money-movement/get-v3-transfers.md)
- [Get transfer instructions](/api-reference/money-movement/get-v3-transfers-by-transfer-id-instructions.md)
