Itemized Fees and Discounts Overview
We’ve updated the create_payment_session API to accept
additional details about any fees and discounts you’re applying, at both the order-level and item-level. This allows
us to display the information provided on our payment page to provide a better breakdown of the total payment amount
to users.
All fields added are optional, and should only be provided if the partner is applying discounts or additional charges
- all existing requests will continue to function as usual.
This page gives a general overview of the changes required to your requests. Our checkout page will display an
itemized breakdown of each item and the cart if any itemized info is provided. Partners can also test that we are
storing the information on a payment by using the
payment_session_status or
list_payment_sessions APIs. These have been updated to
return the amount_details objects provided on payment creation.
When providing amount details, they must satisfy the following equation:

Example Scenario: Order-Level Charges
Let’s walk through an example scenario:
- The total payment amount is $1000
- There are 3 items being purchased:
- 1x “Item A” with a unit price of $55
- A $45 additional charge named “Color Upgrade”
- A $10 discount named “Ten Dollars Off”
- 2x “Item B” with a unit price of $150
- 4x “Item C” with a unit price of $20
- A $5 discount named “Summer Sale”
- 1x “Item A” with a unit price of $55
- There is a tax of $50, a handling fee of $100, and a shipping cost of $275 applied to the order
To provide the 3 additional charges to us for display on our payment page, the request would include the fields below (note that you will be providing additional fields in the request - this is a slimmed down version for clarity).
In this example scenario, there are no discounts provided at the order level, so total_discounts and
discounts_details are omitted. There are also no item level fees or discounts for Item B, so amount_details is
omitted from that order item. With this information, we can display each additional charge on our payment page.
The important points to note are:
- Each additional charge detail
amountmust be- Partners are allowed to provide an additional charge with an amount of 0 to indicate that the charge is free
- All additional charge amounts sum up to the
total_additional_chargesfield - The sum of each item’s subtotal (quantity × price + item-level charges - item-level discounts) + any order-level
additional charges - any order-level discounts must equal the payment’s
total_amount
For the example scenario above:
Invalid info provided
If the amount_details objects provided are not valid in any way, you will receive an InvalidRequestParameter
error with a message indicating the issue. If the total_amount does not equal the expected amount, you will receive
a TotalAmountInvalid error.