Subscription - Get Estimate

GET /subscriptions/estimate

Try it

cURL
curl --request GET \
  --url https://sandbox.hyperswitch.io/subscriptions/estimate \
  --header 'X-Profile-Id: <x-profile-id>' \
  --header 'api-key: <api-key>'

Response 200 (application/json)

Example response
{
  "amount": 123,
  "currency": "AED",
  "line_items": [
    {
      "item_id": "<string>",
      "item_type": "<string>",
      "description": "<string>",
      "amount": 123,
      "currency": "AED",
      "quantity": 123
    }
  ],
  "plan_id": "<string>",
  "item_price_id": "<string>",
  "coupon_code": "<string>",
  "customer_id": "<string>"
}

Authorizations

  • api-key (string, header) — required Use the API key created under your merchant account from the HyperSwitch dashboard. API key is used to authenticate API requests from your merchant server only. Don't expose this key on a website or embed it in a mobile application.

Headers

  • X-Profile-Id (string) — required Profile ID for authentication

Query parameters

  • plan_id (string) — required Plan ID for estimation

  • customer_id (string | null) — optional Customer ID for personalized pricing

  • coupon_id (string | null) — optional Coupon ID to apply discount

  • trial_days (integer | null) — optional Number of trial days Required range: x >= 0

Response fields

200 application/json — Estimate retrieved successfully

  • amount (integer) — required This Unit struct represents MinorUnit in which core amount works

  • currency (enum) — required The three-letter ISO 4217 currency code (e.g., "USD", "EUR") for the payment amount. This field is mandatory for creating a payment.

Available currency codes (expand)

AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLE, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW, ZWL

  • line_items (object[]) — required Array of line item objects. Showchild attributes.

    Each line item object example:

    • item_id (string)

    • item_type (string)

    • description (string)

    • amount (integer)

    • currency (string)

    • quantity (integer)

  • plan_id (string | null) — optional Identifier for the associated plan_id.

  • item_price_id (string | null) — optional Identifier for the associated item_price_id for the subscription.

  • coupon_code (string | null) — optional Identifier for the coupon code for the subscription.

  • customer_id (string) — optional A type for customer_id that can be used for customer ids


Suggest edits: https://github.com/juspay/hyperswitch/edit/main/api-reference/v1/subscriptions/estimate.mdx Raise issue: https://github.com/juspay/hyperswitch/issues/new?title=Issue%20on%20docs&body=Path:%20/v1/subscriptions/estimate