novinzodevelopers
API referencePlugin contractWebhooks

Subscription Ended

POST/webhooks/subscription-ended

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

subscriptionId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
storeId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
customerId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
items*array<>
Items1 <= items
reason*string

Value in

  • "cancelled"
  • "expired"
endedAt*string

Response Body

text/plain

curl -X POST "https://example.com/webhooks/subscription-ended" \  -H "Content-Type: application/json" \  -d '{    "subscriptionId": "string",    "storeId": "string",    "customerId": "string",    "items": [      {        "variantId": "string",        "quantity": 1      }    ],    "reason": "cancelled",    "endedAt": "string"  }'
"string"