# Models

## The CheckoutDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"CheckoutDTO":{"required":["id","metadata","lines"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Checkout","format":"flake-id"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with the checkout"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/CheckoutLineDTO"},"description":"The lines of the Checkout"}}},"CheckoutLineDTO":{"required":["id","product_id","product_version_id","metadata"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the Checkout line","format":"flake-id"},"product_id":{"type":"string","description":"The Product Flake ID of the Checkout Line","format":"flake-id"},"product_version_id":{"type":"string","description":"The Product Version Flake ID of the Checkout Line","format":"flake-id"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with the Checkout Line"}}}}}}
```

## The CheckoutLineDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"CheckoutLineDTO":{"required":["id","product_id","product_version_id","metadata"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the Checkout line","format":"flake-id"},"product_id":{"type":"string","description":"The Product Flake ID of the Checkout Line","format":"flake-id"},"product_version_id":{"type":"string","description":"The Product Version Flake ID of the Checkout Line","format":"flake-id"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with the Checkout Line"}}}}}}
```

## The CustomerDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"CustomerDTO":{"required":["id","steam","minecraft","profile"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Customer","format":"flake-id"},"name":{"type":["null","string"],"description":""},"steam":{"$ref":"#/components/schemas/SteamCustomerDTO"},"minecraft":{"$ref":"#/components/schemas/MinecraftCustomerDTO"},"profile":{"$ref":"#/components/schemas/GenericProfileDTO"}}},"SteamCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":"SteamID64"},"name":{"type":"string","description":"The name on the Steam Profile"},"avatar_url":{"type":"string","description":"The Steam Avatar URL"}}},"MinecraftCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}},"GenericProfileDTO":{"required":["id","platform","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"platform":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}}}}}
```

## The GameServerDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"GameServerDTO":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Game Server","format":"flake-id"},"name":{"type":"string","description":"The name of the Game Server"},"enabled":{"type":"boolean","description":"Indicates if the Game Server is enabled"}}}}}}
```

## The GenericProfileDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"GenericProfileDTO":{"required":["id","platform","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"platform":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}}}}}
```

## The MinecraftCustomerDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"MinecraftCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}}}}}
```

## The OrderCouponUsageDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"OrderCouponUsageDTO":{"required":["coupon_id","usage_amount"],"type":"object","properties":{"coupon_id":{"type":"string","description":"","format":"flake-id"},"usage_amount":{"type":"integer","description":""}}}}}}
```

## The OrderDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"OrderDTO":{"required":["id","store_id","customer","checkout_id","checkout","applied_coupons","applied_giftcards","coupon_id","type","currency","tax_inclusive","tax_amount","discount_amount","subtotal_amount","total_amount","created_at","completed_at","billing_name","billing_email","billing_address_country","customer_ip","giftcard_usage_amount","lines","product_names","product_tags","product_gameservers","status"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Order","format":"flake-id"},"store_id":{"type":"string","description":"The Flake ID of the store associated with the order","format":"flake-id"},"customer":{"$ref":"#/components/schemas/CustomerDTO"},"checkout_id":{"type":"string","description":"The Flake ID of the Checkout associated with the order","format":"flake-id"},"checkout":{"$ref":"#/components/schemas/CheckoutDTO"},"subscription_id":{"type":["null","string"],"description":"The Flake ID of the Subscription associated with the order","format":"flake-id"},"applied_coupons":{"type":"array","items":{"$ref":"#/components/schemas/OrderCouponUsageDTO"},"description":"Applied coupons to this order"},"applied_giftcards":{"type":"array","items":{"$ref":"#/components/schemas/OrderGiftCardUsageDTO"},"description":"Applied gift cards to this order"},"coupon_id":{"type":"string","description":"The Flake ID of the Coupon associated with the order","format":"flake-id"},"type":{"type":"string","description":"The type of the order"},"currency":{"type":"string","description":"The ISO-4217 Currency Code of the order"},"tax_inclusive":{"type":"boolean","description":"Indicates if the order value was inclusive of tax"},"tax_amount":{"type":"integer","description":"The tax amount, represented as cents"},"discount_amount":{"type":"integer","description":"The discount amount, represented as cents"},"subtotal_amount":{"type":"integer","description":"The subtotal amount, represented as cents"},"total_amount":{"type":"integer","description":"The total amount, represented as cents"},"created_at":{"type":"string","description":"Indicates when the order was created","format":"date-time"},"completed_at":{"type":"string","description":"Indicates when the order was completed","format":"date-time"},"billing_name":{"type":"string","description":"The billing name of the customer associated with the order"},"billing_email":{"type":"string","description":"The billing email address of the customer associated with the order"},"billing_address_country":{"type":"string","description":"The ISO-3316 Country Code of the customer associated with the order"},"customer_ip":{"type":"string","description":"The IPv4 or IPv6 Address of the associated customer when creating the order"},"giftcard_usage_amount":{"type":"integer","description":"The total amount of giftcard usage associated with the order, represented in cents"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineDTO"},"description":"The order lines associated with the order"},"product_names":{"type":"string","description":"A comma-seperated string of the names of the product associated with the order"},"product_tags":{"type":"string","description":"A comma-seperated string of the tags of the products associated with the order"},"product_gameservers":{"type":"string","description":"A comma-seperated string of the gameservers of the product associated with the order"},"status":{"type":"string","description":"The status of the Order.  Possbile options: created, completed, canceled"}}},"CustomerDTO":{"required":["id","steam","minecraft","profile"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Customer","format":"flake-id"},"name":{"type":["null","string"],"description":""},"steam":{"$ref":"#/components/schemas/SteamCustomerDTO"},"minecraft":{"$ref":"#/components/schemas/MinecraftCustomerDTO"},"profile":{"$ref":"#/components/schemas/GenericProfileDTO"}}},"SteamCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":"SteamID64"},"name":{"type":"string","description":"The name on the Steam Profile"},"avatar_url":{"type":"string","description":"The Steam Avatar URL"}}},"MinecraftCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}},"GenericProfileDTO":{"required":["id","platform","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"platform":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}},"CheckoutDTO":{"required":["id","metadata","lines"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Checkout","format":"flake-id"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with the checkout"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/CheckoutLineDTO"},"description":"The lines of the Checkout"}}},"CheckoutLineDTO":{"required":["id","product_id","product_version_id","metadata"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the Checkout line","format":"flake-id"},"product_id":{"type":"string","description":"The Product Flake ID of the Checkout Line","format":"flake-id"},"product_version_id":{"type":"string","description":"The Product Version Flake ID of the Checkout Line","format":"flake-id"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata associated with the Checkout Line"}}},"OrderCouponUsageDTO":{"required":["coupon_id","usage_amount"],"type":"object","properties":{"coupon_id":{"type":"string","description":"","format":"flake-id"},"usage_amount":{"type":"integer","description":""}}},"OrderGiftCardUsageDTO":{"required":["giftcard_id","usage_amount"],"type":"object","properties":{"giftcard_id":{"type":"string","description":"","format":"flake-id"},"usage_amount":{"type":"integer","description":""}}},"OrderLineDTO":{"required":["id","product_id","product_version_id","product","product_name","price","quantity","discount_amount","subtotal_amount","tax_amount","total_amount"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Order Line","format":"flake-id"},"checkout_line_id":{"type":["null","string"],"description":"The Flake ID of the Checkout Line associated with this Order Line","format":"flake-id"},"product_id":{"type":"string","description":"The Flake ID of the Product ID associated with this Order Line","format":"flake-id"},"product_version_id":{"type":"string","description":"The Flake ID of the Product Version ID associated with this Order Line","format":"flake-id"},"product":{"$ref":"#/components/schemas/ProductDTO"},"product_name":{"type":"string","description":"The name of the product associated with this Order Line"},"product_image_url":{"type":["null","string"],"description":"The Image URL of the Product associated with this Order Line"},"subscription_id":{"type":["null","string"],"description":"The Flake ID of the Subscription associated with this Order Line","format":"flake-id"},"subscription_line_id":{"type":["null","string"],"description":"The Flake ID of the Subscription Line associated with this Order Line","format":"flake-id"},"subscription_interval_value":{"type":["null","integer"],"description":"The value of the interval in which the subscription associated with this Order Line renews at"},"subscription_interval_scale":{"type":["null","string"],"description":"The value of the scale in which the subscription associated with this Order Line renews at"},"trial_id":{"type":["null","string"],"description":"The Flake ID of the Trial associated with this Order Line","format":"flake-id"},"gift_to_customer":{"oneOf":[{"$ref":"#/components/schemas/CustomerDTO"},{"type":"null"}]},"price":{"type":"integer","description":"The price of the Order Line"},"quantity":{"type":"integer","description":"The quantity of the Order Line"},"discount_amount":{"type":"integer","description":"The discount amount of the order line, represented in cents"},"subtotal_amount":{"type":"integer","description":"The subtotal amount of the order line, represented in cents"},"tax_amount":{"type":"integer","description":"The tax amount of the order line, represented in cents"},"total_amount":{"type":"integer","description":"The total amount of the order line, represented in cents"},"selected_gameserver_id":{"type":["null","string"],"description":"The Flake ID of which was the selected Game Server ID for the Order Line","format":"flake-id"}}},"ProductDTO":{"required":["id","store_id","version_id","slug","name","description","enabled","sort_order","price","single_game_server_only","allow_one_time_purchase","allow_subscription","remove_after_enabled","tags","tag_names","gameservers","gameserver_names","commands","metadata"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Product","format":"flake-id"},"store_id":{"type":"string","description":"The Flake ID of the Store","format":"flake-id"},"version_id":{"type":"string","description":"The Flake ID of the Version of the Product","format":"flake-id"},"image_url":{"type":["null","string"],"description":"The Image URL of the product"},"slug":{"type":"string","description":"The URL-Friendly Slug of the Product"},"name":{"type":"string","description":"The name of the Product"},"description":{"type":"string","description":"The description of the product"},"enabled":{"type":"boolean","description":"Indicates if the product is enabled."},"label":{"type":["null","string"],"description":"The label of the product"},"sort_order":{"type":"integer","description":"The sort order of the product"},"price":{"type":"integer","description":"The price of the product, represented in cents."},"single_game_server_only":{"type":"boolean","description":"Indicates if the customer must select a single game server when purchasing the product"},"allow_one_time_purchase":{"type":"boolean","description":"Indicates if one-time purchases are supported on the product"},"allow_subscription":{"type":"boolean","description":"Indicates if subscriptions are supported on the product"},"subscription_interval_value":{"type":["null","integer"],"description":"The value of the interval in which the product subscription renews at"},"subscription_interval_scale":{"type":["null","string"],"description":"The value of the interval in which the product subscription renews at"},"remove_after_enabled":{"type":"boolean","description":"Indicates whether automatic removal is enabled"},"remove_after_time_value":{"type":["null","integer"],"description":"The value of the time in which this product should be removed"},"remove_after_time_scale":{"type":["null","string"],"description":"The scale of the time in which this product should be removed"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ProductTagDTO"},"description":"The tags associated with the product"},"tag_names":{"type":"string","description":"A comma-seperated string of all the tags associated with the product"},"gameservers":{"type":"array","items":{"$ref":"#/components/schemas/ProductGameServerDTO"},"description":"The game servers associated with the product"},"gameserver_names":{"type":"string","description":"A comma-seperated string of all the game servers associated with the product"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/ProductCommandDTO"},"description":"The commands associated with the product"},"created_at":{"type":["null","string"],"description":"When the product was created","format":"date-time"},"updated_at":{"type":["null","string"],"description":"When the product was last updated","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"The metadata of the product"}}},"ProductTagDTO":{"required":["id","slug","name"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Product Tag","format":"flake-id"},"slug":{"type":"string","description":"The URL-Friendly slug of the Product Tag"},"name":{"type":"string","description":"The name of the Product Tag"}}},"ProductGameServerDTO":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the Game Server","format":"flake-id"},"name":{"type":"string","description":"The name of the Game Server"},"enabled":{"type":"boolean","description":"Indicates if the Game Server is enabled"}}},"ProductCommandDTO":{"required":["stage","content","online_only"],"type":"object","properties":{"stage":{"type":"string","description":"The stage of which the Product Command should be executed.  Possible options: on_purchase, on_expire, on_refund, on_renew, on_chargeback, on_trial_start, on_trial_expire"},"content":{"type":"string","description":"The command to execute"},"online_only":{"type":"boolean","description":"Indicated if the command should be executed only when the customer is online"}}}}}}
```

## The OrderGiftCardUsageDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"OrderGiftCardUsageDTO":{"required":["giftcard_id","usage_amount"],"type":"object","properties":{"giftcard_id":{"type":"string","description":"","format":"flake-id"},"usage_amount":{"type":"integer","description":""}}}}}}
```

## The OrderLineDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"OrderLineDTO":{"required":["id","product_id","product_version_id","product","product_name","price","quantity","discount_amount","subtotal_amount","tax_amount","total_amount"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Order Line","format":"flake-id"},"checkout_line_id":{"type":["null","string"],"description":"The Flake ID of the Checkout Line associated with this Order Line","format":"flake-id"},"product_id":{"type":"string","description":"The Flake ID of the Product ID associated with this Order Line","format":"flake-id"},"product_version_id":{"type":"string","description":"The Flake ID of the Product Version ID associated with this Order Line","format":"flake-id"},"product":{"$ref":"#/components/schemas/ProductDTO"},"product_name":{"type":"string","description":"The name of the product associated with this Order Line"},"product_image_url":{"type":["null","string"],"description":"The Image URL of the Product associated with this Order Line"},"subscription_id":{"type":["null","string"],"description":"The Flake ID of the Subscription associated with this Order Line","format":"flake-id"},"subscription_line_id":{"type":["null","string"],"description":"The Flake ID of the Subscription Line associated with this Order Line","format":"flake-id"},"subscription_interval_value":{"type":["null","integer"],"description":"The value of the interval in which the subscription associated with this Order Line renews at"},"subscription_interval_scale":{"type":["null","string"],"description":"The value of the scale in which the subscription associated with this Order Line renews at"},"trial_id":{"type":["null","string"],"description":"The Flake ID of the Trial associated with this Order Line","format":"flake-id"},"gift_to_customer":{"oneOf":[{"$ref":"#/components/schemas/CustomerDTO"},{"type":"null"}]},"price":{"type":"integer","description":"The price of the Order Line"},"quantity":{"type":"integer","description":"The quantity of the Order Line"},"discount_amount":{"type":"integer","description":"The discount amount of the order line, represented in cents"},"subtotal_amount":{"type":"integer","description":"The subtotal amount of the order line, represented in cents"},"tax_amount":{"type":"integer","description":"The tax amount of the order line, represented in cents"},"total_amount":{"type":"integer","description":"The total amount of the order line, represented in cents"},"selected_gameserver_id":{"type":["null","string"],"description":"The Flake ID of which was the selected Game Server ID for the Order Line","format":"flake-id"}}},"ProductDTO":{"required":["id","store_id","version_id","slug","name","description","enabled","sort_order","price","single_game_server_only","allow_one_time_purchase","allow_subscription","remove_after_enabled","tags","tag_names","gameservers","gameserver_names","commands","metadata"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Product","format":"flake-id"},"store_id":{"type":"string","description":"The Flake ID of the Store","format":"flake-id"},"version_id":{"type":"string","description":"The Flake ID of the Version of the Product","format":"flake-id"},"image_url":{"type":["null","string"],"description":"The Image URL of the product"},"slug":{"type":"string","description":"The URL-Friendly Slug of the Product"},"name":{"type":"string","description":"The name of the Product"},"description":{"type":"string","description":"The description of the product"},"enabled":{"type":"boolean","description":"Indicates if the product is enabled."},"label":{"type":["null","string"],"description":"The label of the product"},"sort_order":{"type":"integer","description":"The sort order of the product"},"price":{"type":"integer","description":"The price of the product, represented in cents."},"single_game_server_only":{"type":"boolean","description":"Indicates if the customer must select a single game server when purchasing the product"},"allow_one_time_purchase":{"type":"boolean","description":"Indicates if one-time purchases are supported on the product"},"allow_subscription":{"type":"boolean","description":"Indicates if subscriptions are supported on the product"},"subscription_interval_value":{"type":["null","integer"],"description":"The value of the interval in which the product subscription renews at"},"subscription_interval_scale":{"type":["null","string"],"description":"The value of the interval in which the product subscription renews at"},"remove_after_enabled":{"type":"boolean","description":"Indicates whether automatic removal is enabled"},"remove_after_time_value":{"type":["null","integer"],"description":"The value of the time in which this product should be removed"},"remove_after_time_scale":{"type":["null","string"],"description":"The scale of the time in which this product should be removed"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ProductTagDTO"},"description":"The tags associated with the product"},"tag_names":{"type":"string","description":"A comma-seperated string of all the tags associated with the product"},"gameservers":{"type":"array","items":{"$ref":"#/components/schemas/ProductGameServerDTO"},"description":"The game servers associated with the product"},"gameserver_names":{"type":"string","description":"A comma-seperated string of all the game servers associated with the product"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/ProductCommandDTO"},"description":"The commands associated with the product"},"created_at":{"type":["null","string"],"description":"When the product was created","format":"date-time"},"updated_at":{"type":["null","string"],"description":"When the product was last updated","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"The metadata of the product"}}},"ProductTagDTO":{"required":["id","slug","name"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Product Tag","format":"flake-id"},"slug":{"type":"string","description":"The URL-Friendly slug of the Product Tag"},"name":{"type":"string","description":"The name of the Product Tag"}}},"ProductGameServerDTO":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the Game Server","format":"flake-id"},"name":{"type":"string","description":"The name of the Game Server"},"enabled":{"type":"boolean","description":"Indicates if the Game Server is enabled"}}},"ProductCommandDTO":{"required":["stage","content","online_only"],"type":"object","properties":{"stage":{"type":"string","description":"The stage of which the Product Command should be executed.  Possible options: on_purchase, on_expire, on_refund, on_renew, on_chargeback, on_trial_start, on_trial_expire"},"content":{"type":"string","description":"The command to execute"},"online_only":{"type":"boolean","description":"Indicated if the command should be executed only when the customer is online"}}},"CustomerDTO":{"required":["id","steam","minecraft","profile"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Customer","format":"flake-id"},"name":{"type":["null","string"],"description":""},"steam":{"$ref":"#/components/schemas/SteamCustomerDTO"},"minecraft":{"$ref":"#/components/schemas/MinecraftCustomerDTO"},"profile":{"$ref":"#/components/schemas/GenericProfileDTO"}}},"SteamCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":"SteamID64"},"name":{"type":"string","description":"The name on the Steam Profile"},"avatar_url":{"type":"string","description":"The Steam Avatar URL"}}},"MinecraftCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}},"GenericProfileDTO":{"required":["id","platform","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"platform":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}}}}}
```

## The ProductCommandDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"ProductCommandDTO":{"required":["stage","content","online_only"],"type":"object","properties":{"stage":{"type":"string","description":"The stage of which the Product Command should be executed.  Possible options: on_purchase, on_expire, on_refund, on_renew, on_chargeback, on_trial_start, on_trial_expire"},"content":{"type":"string","description":"The command to execute"},"online_only":{"type":"boolean","description":"Indicated if the command should be executed only when the customer is online"}}}}}}
```

## The ProductDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"ProductDTO":{"required":["id","store_id","version_id","slug","name","description","enabled","sort_order","price","single_game_server_only","allow_one_time_purchase","allow_subscription","remove_after_enabled","tags","tag_names","gameservers","gameserver_names","commands","metadata"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Product","format":"flake-id"},"store_id":{"type":"string","description":"The Flake ID of the Store","format":"flake-id"},"version_id":{"type":"string","description":"The Flake ID of the Version of the Product","format":"flake-id"},"image_url":{"type":["null","string"],"description":"The Image URL of the product"},"slug":{"type":"string","description":"The URL-Friendly Slug of the Product"},"name":{"type":"string","description":"The name of the Product"},"description":{"type":"string","description":"The description of the product"},"enabled":{"type":"boolean","description":"Indicates if the product is enabled."},"label":{"type":["null","string"],"description":"The label of the product"},"sort_order":{"type":"integer","description":"The sort order of the product"},"price":{"type":"integer","description":"The price of the product, represented in cents."},"single_game_server_only":{"type":"boolean","description":"Indicates if the customer must select a single game server when purchasing the product"},"allow_one_time_purchase":{"type":"boolean","description":"Indicates if one-time purchases are supported on the product"},"allow_subscription":{"type":"boolean","description":"Indicates if subscriptions are supported on the product"},"subscription_interval_value":{"type":["null","integer"],"description":"The value of the interval in which the product subscription renews at"},"subscription_interval_scale":{"type":["null","string"],"description":"The value of the interval in which the product subscription renews at"},"remove_after_enabled":{"type":"boolean","description":"Indicates whether automatic removal is enabled"},"remove_after_time_value":{"type":["null","integer"],"description":"The value of the time in which this product should be removed"},"remove_after_time_scale":{"type":["null","string"],"description":"The scale of the time in which this product should be removed"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ProductTagDTO"},"description":"The tags associated with the product"},"tag_names":{"type":"string","description":"A comma-seperated string of all the tags associated with the product"},"gameservers":{"type":"array","items":{"$ref":"#/components/schemas/ProductGameServerDTO"},"description":"The game servers associated with the product"},"gameserver_names":{"type":"string","description":"A comma-seperated string of all the game servers associated with the product"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/ProductCommandDTO"},"description":"The commands associated with the product"},"created_at":{"type":["null","string"],"description":"When the product was created","format":"date-time"},"updated_at":{"type":["null","string"],"description":"When the product was last updated","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"The metadata of the product"}}},"ProductTagDTO":{"required":["id","slug","name"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Product Tag","format":"flake-id"},"slug":{"type":"string","description":"The URL-Friendly slug of the Product Tag"},"name":{"type":"string","description":"The name of the Product Tag"}}},"ProductGameServerDTO":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the Game Server","format":"flake-id"},"name":{"type":"string","description":"The name of the Game Server"},"enabled":{"type":"boolean","description":"Indicates if the Game Server is enabled"}}},"ProductCommandDTO":{"required":["stage","content","online_only"],"type":"object","properties":{"stage":{"type":"string","description":"The stage of which the Product Command should be executed.  Possible options: on_purchase, on_expire, on_refund, on_renew, on_chargeback, on_trial_start, on_trial_expire"},"content":{"type":"string","description":"The command to execute"},"online_only":{"type":"boolean","description":"Indicated if the command should be executed only when the customer is online"}}}}}}
```

## The ProductGameServerDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"ProductGameServerDTO":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the Game Server","format":"flake-id"},"name":{"type":"string","description":"The name of the Game Server"},"enabled":{"type":"boolean","description":"Indicates if the Game Server is enabled"}}}}}}
```

## The ProductTagDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"ProductTagDTO":{"required":["id","slug","name"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Product Tag","format":"flake-id"},"slug":{"type":"string","description":"The URL-Friendly slug of the Product Tag"},"name":{"type":"string","description":"The name of the Product Tag"}}}}}}
```

## The SteamCustomerDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"SteamCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":"SteamID64"},"name":{"type":"string","description":"The name on the Steam Profile"},"avatar_url":{"type":"string","description":"The Steam Avatar URL"}}}}}}
```

## The SubscriptionLineDTO object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"SubscriptionLineDTO":{"required":["id","subscription_id","product_id","product_version_id","product_name","tax_inclusive","price","discount_amount","subtotal_amount","tax_amount","total_amount","initial_discount_amount","initial_subtotal_amount","initial_giftcard_usage_amount","initial_tax_amount","initial_total_amount","currency"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Subscription Line","format":"flake-id"},"subscription_id":{"type":"string","description":"The Flake ID of the Subscription associated with this Subscription Line","format":"flake-id"},"checkout_line_id":{"type":["null","string"],"description":"The Flake ID of the Checkout Line associated with this Subscription Line","format":"flake-id"},"initial_order_line_id":{"type":["null","string"],"description":"The Flake ID of the initial Order Line associated with this Subscription Line","format":"flake-id"},"gift_to_customer_id":{"type":["null","string"],"description":"The Flake ID of the customer this Subscription Line was gifted to","format":"flake-id"},"gift_to_customer":{"oneOf":[{"$ref":"#/components/schemas/CustomerDTO"},{"type":"null"}]},"selected_gameserver_id":{"type":["null","string"],"description":"The Flake ID of the selected Game Server for this Subscription Line","format":"flake-id"},"sale_id":{"type":["null","string"],"description":"The Flake ID of the Sale associated with this Subscription Line","format":"flake-id"},"trial_id":{"type":["null","string"],"description":"The Flake ID of the Trial associated with this Subscription Line","format":"flake-id"},"product_id":{"type":"string","description":"The Flake ID of the Product associated with this Subscription Line","format":"flake-id"},"product_version_id":{"type":"string","description":"The Flake ID of the Product Version associated with this Subscription Line","format":"flake-id"},"product_name":{"type":"string","description":"The name of the Product associated with this Subscription Line"},"product_image_url":{"type":["null","string"],"description":"The image URL of the Product associated with this Subscription Line"},"product":{"oneOf":[{"$ref":"#/components/schemas/ProductDTO"},{"type":"null"}]},"tax_inclusive":{"type":"boolean","description":"Whether the price of this Subscription Line is tax inclusive"},"price":{"type":"integer","description":"The price of this Subscription Line represented in cents"},"discount_amount":{"type":"integer","description":"The discount amount applied to this Subscription Line represented in cents"},"subtotal_amount":{"type":"integer","description":"The subtotal amount of this Subscription Line represented in cents"},"tax_amount":{"type":"integer","description":"The tax amount of this Subscription Line represented in cents"},"total_amount":{"type":"integer","description":"The total amount of this Subscription Line represented in cents"},"initial_discount_amount":{"type":"integer","description":"The initial discount amount applied to this Subscription Line represented in cents"},"initial_subtotal_amount":{"type":"integer","description":"The initial subtotal amount of this Subscription Line represented in cents"},"initial_giftcard_usage_amount":{"type":"integer","description":"The initial gift card usage amount applied to this Subscription Line represented in cents"},"initial_tax_amount":{"type":"integer","description":"The initial tax amount of this Subscription Line represented in cents"},"initial_total_amount":{"type":"integer","description":"The initial total amount of this Subscription Line represented in cents"},"currency":{"type":"string","description":"The currency code of this Subscription Line"},"presentment_currency":{"type":["null","string"],"description":"The presentment currency code of this Subscription Line"},"presentment_subtotal_amount":{"type":["null","integer"],"description":"The presentment subtotal amount of this Subscription Line represented in cents"},"presentment_discount_amount":{"type":["null","integer"],"description":"The presentment discount amount of this Subscription Line represented in cents"},"presentment_tax_amount":{"type":["null","integer"],"description":"The presentment tax amount of this Subscription Line represented in cents"},"presentment_total_amount":{"type":["null","integer"],"description":"The presentment total amount of this Subscription Line represented in cents"},"initial_presentment_discount_amount":{"type":["null","integer"],"description":"The initial presentment discount amount of this Subscription Line represented in cents"},"initial_presentment_subtotal_amount":{"type":["null","integer"],"description":"The initial presentment subtotal amount of this Subscription Line represented in cents"},"initial_presentment_giftcard_usage_amount":{"type":["null","integer"],"description":"The initial presentment gift card usage amount of this Subscription Line represented in cents"},"initial_presentment_tax_amount":{"type":["null","integer"],"description":"The initial presentment tax amount of this Subscription Line represented in cents"},"initial_presentment_total_amount":{"type":["null","integer"],"description":"The initial presentment total amount of this Subscription Line represented in cents"}}},"CustomerDTO":{"required":["id","steam","minecraft","profile"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Customer","format":"flake-id"},"name":{"type":["null","string"],"description":""},"steam":{"$ref":"#/components/schemas/SteamCustomerDTO"},"minecraft":{"$ref":"#/components/schemas/MinecraftCustomerDTO"},"profile":{"$ref":"#/components/schemas/GenericProfileDTO"}}},"SteamCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":"SteamID64"},"name":{"type":"string","description":"The name on the Steam Profile"},"avatar_url":{"type":"string","description":"The Steam Avatar URL"}}},"MinecraftCustomerDTO":{"required":["id","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}},"GenericProfileDTO":{"required":["id","platform","name","avatar_url"],"type":"object","properties":{"id":{"type":"string","description":""},"platform":{"type":"string","description":""},"name":{"type":"string","description":""},"avatar_url":{"type":"string","description":""}}},"ProductDTO":{"required":["id","store_id","version_id","slug","name","description","enabled","sort_order","price","single_game_server_only","allow_one_time_purchase","allow_subscription","remove_after_enabled","tags","tag_names","gameservers","gameserver_names","commands","metadata"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Product","format":"flake-id"},"store_id":{"type":"string","description":"The Flake ID of the Store","format":"flake-id"},"version_id":{"type":"string","description":"The Flake ID of the Version of the Product","format":"flake-id"},"image_url":{"type":["null","string"],"description":"The Image URL of the product"},"slug":{"type":"string","description":"The URL-Friendly Slug of the Product"},"name":{"type":"string","description":"The name of the Product"},"description":{"type":"string","description":"The description of the product"},"enabled":{"type":"boolean","description":"Indicates if the product is enabled."},"label":{"type":["null","string"],"description":"The label of the product"},"sort_order":{"type":"integer","description":"The sort order of the product"},"price":{"type":"integer","description":"The price of the product, represented in cents."},"single_game_server_only":{"type":"boolean","description":"Indicates if the customer must select a single game server when purchasing the product"},"allow_one_time_purchase":{"type":"boolean","description":"Indicates if one-time purchases are supported on the product"},"allow_subscription":{"type":"boolean","description":"Indicates if subscriptions are supported on the product"},"subscription_interval_value":{"type":["null","integer"],"description":"The value of the interval in which the product subscription renews at"},"subscription_interval_scale":{"type":["null","string"],"description":"The value of the interval in which the product subscription renews at"},"remove_after_enabled":{"type":"boolean","description":"Indicates whether automatic removal is enabled"},"remove_after_time_value":{"type":["null","integer"],"description":"The value of the time in which this product should be removed"},"remove_after_time_scale":{"type":["null","string"],"description":"The scale of the time in which this product should be removed"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/ProductTagDTO"},"description":"The tags associated with the product"},"tag_names":{"type":"string","description":"A comma-seperated string of all the tags associated with the product"},"gameservers":{"type":"array","items":{"$ref":"#/components/schemas/ProductGameServerDTO"},"description":"The game servers associated with the product"},"gameserver_names":{"type":"string","description":"A comma-seperated string of all the game servers associated with the product"},"commands":{"type":"array","items":{"$ref":"#/components/schemas/ProductCommandDTO"},"description":"The commands associated with the product"},"created_at":{"type":["null","string"],"description":"When the product was created","format":"date-time"},"updated_at":{"type":["null","string"],"description":"When the product was last updated","format":"date-time"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"The metadata of the product"}}},"ProductTagDTO":{"required":["id","slug","name"],"type":"object","properties":{"id":{"type":"string","description":"The Flake ID of the Product Tag","format":"flake-id"},"slug":{"type":"string","description":"The URL-Friendly slug of the Product Tag"},"name":{"type":"string","description":"The name of the Product Tag"}}},"ProductGameServerDTO":{"required":["id","name","enabled"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the Game Server","format":"flake-id"},"name":{"type":"string","description":"The name of the Game Server"},"enabled":{"type":"boolean","description":"Indicates if the Game Server is enabled"}}},"ProductCommandDTO":{"required":["stage","content","online_only"],"type":"object","properties":{"stage":{"type":"string","description":"The stage of which the Product Command should be executed.  Possible options: on_purchase, on_expire, on_refund, on_renew, on_chargeback, on_trial_start, on_trial_expire"},"content":{"type":"string","description":"The command to execute"},"online_only":{"type":"boolean","description":"Indicated if the command should be executed only when the customer is online"}}}}}}
```

## The WebhookEventType object

```json
{"openapi":"3.1.1","info":{"title":"PayNow Webhook Definitions","version":"v1"},"components":{"schemas":{"WebhookEventType":{"enum":["ON_ORDER_COMPLETED","ON_REFUND","ON_CHARGEBACK","ON_DELIVERY_ITEM_ADDED","ON_DELIVERY_ITEM_ACTIVATED","ON_DELIVERY_ITEM_USED","ON_DELIVERY_ITEM_REVOKED","ON_SUBSCRIPTION_ACTIVATED","ON_SUBSCRIPTION_RENEWED","ON_SUBSCRIPTION_CANCELED","ON_DISCORD_ACCOUNT_LINKED_TO_CHECKOUT","ON_CONNECTED_USER_REGISTERED","ON_CONNECTED_USER_BECAME_PAYABLE","ON_CONNECTED_USER_PAYOUT_CREATED","ON_CONNECTED_USER_PAYOUT_COMPLETED","ON_CONNECTED_USER_TRANSACTION_INSERTED","ON_CONNECTED_USER_BECAME_UNPAYABLE","ON_TRIAL_ACTIVATED","ON_TRIAL_COMPLETED","ON_TRIAL_CANCELED","ON_PURCHASE_FOLLOW_UP_ATTEMPT_EMAIL_SENT","ON_PURCHASE_FOLLOW_UP_ATTEMPT_SUCCEEDED","ON_ABANDONED_CHECKOUT_RECOVERY_ATTEMPT_EMAIL_SENT","ON_ABANDONED_CHECKOUT_RECOVERY_ATTEMPT_SUCCEEDED","ON_CHARGEBACK_CLOSED","ON_DELIVERY_ITEM_EXPIRED","ON_DELIVERY_ITEM_RENEWED"],"type":"string","description":"The type of webhook event"}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.paynow.gg/webhooks/webhook-events/models.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
