> For the complete documentation index, see [llms.txt](https://docs.loomgate.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.loomgate.io/api-reference/fee-quotes.md).

# Fee quotes

Tính phí cho một số tiền mà không tạo payment.

Dùng khi cần hiển thị phí trước khi tạo payment, ví dụ thêm dòng phí vào giỏ hàng khi người mua chịu phí. Không tạo hay thay đổi gì. Kết quả dùng biểu phí và bên chịu phí **hiện tại**; payment tạo sau đó có thể khác nếu biểu phí đã đổi, nên luôn hiển thị `amount_total` của payment trước khi người mua trả.

## Quote the fees for an amount

> No side effects. Uses your current fee schedule and fee bearer; \`label\` is your buyer fee label.

```json
{"openapi":"3.0.0","info":{"title":"Loomgate API","version":"v1"},"tags":[{"name":"Fee quotes","description":"Price an amount with your fee schedule, without creating anything."}],"servers":[{"url":"https://api.loomgate.io"}],"security":[{"secret_key":[]}],"components":{"securitySchemes":{"secret_key":{"scheme":"bearer","type":"http","description":"Secret key `sk_live_…` (server-side only)."}},"schemas":{"CreateFeeQuoteRequest":{"type":"object","properties":{"amount":{"type":"integer","minimum":1,"description":"Amount in minor units."},"currency":{"type":"string","enum":["usd","eur"]}},"required":["amount","currency"]},"FeeQuote":{"type":"object","properties":{"object":{"type":"string","enum":["fee_quote"]},"currency":{"type":"string","enum":["usd","eur"]},"amount":{"type":"integer"},"fee_buyer":{"type":"integer","description":"processing_fee + bank_fee when the buyer bears them, else 0."},"amount_total":{"type":"integer"},"processing_fee":{"type":"integer"},"bank_fee":{"type":"integer"},"fee_bearer":{"type":"string","enum":["merchant","buyer"]},"label":{"type":"string","description":"Label for a buyer-paid fee line."}},"required":["object","currency","amount","fee_buyer","amount_total","processing_fee","bank_fee","fee_bearer","label"]},"ErrorResponse":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/Error"}},"required":["error"]},"Error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","card_error","rate_limit_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"param":{"type":"string","description":"The request field at fault."},"decline_code":{"type":"string","description":"Card declines only, when the reason is known."}},"required":["type","code","message"]}}},"paths":{"/partner/v1/fee_quotes":{"post":{"description":"No side effects. Uses your current fee schedule and fee bearer; `label` is your buyer fee label.","operationId":"createFeeQuote","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFeeQuoteRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeeQuote"}}}},"400":{"description":"invalid_request_error: `validation_error` or a more specific code; `param` names the field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"authentication_error: missing, invalid or revoked key / client secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"rate_limit_error: `rate_limited`, too many requests; retry after the `Retry-After` seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"api_error: `internal_error`, or `fee_plan_not_configured` when no fee schedule applies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"summary":"Quote the fees for an amount","tags":["Fee quotes"]}}}}
```

## Đối tượng fee quote

## The FeeQuote object

```json
{"openapi":"3.0.0","info":{"title":"Loomgate API","version":"v1"},"components":{"schemas":{"FeeQuote":{"type":"object","properties":{"object":{"type":"string","enum":["fee_quote"]},"currency":{"type":"string","enum":["usd","eur"]},"amount":{"type":"integer"},"fee_buyer":{"type":"integer","description":"processing_fee + bank_fee when the buyer bears them, else 0."},"amount_total":{"type":"integer"},"processing_fee":{"type":"integer"},"bank_fee":{"type":"integer"},"fee_bearer":{"type":"string","enum":["merchant","buyer"]},"label":{"type":"string","description":"Label for a buyer-paid fee line."}},"required":["object","currency","amount","fee_buyer","amount_total","processing_fee","bank_fee","fee_bearer","label"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.loomgate.io/api-reference/fee-quotes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
