When to implement dynamic pricing
This feature will update the price shown to the user of the ticket(s), and let the user to proceed with placing an order. Price increases or decreases are allowed. You would use dynamic pricing when:
- You offer a discount based on the number or combination of tickets
- The price has changed since you last updated the price through Feeds or Real-Time Updates
Changes to CheckOrderFulfillabilityResponse
If you are able to fulfill the order and the only difference between the request
and response is the price, return OrderFulfillabilityResult
set to CAN_FULFILL
and the ItemFulfillabilityResult set to
CAN_FULFILL
(do not use INCORRECT_PRICE
).
If the change in price is within the allowed range, we will show the user a message alerting them that the price has changed and show them the new price. If the change in price is too drastic or if your response is incorrect (such as using the wrong WarningReason or not including a requested TicketType) we will fail the request on our end (even if you return a successful response). You will be able to see these failed requests in the Partner Portal.
The two sections below will go into further detail about the changes required for the two use cases:
- Quantity or cart based discount pricing
- Price changes / fluctuations
These use cases for dynamic pricing have different implementation requirements.
Quantity discount price changes
Price changes that occur due to the order placed (such as quantity discounts), and not changes to specific prices are supported. For example, if you offer a $2 discount per ticket if a user purchases 5 or more tickets, you will be able to specify that discount as part of the CheckOrderFulfillability Response. In this case, set the new price for each line item in the LineItem price field and populate WarningReason within the LineItem message to the reason that corresponds with the change.
Example CheckOrderFulfillabilityRequest and CheckOrderFulfillabilityResponse
Request
{ "item": [ { "duration_sec": "7200", "price": { "currency_code": "USD", "price_micros": "35000000" }, "service_id": "escape_room", "start_sec": "1567000800", "tickets": [ { "count": 10, "ticket_id": "adult" } ] } ], "merchant_id": "awesome_escape_rooms" }
Response
"fulfillability": { "result": "CAN_FULFILL", "item_fulfillability": [ { "item": { "service_id": "escape_room", "start_sec": "1567000800", "duration_sec": "7200", "tickets": [ { "ticket_id": "adult", "count": 10 } ], "price": { "price_micros": "30000000", "currency_code": "USD" }, "warning_reason": "PRICE_DECREASE" }, "result": "CAN_FULFILL" } ] } }
This response indicates that the price is now $30 even though the original price
was $35. To signal that the price has changed, the response includes the warning_reason
which is set to PRICE_DECREASE
.
Individual ticket type price fluctuations
If the price of a single ticket type changes, please implement the following:
- Set the new price for each line item in the LineItem price field.
- Populate
ticket_type
within LineItemFulfillability with all ticket types contained within the original request (including all ticket types even if the price has not changed for that specific ticket type). This is required should the order increase in price. - Populate
warning_reason
within LineItem and clearly indicate the reason for the change in price.
Example CheckOrderFulfillabilityRequest and CheckOrderFulfillabilityResponse
Request
{ "item": [ { "duration_sec": "7200", "price": { "currency_code": "USD", "price_micros": "28000000" }, "service_id": "concert", "start_sec": "1567000800", "tickets": [ { "count": 2, "ticket_id": "adult" } ] } ], "merchant_id": "concert_venue" }
Response
{ "fulfillability": { "result": "CAN_FULFILL", "item_fulfillability": [ { "item": { "service_id": "concert", "start_sec": "1567000800", "duration_sec": "7200", "tickets": [ { "ticket_id": "adult", "count": 2 } ], "price": { "price_micros": "30000000", "currency_code": "USD" }, "warning_reason": "PRICE_INCREASE" }, "result": "CAN_FULFILL", "ticket_type": [ { "ticket_type_id": "adult", "price": { "price_micros": 15000000, "currency_code": "USD" } } ] } ] } }