Skip to content

Get Estimate for a plan price #9055

@jagan-jaya

Description

@jagan-jaya

Request to Subscription Povider to get estimate
curl --location '/api/v2/estimates/create_subscription_for_items'
--header 'Content-Type: application/x-www-form-urlencoded'
--header 'Authorization: Basic ='
--data-urlencode 'billing_address%5Bline1%5D=PO Box 9999'
--data-urlencode 'billing_address%5Bcity%5D=Walnut'
--data-urlencode 'billing_address%5Bzip%5D=91789'
--data-urlencode 'billing_address%5Bcountry%5D=US'
--data-urlencode 'subscription_items%5Bitem_price_id%5D%5B0%5D=cbdemo_enterprise-suite-monthly'

Response from Subscription Provider

{
    "estimate": {
        "created_at": 1756113388,
        "object": "estimate",
        "subscription_estimate": {
            "status": "active",
            "next_billing_at": 1758791788,
            "object": "subscription_estimate",
            "currency_code": "INR"
        },
        "invoice_estimate": {
            "recurring": true,
            "date": 1756113388,
            "price_type": "tax_exclusive",
            "sub_total": 14100,
            "total": 14100,
            "credits_applied": 0,
            "amount_paid": 0,
            "amount_due": 14100,
            "object": "invoice_estimate",
            "customer_id": "16BaasUusKoPc107J",
            "line_items": [
                {
                    "id": "li_16BaasUusKoQ8107O",
                    "date_from": 1756113388,
                    "date_to": 1758791788,
                    "unit_amount": 14100,
                    "quantity": 1,
                    "amount": 14100,
                    "pricing_model": "flat_fee",
                    "is_taxed": false,
                    "tax_amount": 0,
                    "object": "line_item",
                    "customer_id": "16BaasUusKoPc107J",
                    "description": "Enterprise Suite Monthly",
                    "entity_type": "plan_item_price",
                    "entity_id": "cbdemo_enterprise-suite-monthly",
                    "discount_amount": 0,
                    "item_level_discount_amount": 0
                }
            ],
            "taxes": [],
            "line_item_taxes": [],
            "line_item_credits": [],
            "currency_code": "INR",
            "round_off_amount": 0,
            "line_item_discounts": []
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions