Skip to main content
GET
/
subscriptions
/
estimate
Subscription - Get Estimate
curl --request GET \
  --url https://sandbox.hyperswitch.io/subscriptions/estimate \
  --header 'X-Profile-Id: <x-profile-id>' \
  --header 'api-key: <api-key>'
{
  "amount": 123,
  "currency": "AED",
  "plan_id": "<string>",
  "item_price_id": "<string>",
  "coupon_code": "<string>",
  "customer_id": "<string>",
  "line_items": [
    {
      "item_id": "<string>",
      "item_type": "<string>",
      "description": "<string>",
      "amount": 123,
      "currency": "AED",
      "quantity": 123
    }
  ]
}

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

Customer ID for personalized pricing

coupon_id
string | null

Coupon ID to apply discount

trial_days
integer | null

Number of trial days

Required range: x >= 0

Response

Estimate retrieved successfully

amount
integer
required

This Unit struct represents MinorUnit in which core amount works

currency
enum<string>
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 options:
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
plan_id
string | null

Identifier for the associated plan_id.

item_price_id
string | null

Identifier for the associated item_price_id for the subscription.

coupon_code
string | null

Identifier for the coupon code for the subscription.

customer_id
string

A type for customer_id that can be used for customer ids