Update the end of the trial for the subscription. This can only be performed on an active trial subscription.
curl --request POST \
--url https://api.maplebilling.com/api/v1/companies/{company_id}/subscriptions/{id}/extend \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"end_date": null
}'
{
"arr": {
"currency": "<string>",
"value_in_cents": 123
},
"auto_charges": true,
"auto_renews": true,
"billing_anchor_date": "2023-11-07T05:31:56Z",
"cancel_config": {
"campaign_id": "<string>",
"campaign_step_id": "<string>",
"charge_remaining_balance": null,
"custom_end_date": null,
"custom_refund_amount": {
"currency": "<string>",
"value_in_cents": 123
},
"reason": null,
"refund_type": "<string>",
"send_customer_receipt": null,
"timing": "<string>"
},
"cancel_date": null,
"change_config": {
"actual_change_time": null,
"auto_charges": null,
"bundle_pricing": {
"bundle_product_pricings": [
{
"bundle_pricing_id": "<string>",
"company_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"deleted_at": {},
"id": "<string>",
"product_id": "<string>",
"product_pricing_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"company_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"default_term": {
"count": 2,
"frequency": "HOUR"
},
"deleted_at": {},
"description": "<string>",
"id": "<string>",
"image_url": "<string>",
"import_created_at_ref": null,
"import_ref": null,
"imported_from": null,
"is_auto_generated": true,
"key": "<string>",
"metadata": {},
"name": "<string>",
"num_subs": 1,
"state": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"bundle_pricing_id": null,
"config_items": [
{
"minimum_units": 1,
"num_licenses": 1,
"product_metric_pricing_id": null,
"product_pricing_id": null,
"quantity_config": {
"allow_custom_quantity": true,
"max_quantity": 123,
"min_quantity": 123
},
"upsell_product_metric_pricing_id": null
}
],
"custom_change_date": null,
"discounts": null,
"metadata": {},
"minimum_spend": {
"currency": "<string>",
"value_in_cents": 123
},
"onetime_items": [
{
"aggregate": 2,
"custom_price": {
"amount": {
"currency": "<string>",
"value_in_cents": 123
},
"description": null,
"product_id": "<string>"
},
"product_pricing_id": null,
"quantity_config": {
"allow_custom_quantity": true,
"max_quantity": 123,
"min_quantity": 123
}
}
],
"payment_method_id": null,
"product_pricing_ids": [
"<string>"
],
"proration_type": "NEXT",
"relative_term": {
"count": 2,
"frequency": "HOUR"
},
"reset_billing_anchor": null,
"term": {
"count": 2,
"frequency": "HOUR"
},
"timing": "IMMEDIATE",
"trial": null,
"trial_term": {
"count": 2,
"frequency": "HOUR"
}
},
"change_date": null,
"company_id": "<string>",
"computed_entitlements": [
{
"entitlement_id": "<string>",
"inherited_from_id": null,
"inherited_from_type": null,
"key": "<string>",
"name": "<string>",
"original_value": "<any>",
"overridden": null,
"type": "<string>",
"value": "<any>"
}
],
"config_items": [
{
"minimum_units": 1,
"num_licenses": 1,
"product_metric_pricing_id": null,
"product_pricing_id": null,
"quantity_config": {
"allow_custom_quantity": true,
"max_quantity": 123,
"min_quantity": 123
},
"upsell_product_metric_pricing_id": null
}
],
"created_at": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"end_date": null,
"id": "<string>",
"invoice_additional_display_fields": [
{
"name": "<string>",
"value": "<string>"
}
],
"invoice_due_date_from_creation": 1,
"metadata": {},
"minimum_spend": {
"currency": "<string>",
"value_in_cents": 123
},
"mrr": {
"currency": "<string>",
"value_in_cents": 123
},
"next_invoice_date": null,
"override_entitlements": [
{
"entitlement_id": "<string>",
"inherited_from_id": null,
"inherited_from_type": null,
"key": "<string>",
"name": "<string>",
"original_value": "<any>",
"overridden": null,
"type": "<string>",
"value": "<any>"
}
],
"pause_config": {
"behavior": "<string>",
"resume_date": null
},
"pause_date": null,
"payment_method_id": null,
"product_pricing_ids": [
"<string>"
],
"renewal_date": null,
"start_date": "2023-11-07T05:31:56Z",
"status": "<string>",
"term": {
"count": 2,
"frequency": "HOUR"
},
"trial": true,
"trial_conversion_date": null,
"updated_at": "2023-11-07T05:31:56Z"
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The idempotency key that will be used to ensure the request is only performed once
The company ID with the prefix 'cmp_'.
The resource ID
OK
The response is of type object
.
curl --request POST \
--url https://api.maplebilling.com/api/v1/companies/{company_id}/subscriptions/{id}/extend \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"end_date": null
}'
{
"arr": {
"currency": "<string>",
"value_in_cents": 123
},
"auto_charges": true,
"auto_renews": true,
"billing_anchor_date": "2023-11-07T05:31:56Z",
"cancel_config": {
"campaign_id": "<string>",
"campaign_step_id": "<string>",
"charge_remaining_balance": null,
"custom_end_date": null,
"custom_refund_amount": {
"currency": "<string>",
"value_in_cents": 123
},
"reason": null,
"refund_type": "<string>",
"send_customer_receipt": null,
"timing": "<string>"
},
"cancel_date": null,
"change_config": {
"actual_change_time": null,
"auto_charges": null,
"bundle_pricing": {
"bundle_product_pricings": [
{
"bundle_pricing_id": "<string>",
"company_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"deleted_at": {},
"id": "<string>",
"product_id": "<string>",
"product_pricing_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"company_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"default_term": {
"count": 2,
"frequency": "HOUR"
},
"deleted_at": {},
"description": "<string>",
"id": "<string>",
"image_url": "<string>",
"import_created_at_ref": null,
"import_ref": null,
"imported_from": null,
"is_auto_generated": true,
"key": "<string>",
"metadata": {},
"name": "<string>",
"num_subs": 1,
"state": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
},
"bundle_pricing_id": null,
"config_items": [
{
"minimum_units": 1,
"num_licenses": 1,
"product_metric_pricing_id": null,
"product_pricing_id": null,
"quantity_config": {
"allow_custom_quantity": true,
"max_quantity": 123,
"min_quantity": 123
},
"upsell_product_metric_pricing_id": null
}
],
"custom_change_date": null,
"discounts": null,
"metadata": {},
"minimum_spend": {
"currency": "<string>",
"value_in_cents": 123
},
"onetime_items": [
{
"aggregate": 2,
"custom_price": {
"amount": {
"currency": "<string>",
"value_in_cents": 123
},
"description": null,
"product_id": "<string>"
},
"product_pricing_id": null,
"quantity_config": {
"allow_custom_quantity": true,
"max_quantity": 123,
"min_quantity": 123
}
}
],
"payment_method_id": null,
"product_pricing_ids": [
"<string>"
],
"proration_type": "NEXT",
"relative_term": {
"count": 2,
"frequency": "HOUR"
},
"reset_billing_anchor": null,
"term": {
"count": 2,
"frequency": "HOUR"
},
"timing": "IMMEDIATE",
"trial": null,
"trial_term": {
"count": 2,
"frequency": "HOUR"
}
},
"change_date": null,
"company_id": "<string>",
"computed_entitlements": [
{
"entitlement_id": "<string>",
"inherited_from_id": null,
"inherited_from_type": null,
"key": "<string>",
"name": "<string>",
"original_value": "<any>",
"overridden": null,
"type": "<string>",
"value": "<any>"
}
],
"config_items": [
{
"minimum_units": 1,
"num_licenses": 1,
"product_metric_pricing_id": null,
"product_pricing_id": null,
"quantity_config": {
"allow_custom_quantity": true,
"max_quantity": 123,
"min_quantity": 123
},
"upsell_product_metric_pricing_id": null
}
],
"created_at": "2023-11-07T05:31:56Z",
"customer_id": "<string>",
"end_date": null,
"id": "<string>",
"invoice_additional_display_fields": [
{
"name": "<string>",
"value": "<string>"
}
],
"invoice_due_date_from_creation": 1,
"metadata": {},
"minimum_spend": {
"currency": "<string>",
"value_in_cents": 123
},
"mrr": {
"currency": "<string>",
"value_in_cents": 123
},
"next_invoice_date": null,
"override_entitlements": [
{
"entitlement_id": "<string>",
"inherited_from_id": null,
"inherited_from_type": null,
"key": "<string>",
"name": "<string>",
"original_value": "<any>",
"overridden": null,
"type": "<string>",
"value": "<any>"
}
],
"pause_config": {
"behavior": "<string>",
"resume_date": null
},
"pause_date": null,
"payment_method_id": null,
"product_pricing_ids": [
"<string>"
],
"renewal_date": null,
"start_date": "2023-11-07T05:31:56Z",
"status": "<string>",
"term": {
"count": 2,
"frequency": "HOUR"
},
"trial": true,
"trial_conversion_date": null,
"updated_at": "2023-11-07T05:31:56Z"
}