πŸ“ˆGet Current Price

This endpoint breaks down cryptocurrency purchase pricing, including fees, markups, and conversions, so that you can display accurate costs to your users before order creation.

All pricing information can be retrieved with a POST request.

URL: https://widget.swapped.com/api/v1/merchant/pricing

Request Data:

{
    "api_key": "",
    "payment_method": "creditcard",
    "fiat_currency": "USD",
    "fiat_amount": 500,
    "crypto_currency": "ETH",
    "crypto_amount": 1,
    "region": "BE"
}

Note: The crypto_amount and fiat_amount fields are optional. If only one is provided, the other is calculated based on the current exchange rate.

Note: payment_method value must be a valid payment group, and region is required, or the request will fail.

Markup Parameter

Optionally, the markup parameter can be used to apply a different markup on a per-request basis without modifying your merchant default.

Request Data with Markup:

{
    "api_key": "",
    "payment_method": "creditcard",
    "fiat_currency": "USD",
    "fiat_amount": 500,
    "crypto_currency": "ETH",
    "crypto_amount": 1,
    "markup": 3,
    "region": "BE"
}

Request Definition:

  • api_key: The merchant's public key. Identifies the requesting merchant.

  • payment_method: Payment method to use (e.g., creditcard).

  • fiat_currency: The fiat currency you want to query. For the full list of supported currencies, see here.

  • fiat_amount: The fiat amount you want to convert.

  • crypto_currency: The cryptocurrency you want to convert to. For the full list of supported currencies, see here.

  • crypto_amount: The cryptocurrency amount you want to convert to.

  • region: The 2-letter ISO-3166 code of the country the method is available in.

  • markup: An additional fee applied to the cryptocurrency purchase price. Value must be between 0 and 5.

Response data:

{
    "success": true,
    "data": {
        "crypto_amount": 0.12284,
        "crypto_currency": "ETH",
        "crypto_unit_price": 4070.34,
        "network_fee": 0.2,
        "network_fee_local": 0.24,
        "fiat_amount_incl_fees": 440.85,
        "fiat_amount_excl_fees": 424.61,
        "fiat_amount_incl_fees_local": 519.12,
        "fiat_amount_excl_fees_local": 500,
        "fiat_currency": "USD",
        "markup_fiat_value": 20,
        "processing_fee": 19.11,
        "payment_method": "creditcard-extra",
        "payment_group": "creditcard"
    }
}

Response Definition:

  • crypto_amount: Amount of crypto the user will receive (e.g., 0.14137 ETH).

  • crypto_currency: The crypto token used (e.g., "ETH").

  • crypto_unit_price: Price per 1 unit of crypto in the given fiat (e.g., 3536.82 EUR per ETH).

  • network_fee: Network fee in EUR.

  • network_fee_local: Provides the network fee amount converted to the user's local fiat currency.

  • fiat_amount_incl_fees: Fiat value the user is paying, including fees, in EUR.

  • fiat_amount_excl_fees: Fiat value the user is paying, excluding fees, in EUR.

  • fiat_amount_incl_fees_local: Total fiat paid, including fees, in user’s fiat currency (e.g., USD).

  • fiat_amount_excl_fees_local: Total fiat paid, excluding fees, in user’s fiat currency (e.g., USD).

  • fiat_currency: The local fiat currency (e.g., "USD").

  • markup_fiat_value: Additional markup displayed in fiat.

    • Merchants can add a markup via dashboard.swapped.com > Settings > Affiliate Fee.

    • Only the workspace owner can configure this.

  • processing_fee: Total processing fee in local fiat (e.g., 19.21 EUR).

  • payment_method: The payment method used for the order.

  • payment_group: The payment group the method belongs to.

Last updated