curl --request GET \
--url http://127.0.0.1:8080/v1/c/contract/{contract_id} \
--header 'wb-key: <api-key>'{
"billing_information": {
"current_period": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
},
"current_period_idx": 123
},
"contract_summary": {
"amount": "<string>",
"billing_information": {
"current_period": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
},
"current_period_idx": 123
},
"configuration": {
"automatic_payment": true,
"due_date_policy": "start_of_period",
"invoice_trigger": "immediate",
"usage_period_closing_policy": "automatic"
},
"cost_estimates": {
"custom_cycle_charges": {
"periodic_daily": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"periodic_monthly": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"periodic_quarterly": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"periodic_weekly": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"periodic_yearly": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
}
},
"on_demand_price": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"one_time_price": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"recurring_price": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
}
},
"currency": "usd",
"customer": "<string>",
"customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"cycle": "once",
"cycle_start_offset": 1,
"free_cycles": 1,
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"plan": "<string>",
"plan_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"plan_internal_name": "<string>",
"status": "active",
"strategy": "plan",
"activation": "2023-11-07T05:31:56Z",
"created": "2023-11-07T05:31:56Z",
"expiration": "2023-11-07T05:31:56Z",
"free_trial_end": "2023-11-07T05:31:56Z",
"next_cycle_start": "2023-11-07T05:31:56Z",
"plan_external_name": "<string>",
"pricing_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
},
"plan": {
"features": [
{
"charge_trigger": "every_cycle",
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"name": "<string>",
"slug": "<string>",
"original_feature_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"price": {
"amount": "<string>",
"currency": "usd",
"strategy_details": {
"pricing_strategy": "flat"
},
"free_cycles": 1,
"tax_code": "<string>",
"total_charge_estimate": {
"subtotal": "<string>",
"total": "<string>"
}
}
}
],
"free_trial_days": 1,
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"internal_name": "<string>",
"name": "<string>",
"slug": "<string>",
"strategy": "plan",
"description": "<string>",
"external_name": "<string>",
"original_plan_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"price": {
"amount": "<string>",
"currency": "usd",
"strategy_details": {
"pricing_strategy": "flat"
},
"free_cycles": 1,
"tax_code": "<string>",
"total_charge_estimate": {
"subtotal": "<string>",
"total": "<string>"
}
}
},
"discount": {
"amount": "<string>",
"contract_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"discount_type": "percentage",
"duration": 123,
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"name": "<string>",
"slug": "<string>",
"original_discount_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
}
}curl --request GET \
--url http://127.0.0.1:8080/v1/c/contract/{contract_id} \
--header 'wb-key: <api-key>'{
"billing_information": {
"current_period": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
},
"current_period_idx": 123
},
"contract_summary": {
"amount": "<string>",
"billing_information": {
"current_period": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
},
"current_period_idx": 123
},
"configuration": {
"automatic_payment": true,
"due_date_policy": "start_of_period",
"invoice_trigger": "immediate",
"usage_period_closing_policy": "automatic"
},
"cost_estimates": {
"custom_cycle_charges": {
"periodic_daily": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"periodic_monthly": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"periodic_quarterly": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"periodic_weekly": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"periodic_yearly": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
}
},
"on_demand_price": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"one_time_price": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
},
"recurring_price": {
"cycle_start_charges": "<string>",
"extra_cycle_end_charges": "<string>",
"minimum_usage": "<string>"
}
},
"currency": "usd",
"customer": "<string>",
"customer_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"cycle": "once",
"cycle_start_offset": 1,
"free_cycles": 1,
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"plan": "<string>",
"plan_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"plan_internal_name": "<string>",
"status": "active",
"strategy": "plan",
"activation": "2023-11-07T05:31:56Z",
"created": "2023-11-07T05:31:56Z",
"expiration": "2023-11-07T05:31:56Z",
"free_trial_end": "2023-11-07T05:31:56Z",
"next_cycle_start": "2023-11-07T05:31:56Z",
"plan_external_name": "<string>",
"pricing_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
},
"plan": {
"features": [
{
"charge_trigger": "every_cycle",
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"name": "<string>",
"slug": "<string>",
"original_feature_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"price": {
"amount": "<string>",
"currency": "usd",
"strategy_details": {
"pricing_strategy": "flat"
},
"free_cycles": 1,
"tax_code": "<string>",
"total_charge_estimate": {
"subtotal": "<string>",
"total": "<string>"
}
}
}
],
"free_trial_days": 1,
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"internal_name": "<string>",
"name": "<string>",
"slug": "<string>",
"strategy": "plan",
"description": "<string>",
"external_name": "<string>",
"original_plan_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"price": {
"amount": "<string>",
"currency": "usd",
"strategy_details": {
"pricing_strategy": "flat"
},
"free_cycles": 1,
"tax_code": "<string>",
"total_charge_estimate": {
"subtotal": "<string>",
"total": "<string>"
}
}
},
"discount": {
"amount": "<string>",
"contract_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"discount_type": "percentage",
"duration": 123,
"id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670",
"name": "<string>",
"slug": "<string>",
"original_discount_id": "Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
}
}Id of the Contract
Contract Details
Contract with additional information
Detailed information about the current billing period
Show child attributes
Billing period of the contract. For example, for contracts that are paid monthly, a new billing period would be created each month. For Constant or Once contracts, a single period would be created with empty "end" value
Current billing period index (starting from 1, ascending)
Contract Summary
Show child attributes
Contract estimated price
Detailed information about the current billing period
Show child attributes
Billing period of the contract. For example, for contracts that are paid monthly, a new billing period would be created each month. For Constant or Once contracts, a single period would be created with empty "end" value
Current billing period index (starting from 1, ascending)
Additional Contract-level billing configuration
Show child attributes
Should invoice amount be charged automatically or not
Determines when the due_date of the invoices should be set when created:
start_of_period, end_of_period When the invoices should be created
Note: EveryCycle and Periodic aren't yet supported, they will behave as Manual
immediate Determines how usage period should be closed:
automatic, manual, 15 minutes, 1 hour, 1 day Price estimate
Show child attributes
Charges for features on a custom cycle
Show child attributes
Detailed breakdown of the estimated charges
Show child attributes
Amount to be charged at the start of the given cycle
Amount to be charged at the end of the cycle (except usage)
Minimum amount of usage that will be charged
Detailed breakdown of the estimated charges
Show child attributes
Amount to be charged at the start of the given cycle
Amount to be charged at the end of the cycle (except usage)
Minimum amount of usage that will be charged
Detailed breakdown of the estimated charges
Show child attributes
Amount to be charged at the start of the given cycle
Amount to be charged at the end of the cycle (except usage)
Minimum amount of usage that will be charged
Detailed breakdown of the estimated charges
Show child attributes
Amount to be charged at the start of the given cycle
Amount to be charged at the end of the cycle (except usage)
Minimum amount of usage that will be charged
Detailed breakdown of the estimated charges
Show child attributes
Amount to be charged at the start of the given cycle
Amount to be charged at the end of the cycle (except usage)
Minimum amount of usage that will be charged
Detailed breakdown of the estimated charges
Show child attributes
Amount to be charged at the start of the given cycle
Amount to be charged at the end of the cycle (except usage)
Minimum amount of usage that will be charged
Detailed breakdown of the estimated charges
Show child attributes
Amount to be charged at the start of the given cycle
Amount to be charged at the end of the cycle (except usage)
Minimum amount of usage that will be charged
Detailed breakdown of the estimated charges
Show child attributes
Amount to be charged at the start of the given cycle
Amount to be charged at the end of the cycle (except usage)
Minimum amount of usage that will be charged
A supported currency
The format for parsing and reading is the lowercased ISO 4217 currency code (e.g. "usd")
usd, eur, gbp, brl, ars Customer Name
Unique identifier of an object. Consists of object class prefix and a UUID
"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
Enum that lists supported payment cycles for contracts:
once, hour, day, week, month, quarter, year, constant The number of days from the cycle's natural start (i.e. the first day of the week/month/quarter/year) to the start of the cycles
x >= 0The number of free cycles
x >= 0Unique identifier of an object. Consists of object class prefix and a UUID
"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
Plan Name
Unique identifier of an object. Consists of object class prefix and a UUID
"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
Internal Plan name
Status of the contract:
active, pending, scheduled, canceled, moved, not_ready Pricing strategy of the Plan:
plan, group, feature Contract Activation Date
Date os signing
Contract Expiration Date
Date of the end of the free trial, if any
End date of the current cycle (if the contract is active)
External Plan name
Unique identifier of an object. Consists of object class prefix and a UUID
"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
Same as Plan, but attached to a Contract
Show child attributes
List of Features present in this Plan
Show child attributes
When the feature should be charged
every_cycle, first_cycle, on_demand, month, quarter, year Unique identifier of an object. Consists of object class prefix and a UUID
"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
Feature Name
Unique Slug
Unique identifier of an object. Consists of object class prefix and a UUID
"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
Information about the price of the feature in the given contract
Show child attributes
Price
A supported currency
The format for parsing and reading is the lowercased ISO 4217 currency code (e.g. "usd")
usd, eur, gbp, brl, ars Number of free cycles for this feature
x >= 0Tax code
Estimated cost. Takes into account current usage and active discounts Null if calculation not performed
Number of days the plan will be free. The contract's cycles will be aligned with the end of the free trial
x >= 0Unique identifier of an object. Consists of object class prefix and a UUID
"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
Internal name of the Plan
Name of the Plan. Uses external_name if available, otherwise internal_name
Unique Slug
Pricing strategy of the Plan:
plan, group, feature Plan Description
External name of the Plan
Unique identifier of an object. Consists of object class prefix and a UUID
"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
Information about the price of the feature in the given contract
Show child attributes
Price
A supported currency
The format for parsing and reading is the lowercased ISO 4217 currency code (e.g. "usd")
usd, eur, gbp, brl, ars Number of free cycles for this feature
x >= 0Tax code
Estimated cost. Takes into account current usage and active discounts Null if calculation not performed
Discount attached to a Contract
Show child attributes
Discount amount
Unique identifier of an object. Consists of object class prefix and a UUID
"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
Type of the discount:
percentage, flat Discount Duration. This determines how many billing cycles will Discount be applied For example, for Monthly cycles, setting this value to 3 will mean that first 3 month of use will be discounted
Unique identifier of an object. Consists of object class prefix and a UUID
"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"
Discount Name
Unique slug
Unique identifier of an object. Consists of object class prefix and a UUID
"Cust_c40bea18-c0c9-44b1-bd0c-43f5283e1670"