---
updatedAt: 2026-09-17T16:31:23.000Z
agentTools:
  projectIndex: https://docs.dlocal.com/llms.txt
---

# Create a quote

This endpoint generates an FX rate for a particular currency pair.

---

When this service is called, it returns a `quote_id`, which uniquely identifies the quoted foreign exchange (FX) rate, including any applicable fees and taxes. This `quote_id` can be used in subsequent requests to create Payouts, as long as it remains within the quote's validity period.

There are three possible ways to create a quote ID configuration:

- Request with no amount specified
- Request specifying the source amount
- Request specifying the destination amount

<br />

> **Configuration required**: to use the Quote API, please contact your Technical Account Manager or email us at [integrations@dlocal.com](mailto:integrations@dlocal.com) to request setup.

## ⚠️ IMPORTANT: Quote-to-Payout Currency Contract

**The amount type you specify when creating the quote determines which currency and amount you MUST use in the subsequent payout request.**

### Rules:

1. **Quote created with&#x20;**`source_amount`**:**

- Payout **MUST** use: `currency = source_currency` and `amount = source_amount`
- Example: Quote with `source_amount=100, source_currency=USD` → Payout with `currency=USD, amount=100`

2. **Quote created with&#x20;**`destination_amount`**:**

- Payout **MUST** use: `currency = destination_currency` and `amount = destination_amount`
- Example: Quote with `destination_amount=392.72, destination_currency=MYR` → Payout with `currency=MYR, amount=392.72`

3. **Quote created with no amount:**

- Payout can use either `source_currency` or `destination_currency`
- The exchange rate will be applied accordingly

### Common Error:

❌ **Error Code 109**: `QUOTE_ID_AND_PAYOUT_TARGET_CURRENCY_MISMATCH`

This error occurs when:

- You create a quote with `source_amount` but send the payout with `destination_currency`
- You create a quote with `destination_amount` but send the payout with `source_currency`

**Example of incorrect usage:**

```json
// Step 1: Create quote with source_amount
POST /payouts/v3/quote
{
"country": "MY",
"source_currency": "USD",
"destination_currency": "MYR",
"source_amount": 100
}
```

```json
// Response
{
"id": "cos9d7UH1J07FbJPh5HZ98gzebpHytFsTlfr",
"details": {
  "source_amount": 100,
  "source_currency": "USD",
  "destination_amount": 392.72,
  "destination_currency": "MYR"
}
}
```

```json
// Step 2: Create payout (INCORRECT - will fail with error 109)  
POST /payouts/v3
{
"quote_id": "cos9d7UH1J07FbJPh5HZ98gzebpHytFsTlfr",
"currency": "MYR",      // ❌ WRONG - should be USD
"amount": 392.72        // ❌ WRONG - should be 100
}
```

**Correct usage:**

```json
// Step 2: Create payout (CORRECT)
POST /payouts/v3
{
"quote_id": "cos9d7UH1J07FbJPh5HZ98gzebpHytFsTlfr",
"currency": "USD",      // ✅ Matches source_currency
"amount": 100           // ✅ Matches source_amount
}


```


This endpoint generates an FX rate for a particular currency pair.

When this service is called, it returns a `quote_id`, which uniquely identifies the quoted foreign exchange (FX) rate, including any applicable fees and taxes. This `quote_id` can be used in subsequent requests to create Payouts, as long as it remains within the quote's validity period.

There are three possible ways to create a quote ID configuration:

* Request with no amount specified
* Request specifying the source amount
* Request specifying the destination amount

<br />

> **Configuration required**: to use the Quote API, please contact your Technical Account Manager or email us at <integrations@dlocal.com> to request setup.

## ⚠️ IMPORTANT: Quote-to-Payout Currency Contract

**The amount type you specify when creating the quote determines which currency and amount you MUST use in the subsequent payout request.**

### Rules:

1. **Quote created with&#x20;**`source_amount`**:**

* Payout **MUST** use: `currency = source_currency` and `amount = source_amount`
* Example: Quote with `source_amount=100, source_currency=USD` → Payout with `currency=USD, amount=100`

2. **Quote created with&#x20;**`destination_amount`**:**

* Payout **MUST** use: `currency = destination_currency` and `amount = destination_amount`
* Example: Quote with `destination_amount=392.72, destination_currency=MYR` → Payout with `currency=MYR, amount=392.72`

3. **Quote created with no amount:**

* Payout can use either `source_currency` or `destination_currency`
* The exchange rate will be applied accordingly

### Common Error:

❌ **Error Code 109**: `QUOTE_ID_AND_PAYOUT_TARGET_CURRENCY_MISMATCH`

This error occurs when:

* You create a quote with `source_amount` but send the payout with `destination_currency`
* You create a quote with `destination_amount` but send the payout with `source_currency`

**Example of incorrect usage:**

```json
// Step 1: Create quote with source_amount
POST /payouts/v3/quote
{
 "country": "MY",
 "source_currency": "USD",
 "destination_currency": "MYR",
 "source_amount": 100
}
```

```json
// Response
{
 "id": "cos9d7UH1J07FbJPh5HZ98gzebpHytFsTlfr",
 "details": {
  "source_amount": 100,
  "source_currency": "USD",
  "destination_amount": 392.72,
  "destination_currency": "MYR"
 }
}
```

```json
// Step 2: Create payout (INCORRECT - will fail with error 109)  
POST /payouts/v3
{
 "quote_id": "cos9d7UH1J07FbJPh5HZ98gzebpHytFsTlfr",
 "currency": "MYR",      // ❌ WRONG - should be USD
 "amount": 392.72        // ❌ WRONG - should be 100
}
```

**Correct usage:**

```json
// Step 2: Create payout (CORRECT)
POST /payouts/v3
{
 "quote_id": "cos9d7UH1J07FbJPh5HZ98gzebpHytFsTlfr",
 "currency": "USD",      // ✅ Matches source_currency
 "amount": 100           // ✅ Matches source_amount
}

 
```

# OpenAPI definition

````json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Payouts V3",
    "version": "3.0.1",
    "description": "dLocal Payouts API v3."
  },
  "servers": [
    {
      "url": "https://api.dlocal.com",
      "description": "Production base URL"
    },
    {
      "url": "https://sandbox.dlocal.com",
      "description": "Sandbox base URL"
    }
  ],
  "security": [
    {
      "X-Date": [],
      "X-Version": [],
      "Authorization": []
    }
  ],
  "x-explorer-enabled": false,
  "x-proxy-enabled": false,
  "x-samples-languages": [
    "curl"
  ],
  "tags": [
    {
      "name": "Currency exchange",
      "description": "Retrieve information about currency exchange rates and supported currencies."
    }
  ],
  "paths": {
    "/payouts/v3/quote": {
      "post": {
        "tags": [
          "Currency exchange"
        ],
        "summary": "Create a quote",
        "description": "This endpoint generates an FX rate for a particular currency pair.\n\n---\n\nWhen this service is called, it returns a `quote_id`, which uniquely identifies the quoted foreign exchange (FX) rate, including any applicable fees and taxes. This `quote_id` can be used in subsequent requests to create Payouts, as long as it remains within the quote's validity period.\n\nThere are three possible ways to create a quote ID configuration:\n\n- Request with no amount specified\n- Request specifying the source amount\n- Request specifying the destination amount\n\n<br />\n\n> **Configuration required**: to use the Quote API, please contact your Technical Account Manager or email us at [integrations@dlocal.com](mailto:integrations@dlocal.com) to request setup.\n\n## ⚠️ IMPORTANT: Quote-to-Payout Currency Contract\n\n**The amount type you specify when creating the quote determines which currency and amount you MUST use in the subsequent payout request.**\n\n### Rules:\n\n1. **Quote created with&#x20;**`source_amount`**:**\n\n- Payout **MUST** use: `currency = source_currency` and `amount = source_amount`\n- Example: Quote with `source_amount=100, source_currency=USD` → Payout with `currency=USD, amount=100`\n\n2. **Quote created with&#x20;**`destination_amount`**:**\n\n- Payout **MUST** use: `currency = destination_currency` and `amount = destination_amount`\n- Example: Quote with `destination_amount=392.72, destination_currency=MYR` → Payout with `currency=MYR, amount=392.72`\n\n3. **Quote created with no amount:**\n\n- Payout can use either `source_currency` or `destination_currency`\n- The exchange rate will be applied accordingly\n\n### Common Error:\n\n❌ **Error Code 109**: `QUOTE_ID_AND_PAYOUT_TARGET_CURRENCY_MISMATCH`\n\nThis error occurs when:\n\n- You create a quote with `source_amount` but send the payout with `destination_currency`\n- You create a quote with `destination_amount` but send the payout with `source_currency`\n\n**Example of incorrect usage:**\n\n```json\n// Step 1: Create quote with source_amount\nPOST /payouts/v3/quote\n{\n\"country\": \"MY\",\n\"source_currency\": \"USD\",\n\"destination_currency\": \"MYR\",\n\"source_amount\": 100\n}\n```\n\n```json\n// Response\n{\n\"id\": \"cos9d7UH1J07FbJPh5HZ98gzebpHytFsTlfr\",\n\"details\": {\n  \"source_amount\": 100,\n  \"source_currency\": \"USD\",\n  \"destination_amount\": 392.72,\n  \"destination_currency\": \"MYR\"\n}\n}\n```\n\n```json\n// Step 2: Create payout (INCORRECT - will fail with error 109)  \nPOST /payouts/v3\n{\n\"quote_id\": \"cos9d7UH1J07FbJPh5HZ98gzebpHytFsTlfr\",\n\"currency\": \"MYR\",      // ❌ WRONG - should be USD\n\"amount\": 392.72        // ❌ WRONG - should be 100\n}\n```\n\n**Correct usage:**\n\n```json\n// Step 2: Create payout (CORRECT)\nPOST /payouts/v3\n{\n\"quote_id\": \"cos9d7UH1J07FbJPh5HZ98gzebpHytFsTlfr\",\n\"currency\": \"USD\",      // ✅ Matches source_currency\n\"amount\": 100           // ✅ Matches source_amount\n}\n\n\n```\n",
        "operationId": "create-quote-payouts-v3",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateQuoteRequest"
              },
              "examples": {
                "Example": {
                  "value": "{\n  \"country\": \"CO\",\n  \"source_currency\": \"USD\",\n  \"destination_currency\": \"COP\",\n  \"source_amount\": 100\n}"
                }
              }
            }
          }
        },
        "x-readme": {
          "code-samples": [
            {
              "language": "shell",
              "name": "Create Quote",
              "code": "curl -X POST \\\n  -H 'X-Date: 2022-01-01T20:36:42.310Z' \\\n  -H 'X-Version: 3.0' \\\n  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.dozjgNryP4J3jVmNHl0w5N_XgL0n3I9PlFUP0THsR8U' \\\n  'https://api.dlocal.com/payouts/v3/quote' \\\n  -d '{\n    \"country\": \"CO\",\n    \"source_currency\": \"USD\",\n    \"destination_currency\": \"COP\",\n    \"source_amount\": 100\n  }'\n"
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Quote created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseCreateQuote"
                },
                "examples": {
                  "Quote with source amount specified": {
                    "value": "{\n  \"status_code\": \"200\",\n  \"status\": \"CREATED\",\n  \"status_detail\": \"Quote created successfully\",\n  \"id\": \"60sYJU1pTCPB3vJoOFG0XCBox9SdMJbznxb0\",\n  \"created_date\": \"2023-09-05T17:21:29.00Z\",\n  \"expiration_date\": \"2023-09-06T17:21:29.00Z\",\n  \"details\": {\n    \"country\": \"CO\",\n    \"source_amount\": 100,\n    \"source_currency\": \"USD\",\n    \"destination_amount\": 419439.11,\n    \"destination_currency\": \"COP\",\n    \"exchange_rate\": 4194.3911\n  },\n  \"fees\": {\n    \"amount\": 1.6,\n    \"currency\": \"USD\"\n  },\n  \"taxes\": {\n    \"amount\": 0.09,\n    \"currency\": \"USD\"\n  },\n  \"debit\": {\n    \"amount\": 101.69,\n    \"currency\": \"USD\"\n  }\n}"
                  },
                  "Quote with no amount specified": {
                    "value": "{\n  \"status_code\": \"200\",\n  \"status\": \"CREATED\",\n  \"status_detail\": \"Quote created successfully\",\n  \"id\": \"60sYJU1pTCPB3vJoOFG0XCBox9SdMJbznxb0\",\n  \"created_date\": \"2024-04-04T16:33:13.038Z\",\n  \"expiration_date\": \"2024-04-05T16:33:13.038Z\",\n  \"details\": {\n    \"country\": \"CO\",\n    \"source_amount\": 1.00,\n    \"source_currency\": \"USD\",\n    \"destination_amount\": 4194.39,\n    \"destination_currency\": \"COP\",\n    \"exchange_rate\": 4194.3911\n  }\n}"
                  },
                  "Quote with destination amount specified": {
                    "value": "{\n  \"status_code\": \"200\",\n  \"status\": \"CREATED\",\n  \"status_detail\": \"Quote created successfully\",\n  \"id\": \"60sYJU1pTCPB3vJoOFG0XCBox9SdMJbznxb0\",\n  \"created_date\": \"2024-04-04T16:33:13.038Z\",\n  \"expiration_date\": \"2024-04-05T16:33:13.038Z\",\n  \"details\": {\n    \"country\": \"CO\",\n    \"source_amount\": 119.21,\n    \"source_currency\": \"USD\",\n    \"destination_amount\": 500000,\n    \"destination_currency\": \"COP\",\n    \"exchange_rate\": 4194.3911\n  },\n  \"fees\": {\n    \"amount\": 1.6,\n    \"currency\": \"USD\"\n  },\n  \"taxes\": {\n    \"amount\": 0.09,\n    \"currency\": \"USD\"\n  },\n  \"debit\": {\n    \"amount\": 120.9,\n    \"currency\": \"USD\"\n  }\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "MissingCurrency": {
                    "value": "{ \"code\": 3001, \"message\": \"Empty params destination_currency\", \"param\": \"destination_currency\"}"
                  },
                  "MissingAmount": {
                    "value": "{ \"code\": 3001, \"message\": \"Empty params source_amount or destination_amount. One is required.\"}"
                  },
                  "RouteUnavailable": {
                    "value": "{ \"code\": 7005, \"message\": \"Currency exchange route not available\"}"
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "InvalidCredentials": {
                    "value": "{ \"code\": 4001, \"message\": \"Invalid credentials.\"}"
                  },
                  "UnregisteredIP": {
                    "value": "{ \"code\": 4002, \"message\": \"Unregistered IP address (register is in Merchant Dashboard).\"}"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "X-Date": {
        "type": "apiKey",
        "name": "X-Date",
        "in": "header"
      },
      "X-Version": {
        "type": "apiKey",
        "name": "X-Version",
        "in": "header"
      },
      "Authorization": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    },
    "schemas": {
      "CreateQuoteRequest": {
        "type": "object",
        "title": "Create Quote Request",
        "properties": {
          "country": {
            "type": "string",
            "description": "Country code of the destination. ISO-3166 country code ISO-3166 country code.",
            "maxLength": 2,
            "example": "CO"
          },
          "source_currency": {
            "type": "string",
            "description": "Currency code for the source amount. ISO-4217 currency code.",
            "maxLength": 3,
            "default": "USD",
            "example": "USD"
          },
          "destination_currency": {
            "type": "string",
            "description": "Currency code for the destination amount. ISO-4217 currency code.",
            "maxLength": 3,
            "example": "COP"
          },
          "source_amount": {
            "type": "number",
            "format": "float",
            "description": "Payout source amount expressed in the currency indicated in `source_currency`. When creating a payout, specify the exact same amount specified in this parameter.",
            "maximum": 9999999999.99,
            "default": 100,
            "example": 100
          },
          "destination_amount": {
            "type": "number",
            "format": "float",
            "description": "Payout destination amount expressed in the currency indicated in `destination_currency`. When creating a payout, specify the exact same amount specified in this parameter.",
            "maximum": 9999999999.99,
            "example": 419439.11
          }
        },
        "required": [
          "country",
          "destination_currency"
        ]
      },
      "ResponseCreateQuote": {
        "type": "object",
        "title": "Create Quote Response",
        "properties": {
          "status_code": {
            "type": "string",
            "format": "int",
            "maxLength": 3,
            "description": "Quote generation status code.",
            "example": "200"
          },
          "status": {
            "type": "string",
            "maxLength": 10,
            "description": "Quote generation status description.",
            "example": "CREATED"
          },
          "status_detail": {
            "type": "string",
            "maxLength": 100,
            "description": "Quote generation status detail.",
            "example": "Quote created successfully"
          },
          "id": {
            "type": "string",
            "maxLength": 36,
            "description": "Unique ID generated for the quoted FX rate.",
            "example": "60sYJU1pTCPB3vJoOFG0XCBox9SdMJbznxb0"
          },
          "created_date": {
            "type": "string",
            "format": "date-time",
            "description": "Creation date and time for the quoted FX rate.",
            "example": "2023-09-05T17:21:29.000+0000"
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "description": "Expiration date and time for the quoted FX rate.",
            "example": "2023-09-06T17:21:29.000+0000"
          },
          "details": {
            "$ref": "#/components/schemas/QuoteDetails"
          },
          "fees": {
            "$ref": "#/components/schemas/Fees"
          },
          "taxes": {
            "$ref": "#/components/schemas/Taxes"
          },
          "debit": {
            "$ref": "#/components/schemas/Debit",
            "properties": {
              "amount": {
                "type": "number",
                "description": "Total amount to be debited",
                "example": 101.69
              },
              "currency": {
                "type": "string",
                "description": "Debit currency",
                "example": "USD"
              }
            }
          }
        }
      },
      "QuoteDetails": {
        "type": "object",
        "properties": {
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2,
            "format": "ISO-3166 country code",
            "description": "Country code of the destination.",
            "example": "CO"
          },
          "source_amount": {
            "type": "number",
            "format": "decimal",
            "description": "Payout source amount expressed in the currency indicated in source_currency.",
            "example": 100
          },
          "source_currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3,
            "format": "ISO-4217 currency code",
            "description": "Currency code for the source amount.",
            "example": "USD"
          },
          "destination_amount": {
            "type": "number",
            "format": "decimal",
            "description": "Payout destination amount expressed in the currency indicated in destination_currency.",
            "example": 419439.11
          },
          "destination_currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3,
            "format": "ISO-4217 currency code",
            "description": "Currency code for the destination amount.",
            "example": "COP"
          },
          "exchange_rate": {
            "type": "number",
            "format": "decimal",
            "description": "dLocal's FX rate for the requested currency pair with the markup applied.",
            "example": 4194.3911
          },
          "exchange_rate_official": {
            "type": "number",
            "format": "decimal",
            "description": "Official FX rate for the requested currency pair.",
            "example": 4214.6213
          },
          "country_markup_percentage": {
            "type": "number",
            "format": "decimal",
            "description": "Markup rate for the destination currency, expressed as a percentage.",
            "example": 0.48
          },
          "exchange_rate_spread": {
            "type": "number",
            "format": "decimal",
            "description": "dLocal's spread resulting from the application of the markup to the official FX rate.",
            "example": 20.2301
          }
        }
      },
      "Fees": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "format": "decimal",
            "description": "Total fees amount applicable to the transaction.",
            "example": 1.6
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3,
            "format": "ISO-4217 currency code",
            "description": "Currency for the total processing fees.",
            "example": "USD"
          }
        }
      },
      "Taxes": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "format": "decimal",
            "description": "Total tax amount applicable to the transaction.",
            "example": 0.09
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3,
            "format": "ISO-4217 currency code",
            "description": "Currency for the total taxes applied.",
            "example": "USD"
          }
        }
      },
      "Debit": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "format": "decimal",
            "description": "Total amount that would be debited from the merchant's balance.",
            "example": 101.69
          },
          "currency": {
            "type": "string",
            "minLength": 3,
            "maxLength": 3,
            "format": "ISO-4217 currency code",
            "description": "Currency for the debit to the merchant's balance.",
            "example": "USD"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "Error's code."
          },
          "message": {
            "type": "string",
            "description": "Error's description."
          },
          "param": {
            "type": "string",
            "description": "Field indicating the parameter associated with the reported error."
          }
        }
      }
    }
  }
}
````