cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/webhook-events/commitment.terminatedfrom flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.webhook_events.post_webhook_events_commitment_terminated()
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.webhookEvents.postWebhookEventsCommitmentTerminated();
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.WebhookEvents.PostWebhookEventsCommitmentTerminated(ctx)
if err != nil {
log.Fatal(err)
}
if res.WebhookDtoCommitmentWebhookPayload != nil {
// handle response
}
}{
"commitment": {
"active_windows": [
{
"end": {
"hour": 12,
"minute": 29
},
"start": {
"hour": 12,
"minute": 29
}
}
],
"binding": true,
"collection_method": "per_period",
"commitment_status": "active",
"commitment_value": "<string>",
"committed_price_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"currency": "<string>",
"customer_id": "<string>",
"end_date": "2023-11-07T05:31:56Z",
"environment_id": "<string>",
"id": "<string>",
"idempotency_key": "<string>",
"instalment_invoicing": "<string>",
"invoice_description": "<string>",
"invoice_label": "<string>",
"measurement": "billing_period",
"metadata": {},
"name": "<string>",
"on_early_termination": "forfeit",
"overage_price_id": "<string>",
"priority": 123,
"scope_entity_id": "<string>",
"scope_entity_type": "subscription",
"start_date": "2023-11-07T05:31:56Z",
"status": "published",
"subscription_id": "<string>",
"tenant_id": "<string>",
"terminated_at": "2023-11-07T05:31:56Z",
"termination_invoice_id": "<string>",
"timezone": "<string>",
"total_amount": "<string>",
"type": "amount",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>",
"value": "<string>"
},
"event_type": "subscription.created"
}Webhook Events
commitment.terminated
Fired when a commitment is terminated. Doc-only for parsing.
POST
/
webhook-events
/
commitment.terminated
cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/webhook-events/commitment.terminatedfrom flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.webhook_events.post_webhook_events_commitment_terminated()
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.webhookEvents.postWebhookEventsCommitmentTerminated();
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.WebhookEvents.PostWebhookEventsCommitmentTerminated(ctx)
if err != nil {
log.Fatal(err)
}
if res.WebhookDtoCommitmentWebhookPayload != nil {
// handle response
}
}{
"commitment": {
"active_windows": [
{
"end": {
"hour": 12,
"minute": 29
},
"start": {
"hour": 12,
"minute": 29
}
}
],
"binding": true,
"collection_method": "per_period",
"commitment_status": "active",
"commitment_value": "<string>",
"committed_price_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"currency": "<string>",
"customer_id": "<string>",
"end_date": "2023-11-07T05:31:56Z",
"environment_id": "<string>",
"id": "<string>",
"idempotency_key": "<string>",
"instalment_invoicing": "<string>",
"invoice_description": "<string>",
"invoice_label": "<string>",
"measurement": "billing_period",
"metadata": {},
"name": "<string>",
"on_early_termination": "forfeit",
"overage_price_id": "<string>",
"priority": 123,
"scope_entity_id": "<string>",
"scope_entity_type": "subscription",
"start_date": "2023-11-07T05:31:56Z",
"status": "published",
"subscription_id": "<string>",
"tenant_id": "<string>",
"terminated_at": "2023-11-07T05:31:56Z",
"termination_invoice_id": "<string>",
"timezone": "<string>",
"total_amount": "<string>",
"type": "amount",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>",
"value": "<string>"
},
"event_type": "subscription.created"
}Response
200 - application/json
Webhook payload
Show child attributes
Show child attributes
Available options:
subscription.created, subscription.draft.created, subscription.activated, subscription.updated, subscription.paused, subscription.cancelled, subscription.resumed, subscription.plan_changed, subscription.phase.created, subscription.phase.updated, subscription.phase.deleted, feature.created, feature.updated, feature.deleted, feature.wallet_balance.alert, entitlement.created, entitlement.updated, entitlement.deleted, commitment.created, commitment.updated, commitment.terminated, wallet.created, wallet.updated, wallet.terminated, wallet.transaction.created, wallet.transaction.updated, payment.created, payment.updated, payment.failed, payment.success, payment.pending, refund.created, refund.succeeded, refund.failed, customer.created, customer.updated, customer.deleted, invoice.update.finalized, invoice.update.payment, invoice.update.voided, invoice.update, invoice.payment.overdue, invoice.sync.success, invoice.sync.failed, wallet.credit_balance.dropped, wallet.credit_balance.recovered, wallet.ongoing_balance.dropped, wallet.ongoing_balance.recovered, wallet.ongoing_balance.updated, subscription.spend.threshold_reached, subscription.spend.threshold_recovered, subscription.line_item_spend.threshold_reached, subscription.line_item_spend.threshold_recovered, subscription.group_spend.threshold_reached, subscription.group_spend.threshold_recovered, entitlement.grant.exhausted, subscription.renewal.due, invoice.communication.triggered, credit_note.created, credit_note.updated, checkout.session.initiated, checkout.session.completed, checkout.session.failed, checkout.session.expired, event.rejected 
