---
title: "POST /v2/quote"
method: POST
path: "/v2/quote"
tags: ["Transaction"]
---

# POST /v2/quote

`POST /v2/quote`

Payment quote creation method

## Headers

- `X-Request-Signature` string
- `X-User-ID` string
- `X-User-IP` string
- `X-User-Locale` 'en' | 'ru' | 'it' | 'fr' | 'es' | 'de' | 'pt' | 'ko'
- `X-Referer` string

## Request body

- object
  - `currencyCodeFrom` string — Fiat currency code in ISO alpha-3 format or crypto asset (i.e. BTC)
  - `currencyCodeTo` string — Fiat currency code in ISO alpha-3 format or crypto asset (i.e. BTC)
  - `amount` string — The amount in the currency specified by either the `directionChange` or `requestedCurrency` parameters represented the payment amount with precision: 2 decimal places for fiat currencies (e.g., 100.12); and 8 decimal places for cryptocurrencies (e.g., 0.12345678).
  - `directionChange` 'from' | 'to' — This field determines the currency in which amount is specified. A value of `from` indicates that `amount` is in the `currencyCodeFrom` currency. A value of `to` indicates that `amount` is in the `currencyCodeTo` currency. This parameter is *required* if `requestedCurrency` is not provided. It is mutually exclusive with `requestedCurrency`.
  - `requestedCurrency` string — This field is used in swap-crypto exchanges and crypto-acquiring transactions where the transaction occurs in a fiat equivalent. This parameter is optional. It specifies the *fiat currency* in which amount is denominated.
  - `isReceivedAmount` boolean — Specifies how to process the value in the amount field: with or without fees. False, to set the total amount that the user will spend. True, to set the net amount of money (excluding fees) for which the user will get crypto.
  - `paymentMethod` string, nullable — ID of the payment method for which the quote is generated (optional)
  - `payoutMethod` string, nullable — ID of the payout method for which the quote is generated (optional)
  - `promoCode` string, nullable — Promo code to be used with transaction

## Response `200`

A Quote successfully created.

- object
  - `id` string, uuid — Quote ID required for Create request method
  - `currencyCodeFrom` string — Fiat currency code in ISO alpha-3 format or crypto asset (i.e. BTC)
  - `currencyCodeTo` string — Fiat currency code in ISO alpha-3 format or crypto asset (i.e. BTC)
  - `exchangeRate` object — Exchange rate info
    - `from` string — Fiat currency code in ISO alpha-3 format or cryptocurrency code
    - `to` string — Fiat currency code in ISO alpha-3 format or cryptocurrency code
    - `rate` string, numeric — Conversion rate (how much TO per single FROM)
  - `exchangeRateCryptoToFiat` object, nullable — Exchange rate info
    - `from` string — Fiat currency code in ISO alpha-3 format or cryptocurrency code
    - `to` string — Fiat currency code in ISO alpha-3 format or cryptocurrency code
    - `rate` string, numeric — Conversion rate (how much TO per single FROM)
  - `requestedAmount` object — Amount and currency for which the quote is generated
    - `amount` string — Payment amount with precision 2 for fiat and 8 for crypto. If directionChange is "from", then amount value is in fiat currency, e.g. 100.12. If directionChange is "to", then amount value is in cryptocurrency, e.g. 0.12345678
    - `currencyCode` string — Fiat or crypto currency code depending on the transaction direction
  - `requestedAmountType` 'from' | 'to' — Type of the transaction direction. "from" value determines the quote amount based on fiat currency code, e.g. customer wants to purchase crypto for XX fiat. "to" determines the quote amount based on crypto currency code, e.g. customer wants to purchase XX crypto.
  - `paymentMethods` object[], nullable — Array of quotes calculated for each available payment method.
    - `id` string — ID of the payment method for create transaction.
    - `name` string — Display name of the payment method in the Paybis system.
    - `paymentMethod` string — ID of the payment method in the Paybis system.
    - `paymentMethodName` string — Display name of the payment method in the Paybis system.
    - `amountFrom` object — Quote amount and currency which corresponds to currencyCodeFrom.
      - `amount` string — Quote amount which corresponds to currencyCodeFrom.
      - `currencyCode` string — Fiat currency code in ISO alpha-3 format
    - `amountTo` object — Quote amount and currency which corresponds to currencyCodeTo
      - `amount` string — Quote amount which corresponds to currencyCodeTo
      - `currencyCode` string — Cryptocurrency symbol
    - `amountToEquivalent` object, nullable — amountTo in fiat currency passed in the request
      - `amount` string — Original quote amount
      - `currencyCode` string — Cryptocurrency symbol
    - `amountFromEquivalent` object, nullable — amountFrom in fiat currency passed in the request
      - `amount` string — Original quote amount
      - `currencyCode` string — Fiat currency code in ISO alpha-3 format
    - `amountReceive` object, nullable
      - `amount` string — Quote amount which corresponds to currencyCodeFrom without commissions
      - `currencyCode` string — Fiat currency code in ISO alpha-3 format
    - `fees` object — Calculated fees for the transaction
      - `networkFee` object — Blockchain network fee in fiat currency
        - `amount` string — Blockchain network fee amount
        - `currencyCode` string — Fiat currency code in ISO alpha-3 format
      - `serviceFee` object — Paybis service fee in fiat currency, including partners fee
        - `amount` string — Paybis service fee amount
        - `currencyCode` string — Fiat currency code in ISO alpha-3 format
      - `totalFee` object — Total fee amount, sum of service fee and network fee
        - `amount` string — Total fee amount
        - `currencyCode` string — Fiat currency code in ISO alpha-3 format
      - `feeDiscount` object, nullable — Total fee discount (if promo code is applied)
        - `amount` string — Total fee discount
        - `currencyCode` string — Fiat currency code in ISO alpha-3 format
    - `feesInCrypto` object — Calculated fees for the transaction
      - `networkFee` object — Blockchain network fee in crypto currency
        - `amount` string — Blockchain network fee amount
        - `currencyCode` string — Crypto currency code
      - `serviceFee` object — Paybis service fee in crypto currency, including partners fee
        - `amount` string — Paybis service fee amount
        - `currencyCode` string — Crypto currency code
      - `totalFee` object — Total fee amount, sum of service fee and network fee
        - `amount` string — Total fee amount
        - `currencyCode` string — Crypto currency code
      - `feeDiscount` object, nullable — Total fee discount (if promo code is applied)
        - `amount` string — Total fee discount
        - `currencyCode` string — Crypto currency code
    - `expiresAt` string — Timestamp of the quote expiration in UTC timezone
  - `paymentMethodErrors` object[], nullable — List of validation errors returned if quote cannot be calculated for a certain payment method
    - `paymentMethod` string — ID of the payment method in the Paybis system
    - `error` object — Error code and message
      - `message` string — Error message
      - `code` string — Error code
  - `payoutMethods` object[], nullable — Array of quotes calculated for each available payout method.
    - `id` string — ID of the payout method for create transaction.
    - `name` string — Display name of the payout method in the Paybis system.
    - `paymentMethod` string — ID of the payout method in the Paybis system.
    - `paymentMethodName` string — Display name of the payout method in the Paybis system.
    - `amountFrom` object — Quote amount and currency which corresponds to currencyCodeFrom.
      - `amount` string — Quote amount which corresponds to currencyCodeFrom.
      - `currencyCode` string — Cryptocurrency symbol
    - `amountTo` object — Quote amount and currency which corresponds to currencyCodeTo
      - `amount` string — Quote amount which corresponds to currencyCodeTo
      - `currencyCode` string — Fiat currency code in ISO alpha-3 format
    - `amountToEquivalent` object, nullable — amountTo in fiat currency passed in the request
      - `amount` string — Original quote amount
      - `currencyCode` string — Cryptocurrency symbol
    - `amountFromEquivalent` object, nullable — amountFrom in fiat currency passed in the request
      - `amount` string — Original quote amount
      - `currencyCode` string — Fiat currency code in ISO alpha-3 format
    - `amountReceive` object, nullable
      - `amount` string — Quote amount which corresponds to currencyCodeFrom without commissions
      - `currencyCode` string — Fiat currency code in ISO alpha-3 format
    - `fees` object — Calculated fees for the transaction
      - `networkFee` object — Blockchain network fee in fiat currency
        - `amount` string — Blockchain network fee amount
        - `currencyCode` string — Fiat currency code in ISO alpha-3 format
      - `serviceFee` object — Paybis service fee in fiat currency, including partners fee
        - `amount` string — Paybis service fee amount
        - `currencyCode` string — Fiat currency code in ISO alpha-3 format
      - `totalFee` object — Total fee amount, sum of service fee and network fee
        - `amount` string — Total fee amount
        - `currencyCode` string — Fiat currency code in ISO alpha-3 format
      - `feeDiscount` object, nullable — Total fee discount (if promo code is applied)
        - `amount` string — Total fee discount
        - `currencyCode` string — Fiat currency code in ISO alpha-3 format
    - `expiresAt` string — Timestamp of the quote expiration in UTC timezone
  - `payoutMethodErrors` object[], nullable — List of validation errors returned if quote cannot be calculated for a certain payout method
    - `payoutMethod` string — ID of the payout method in the Paybis system
    - `error` object — Error code and message
      - `message` string — Error message
      - `code` string — Error code
  - `promoCodeError` object, nullable — Error for promo code. Possible values: - Invalid promo code (code 55c50cc4-51d9-4ed1-ab9b-9b76116c1602) - Expired promo code (code 55fc761d-fd63-473f-9136-2c022eaa9862) - Used up promo code (code 7ebb5ee9-f7f3-4746-854b-4589880ca753)
    - `code` '55c50cc4-51d9-4ed1-ab9b-9b76116c1602' | '55fc761d-fd63-473f-9136-2c022eaa9862' | '7ebb5ee9-f7f3-4746-854b-4589880ca753', uuid — Error code for promo code
    - `message` string — Error message for promo code

## Other responses

- `401` — API key is missing
- `403` — Invalid API key or access disabled
- `404` — Payment method for quote not found
- `422` — Validation error
- `503` — Maintenance status

---

[API](https://skmtc.dev/payb/apis/widget.md) · [All operations](https://skmtc.dev/payb/apis/widget/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/payb/widget/revisions/2c2cf39656c5/schema)
