{
    "componentChunkName": "component---src-templates-article-page-template-js",
    "path": "/concepts/pricing/",
    "result": {"data":{"markdownRemark":{"frontmatter":{"title":"Pricing","slug":"pricing","updated":"2020-06-25T00:00:00.000Z","category":"concepts-pricing-and-commissions","ingress":"Flex allows lots of flexibility for your providers in terms of how they can set their pricing. This guide walks you through how price is defined in Flex.","skills":null},"htmlAst":{"type":"root","children":[{"type":"element","tagName":"h2","properties":{"id":"what-kind-of-pricing-can-you-achieve-with-flex","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#what-kind-of-pricing-can-you-achieve-with-flex","ariaLabel":"what kind of pricing can you achieve with flex permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"What kind of pricing can you achieve with Flex"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"It's common for a marketplace to base it's pricing on the length of a\nbooking, on a number of booked units, or the combination of these two.\nWith Flex you can design your pricing using these two parameters but the\npricing can also be extended to support more complicated business models\nor even be replaced with a completely different model altogether. Here\nare some examples of common pricing schemes you might want to add on top\nof the regular listing price."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Add-ons."}]},{"type":"text","value":" Upsell additions on top of the regular price. Examples:\ncleaning fee, insurance, delivery."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Discount based on booking length."}]},{"type":"text","value":" An example: daily price is\n$20, weekly\nprice $70, and monthly price $200. Another example: 20%\ndiscount on daily rate for bookings of 5 or more days, 30% discount on\nbookings of 10 or more days, and so on."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Taxes."}]},{"type":"text","value":" Add any type of tax rate to the listing price and display\nthem as separate line items in the receipt."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Offer multiple pricing packages in the same listing."}]},{"type":"text","value":" An example: a\nhairdresser offers both haircuts and hair dying."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Seasonal pricing."}]},{"type":"text","value":" Examples: weekends cost more than weekdays,\nsummers cost more than winters, and so on."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Quantity discount."}]},{"type":"text","value":" An example: booking a room for two people costs\n$100,\nand after that, each additional person costs $20 extra."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"All of these options can be achieved with the Flex pricing\nfunctionality. In this article, we'll look a bit closer at how pricing\nworks in Flex and how pricing schemes can be designed."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"pricing-terminology","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#pricing-terminology","ariaLabel":"pricing terminology permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Pricing terminology"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Line item:"}]},{"type":"text","value":" Something that affects transaction price, for example,\na booking for two nights, a cleaning fee, or a customer commission.\nThink of as a line in a receipt."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Line total:"}]},{"type":"text","value":" Total price of a line item."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Payin total:"}]},{"type":"text","value":" Amount of money that a customer pays for a\ntransaction. The value is the sum of line items that apply to the\ncustomer."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Payout total:"}]},{"type":"text","value":" Amount of money a provider receives from a\ntransaction. The value is the sum of line items that apply to the\nprovider."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"line-items","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#line-items","ariaLabel":"line items permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Line items"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"In Flex, the total price of a transaction is defined by its "},{"type":"element","tagName":"em","properties":{},"children":[{"type":"text","value":"line\nitems"}]},{"type":"text","value":". Line items describe what is included in a transaction. It can be\na varying set of things from the number of booked units to customer and\nprovider commissions, add-ons, discounts, or payment refunds."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"A transaction gets its price from the\n"},{"type":"element","tagName":"a","properties":{"href":"/docs/legacy/references/transaction-process-actions/#actionprivileged-set-line-items"},"children":[{"type":"text","value":"privileged-set-line-items"}]},{"type":"text","value":"\naction . The action takes a list of line items as a parameter. Remember,\nthat the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"privileged-set-line-items"}]},{"type":"text","value":" action needs to be placed in\n"},{"type":"element","tagName":"a","properties":{"href":"/docs/legacy/concepts/privileged-transitions/"},"children":[{"type":"text","value":"a privileged transition"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Every line item has a unit price and one of the following attributes:\n"},{"type":"element","tagName":"em","properties":{},"children":[{"type":"text","value":"quantity"}]},{"type":"text","value":" or "},{"type":"element","tagName":"em","properties":{},"children":[{"type":"text","value":"percentage"}]},{"type":"text","value":". The quantity attribute can be used to denote\nthe number of booked units, like the number of booked nights. Quantity\ncan also be defined as a multiplication of "},{"type":"element","tagName":"em","properties":{},"children":[{"type":"text","value":"units"}]},{"type":"text","value":" and "},{"type":"element","tagName":"em","properties":{},"children":[{"type":"text","value":"seats"}]},{"type":"text","value":". The\npercentage param is used when modeling commissions for example. Based on\nthese attributes a line total is calculated for each line item. Line\ntotals then define the total payin and payout sums of the transaction."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The following arguments can be passed in a line item to the Flex API:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"code"}]},{"type":"text","value":": A string that identifies the line item. Must start with\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"line-item/"}]},{"type":"text","value":", for example, "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"line-item/cleaning-fee"}]},{"type":"text","value":", mandatory."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"unitPrice"}]},{"type":"text","value":": Price of a single unit of the line item, mandatory."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"lineTotal"}]},{"type":"text","value":": Total value of the line item, can be negative."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"quantity"}]},{"type":"text","value":": Total amount of units. Can be defined explicitly or\ncalculated by multiplying "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"units"}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"seats"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"percentage"}]},{"type":"text","value":": A percentage that is used to calculate the line total."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"seats"}]},{"type":"text","value":": Number of seats that are used to calculate the quantity."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"units"}]},{"type":"text","value":": Number of units. In combination with seats, forms quantity."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"includeFor"}]},{"type":"text","value":": An array containing strings "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"customer"}]},{"type":"text","value":" and/or\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"provider"}]},{"type":"text","value":". Defines which party of a transaction the line item applies\nto."}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"lineTotal"}]},{"type":"text","value":" is not a mandatory parameter. Flex will calculate the\nline total and if one is provided, it will validate the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"lineTotal"}]},{"type":"text","value":"\nparameter against the calculated value."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"calculating-the-price","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#calculating-the-price","ariaLabel":"calculating the price permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Calculating the price"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The price of a line item can be calculated in three ways, combining the\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"unitPrice"}]},{"type":"text","value":" with either "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"quantity"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"seats"}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"units"}]},{"type":"text","value":", or\n"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"percentage"}]},{"type":"text","value":". The following tables provide examples of all price\ncalculation types:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"unitprice-with-quantity","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#unitprice-with-quantity","ariaLabel":"unitprice with quantity permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"unitPrice with quantity"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Use unit price and quantity to calculate the price when you want to\nmultiply a fixed fee with a quantity."}]},{"type":"text","value":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"},{"type":"element","tagName":"table","properties":{},"children":[{"type":"element","tagName":"thead","properties":{},"children":[{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"th","properties":{"align":"left"},"children":[{"type":"text","value":"code"}]},{"type":"element","tagName":"th","properties":{"align":"left"},"children":[{"type":"text","value":"unitPrice"}]},{"type":"element","tagName":"th","properties":{"align":"left"},"children":[{"type":"text","value":"quantity"}]},{"type":"element","tagName":"th","properties":{"align":"left"},"children":[{"type":"text","value":"lineTotal"}]},{"type":"element","tagName":"th","properties":{"align":"left"},"children":[{"type":"text","value":"includeFor"}]}]}]},{"type":"element","tagName":"tbody","properties":{},"children":[{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"\"line-item/nights\""}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"new Money(5000, \"USD\")"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"3"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"new Money(15000, \"USD\")"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"[\"customer\", \"provider\"]"}]}]},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"\"line-item/cleaning-fee\""}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"new Money(7500, \"USD\")"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"1"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"new Money(7500, \"USD\")"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"[\"customer\", \"provider\"]"}]}]},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"\"line-item/fixed-customer-commission\""}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"new Money(2500, \"USD\")"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"1"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"new Money(2500, \"USD\")"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"[\"customer\"]"}]}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"lineTotal"}]},{"type":"text","value":" is calculated as "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"unitPrice * quantity"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"unitprice-with-seats-and-units","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#unitprice-with-seats-and-units","ariaLabel":"unitprice with seats and units permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"unitPrice with seats and units"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Use unit price combined with seats and units when the number of\nparticipants affects the price."}]},{"type":"text","value":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"},{"type":"element","tagName":"table","properties":{},"children":[{"type":"element","tagName":"thead","properties":{},"children":[{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"th","properties":{"align":"left"},"children":[{"type":"text","value":"code"}]},{"type":"element","tagName":"th","properties":{"align":"left"},"children":[{"type":"text","value":"unitPrice"}]},{"type":"element","tagName":"th","properties":{"align":"left"},"children":[{"type":"text","value":"seats"}]},{"type":"element","tagName":"th","properties":{"align":"left"},"children":[{"type":"text","value":"units"}]},{"type":"element","tagName":"th","properties":{"align":"left"},"children":[{"type":"text","value":"lineTotal"}]},{"type":"element","tagName":"th","properties":{"align":"left"},"children":[{"type":"text","value":"includeFor"}]}]}]},{"type":"element","tagName":"tbody","properties":{},"children":[{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"\"line-item/nights\""}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"new Money(5000, \"USD\")"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"3"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"2"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"new Money(30000, \"USD\")"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"[\"customer\", \"provider\"]"}]}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"lineTotal"}]},{"type":"text","value":" is calculated as "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"unitPrice * seats * units"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{"id":"unitprice-and-percentage","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#unitprice-and-percentage","ariaLabel":"unitprice and percentage permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"unitPrice and percentage"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Use unit price and percentage when the line total is calculated as a\npercentage of some other (sub)total."}]},{"type":"text","value":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"},{"type":"element","tagName":"table","properties":{},"children":[{"type":"element","tagName":"thead","properties":{},"children":[{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"th","properties":{"align":"left"},"children":[{"type":"text","value":"code"}]},{"type":"element","tagName":"th","properties":{"align":"left"},"children":[{"type":"text","value":"unitPrice"}]},{"type":"element","tagName":"th","properties":{"align":"left"},"children":[{"type":"text","value":"percentage"}]},{"type":"element","tagName":"th","properties":{"align":"left"},"children":[{"type":"text","value":"lineTotal"}]},{"type":"element","tagName":"th","properties":{"align":"left"},"children":[{"type":"text","value":"includeFor"}]}]}]},{"type":"element","tagName":"tbody","properties":{},"children":[{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"\"line-item/coupon-discount\""}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"new Money(50000, \"USD\")"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"-15"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"new Money(-7500, \"USD\")"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"[\"customer\", \"provider\"]"}]}]},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"\"line-item/customer-commission\""}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"new Money(50000, \"USD\")"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"15"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"new Money(7500, \"USD\")"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"[\"customer\"]"}]}]},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"\"line-item/provider-commission\""}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"new Money(50000, \"USD\")"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"-15"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"new Money(-7500, \"USD\")"}]},{"type":"element","tagName":"td","properties":{"align":"left"},"children":[{"type":"text","value":"[\"provider\"]"}]}]}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"lineTotal"}]},{"type":"text","value":" is calculated as "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"unitPrice * percentage / 100"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h2","properties":{"id":"refunds","style":"position:relative;"},"children":[{"type":"element","tagName":"a","properties":{"href":"#refunds","ariaLabel":"refunds permalink","className":["anchor","before"]},"children":[{"type":"element","tagName":"svg","properties":{"ariaHidden":"true","focusable":"false","height":"16","version":"1.1","viewBox":"0 0 16 16","width":"16"},"children":[{"type":"element","tagName":"path","properties":{"fillRule":"evenodd","d":"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"},"children":[]}]}]},{"type":"text","value":"Refunds"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Refunds are created with the\n"},{"type":"element","tagName":"a","properties":{"href":"/docs/legacy/references/transaction-process-actions/#actioncalculate-full-refund"},"children":[{"type":"text","value":"calculate-full-refund"}]},{"type":"text","value":"\naction. It sets transaction pay in and pay out amounts to zero and\ncreates reverse line items that undo all the previous line items. Note,\nthat the "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"calculate-full-refund"}]},{"type":"text","value":" action can be run only once during a\ntransaction."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The action calculates a full refund. Partial refunds are not supported\nby Flex at the moment."}]}],"data":{"quirksMode":false}},"headings":[{"value":"What kind of pricing can you achieve with Flex","depth":2},{"value":"Pricing terminology","depth":2},{"value":"Line items","depth":2},{"value":"Calculating the price","depth":2},{"value":"unitPrice with quantity","depth":3},{"value":"unitPrice with seats and units","depth":3},{"value":"unitPrice and percentage","depth":3},{"value":"Refunds","depth":2}]}},"pageContext":{"slug":"pricing","category":"concepts-pricing-and-commissions"}},
    "staticQueryHashes": ["3794076007","439097193","717698143"]}