> ## Documentation Index
> Fetch the complete documentation index at: https://docs.khaime.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Product Pricing

> Get localized pricing for a specific product.

# Get Product Pricing

Returns the product's price converted to the customer's detected or specified currency, including fee breakdown, available payment methods, and any active price discrimination adjustment for the customer's country.

## Path Parameters

<ParamField path="product_id" type="integer" required>
  The Khaime product ID.
</ParamField>

## Query Parameters

<ParamField query="currency" type="string">
  Override auto-detected currency. 3-letter ISO code (e.g., `NGN`).
</ParamField>

<ParamField query="customer_country" type="string">
  Override auto-detected customer country. 2-letter ISO code (e.g., `NG`). When omitted, the country is derived from the payment currency (e.g., `NGN` → `NG`), with IP geolocation as a fallback. Only needed for ambiguous currencies like `USD`.
</ParamField>

## Response

```json theme={null}
{
  "success": true,
  "data": {
    "product": {
      "id": 3046,
      "name": "Premium Course",
      "type": "digital"
    },
    "pricing": {
      "base": {
        "amount": 10000,
        "currency": "USD",
        "formatted": "$100.00"
      },
      "local": {
        "amount": 16675000,
        "currency": "NGN",
        "formatted": "₦166,750.00"
      },
      "conversion": {
        "rate": 1450.1,
        "source": "wise_api",
        "applied": true
      }
    },
    "price_discrimination": {
      "original_base_price": 10000,
      "discrimination_amount": 1500,
      "discrimination_percentage": 0.15,
      "adjusted_base_price": 11500,
      "country_triggered": "NG"
    },
    "amount": {
      "product_price": {
        "amount": 16675000,
        "currency": "NGN",
        "formatted": "₦166,750.00"
      },
      "total": {
        "amount": 17742500,
        "currency": "NGN",
        "formatted": "₦177,425.00"
      }
    },
    "customer": {
      "location": {
        "country": "Nigeria",
        "country_code": "NG",
        "detected_from": "ip_address"
      },
      "currency": {
        "code": "NGN",
        "detected": false,
        "override": true
      }
    },
    "payment": {
      "methods": ["card", "bank_transfer", "ussd"],
      "currency": "NGN"
    }
  }
}
```

### Price Discrimination

If the merchant has configured a regional pricing rule for the customer's country, the `price_discrimination` field is included in the response. The adjustment is applied to the base price **before** currency conversion, so `pricing.local` already reflects the discriminated amount.

When no rule is active for the customer's country, `price_discrimination` is `null`.

| Field                       | Type    | Description                                            |
| --------------------------- | ------- | ------------------------------------------------------ |
| `original_base_price`       | integer | Product's base price before any adjustment             |
| `discrimination_amount`     | integer | Amount added (or subtracted) by the rule               |
| `discrimination_percentage` | number  | Decimal percentage applied (e.g., `0.15` for +15%)     |
| `adjusted_base_price`       | integer | Price after discrimination, before currency conversion |
| `country_triggered`         | string  | ISO-2 country code that matched the rule               |

<RequestExample>
  ```bash cURL theme={null}
  # Auto-detect currency and country
  curl "https://api.khaime.com/api/v1/partner/products/3046/pricing" \
    -H "X-API-Key: pk_sandbox_your_key"

  # Explicit currency (country derived from NGN → NG automatically)
  curl "https://api.khaime.com/api/v1/partner/products/3046/pricing?currency=NGN" \
    -H "X-API-Key: pk_sandbox_your_key"

  # Explicit currency + country override (for ambiguous currencies like USD)
  curl "https://api.khaime.com/api/v1/partner/products/3046/pricing?currency=USD&customer_country=NG" \
    -H "X-API-Key: pk_sandbox_your_key"
  ```
</RequestExample>
