Reference documentation on the object that Corrily returns after you call calculate price.
Fields
Field (Data type) | Data type | Description |
---|---|---|
| Boolean | Whether or not the request completed successfully. |
| String | The user ID that you provided when you called calculate price, or the user's IP address (if you did not provide a user ID). |
| String | The country that the price data is associated to. If you did not specify a country when calling calculate price, the |
| String | The currency that the price data is associated to. Tip: check if |
| String | The currency symbol that the price data is associated to. Tip: check if |
| Object | The price data for each of the products that you specified when you called calculate price. The placeholder |
| Float | A float version of your price, in case you want to do some custom formatting of the price. Tip: check if |
| Float | The current value of |
| String | The billing interval of this product. Possible values: |
| Integer | |
| Object | The price data, formatted in various ways for display to your user. |
| String | The price data, formatted in a way that your user will quickly understand. This is usually a combination of |
| String | The default price for the product. You can set this default price in your Corrily Dashboard. |
| String | If |
| Float | If |
| Object | The price data, formatted for payment gateway integration. |
| String | The currency that |
| Float or Integer | The amount that you should pass to the payment gateway when creating the subscription or charge. Many payment gateways use smallest-unit currency format in which case this value will be an integer. |
| String | As mentioned in |
| Object | Optionally include coupon details if the given request matches any segment for which an active campaign is running |
| String | coupon id |
| String | indicates if a coupon is percentage discount coupon or absolute amount discount coupon |
| Float | The value or percentage or absolute amount of discount for the coupon |
| String | Indicates the source of the coupon if the coupon maps to an external source |
| String | Coupon id from the external source if that coupon maps to an external source |
| String | Indicates currency code if it is configured for the coupon |
| Datetime in YYYY-MM-DD HH:MM:SS format | Indicates the time the coupon is valid for in UTC |
| Object | Same as product level display object but indicates the price related values after the coupon is applied |
| Object | Price experimentation metadata. If you are not doing price experimentation, you can ignore this object. |
| Boolean | Whether or not this response contains experimental prices. |
Example
{
"success": true,
"user_id": "193.37.32.232",
"country": "SG",
"currency": "SGD",
"currency_symbol": "S$",
"products": {
"monthly": {
"price": 27,
"price_usd": 20.059360849328197,
"interval": "month",
"interval_count": 1,
"display": {
"price": "S$ 27",
"reference_interval_price": "S$ 27",
"price_with_baseline_strike": "S$ 27",
"discount_to_baseline": 0
},
"integrations": {
"stripe": {
"currency": "SGD",
"amount": 2700,
"formatted": "S$ 27"
}
}
},
"annual": {
"price": 144,
"price_usd": 106.98325786308372,
"interval": "year",
"interval_count": 1,
"display": {
"price": "S$ 144",
"reference_interval_price": "S$ 12",
"price_with_baseline_strike": "S$ 12",
"discount_to_baseline": 0
},
"integrations": {
"stripe": {
"currency": "SGD",
"amount": 14400,
"formatted": "S$ 144"
}
},
"coupon":{
"id":"coupon_id_392",
"type":"percentage",
"value":10,
"coupon_source":"chargebee",
"external_coupon_id":"chargebee_coupon_392",
"currency_code":"USD",
"valid_till":"2022-02-07 15:49:49",
"display":{
"local_currency_symbol":"€",
"interval_local_price_formatted":"9 €",
"local_price_formatted":"9 €",
"usd_price_formatted":"$11",
"local_price_formatted_with_baseline_strike":"9 €",
"pct_discount_to_baseline":0.0
}
}
}
},
"variants": {
"experimented_on": true
}
}