---
title: "Quote a withdrawal"
method: GET
path: "/api/v1/transaction/quote"
tags: ["Transactions"]
---

# Quote a withdrawal

`GET /api/v1/transaction/quote`

## Request

- Base URL: `https://sandbox.api.afriex.com`
- URL: `https://sandbox.api.afriex.com/api/v1/transaction/quote`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/afriex/apis/afriex-business-api/docs/api/v1/transaction/quote/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns what a withdrawal would cost, priced by the same code that charges it, without creating anything. Type exactly one of `sourceAmount` (what you send) or `destinationAmount` (what the recipient receives); the other is derived from it. The side you type is returned as `anchor`.

`rate`, `fee` and the amounts mean exactly what they mean on the transaction a create returns, so a create with the same inputs charges the quoted amounts. A quote does not check limits or customer verification and does not need an idempotency key or reference; those apply when you create the transaction, so a quote can succeed where the create is refused. Quotes are not reserved: rates and promotions can change before you create.

Name the destination either with `destinationId` (a saved payment method) or with `destinationChannel` and `destinationCountry` (when the customer has no account to send to yet), not both. `destinationCountry` can be left out for `SWIFT` and `CRYPTO`. A quote priced from a channel alone comes back with `indicative: true`: the account is not known, so the payout route, and any fee that depends on it, may differ when you create. `customerId` is optional; without it the quote is priced for the business owner, so a fee or promotion that depends on the customer's country can differ when you create.

## Query parameters

- `customerId` string
- `destinationId` string
- `destinationChannel` 'BANK_ACCOUNT' | 'MOBILE_MONEY' | 'CARD' | 'CRYPTO' | 'VIRTUAL_BANK_ACCOUNT' | 'POOL_ACCOUNT' | 'ACH_BANK_ACCOUNT' | 'INTERAC' | 'PAYBILL_TILL' | 'RFP' | 'UPI' | 'VIRTUAL_CARD' | 'SWIFT' | 'WE_CHAT' | 'ALIPAY' | 'PAYMENT_LINQ' | 'ADMIN' | 'WALLET'
- `destinationCountry` string
- `sourceCurrency` string, required
- `destinationCurrency` string, required
- `sourceAmount` string
- `destinationAmount` string

## Response `200`

The quote.

- object
  - `data` object
    - `anchor` 'source' | 'destination', required: The side that is exact; the other side is derived from it.
    - `sourceAmount` string: What is debited, before any fee.
    - `sourceCurrency` string, required
    - `destinationAmount` string: What the recipient receives.
    - `destinationCurrency` string, required
    - `indicative` boolean: Present and `true` when the quote was priced from `destinationChannel` alone, so the payout route and any fee that depends on it may differ at create.
    - `rate` string: `1 sourceCurrency = rate destinationCurrency`, the published rate after any promotion.
    - `fee` string: The fee, in `sourceCurrency`. Omitted when no fee applies.

## Other responses

- `400`: The quote cannot be priced: `destinationChannel` was sent without `destinationCountry` (not needed for `SWIFT` and `CRYPTO`), an amount is not a positive number, or your business is not yet allowed to use the API (for example the request IP is not on your whitelist, or the business is not approved, is deactivated, or needs verification).
- `401`: Unauthorized.
- `404`: The customer or the destination payment method was not found for your business.
- `422`: The request failed schema validation: both amounts, or neither, were sent, both `destinationId` and `destinationChannel` (or neither) were sent, `destinationCountry` was sent without `destinationChannel`, a currency, channel or country is not recognized, a required parameter is missing, or the destination country or channel is not currently available. `details.friendlyMessage` carries the specific error.
- `451`: The destination country or channel is blocked and cannot be used.
- `500`: Internal server error.
- `503`: Temporarily unavailable: an upstream service failed or timed out, or the API is momentarily offline. Retry with backoff and honour the Retry-After header when present.

---

[API](https://skmtc.dev/afriex/apis/afriex-business-api.md) - [All operations](https://skmtc.dev/afriex/apis/afriex-business-api/llms.txt) - [OpenAPI document](https://skmtc.dev/afriex/apis/afriex-business-api/revisions/d94198b6c256?raw)
