forked from LiveCarta/PayPal-PHP-Server-SDK
2.3 KiB
2.3 KiB
Amount Breakdown
The breakdown of the amount. Breakdown provides details such as total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.
Structure
AmountBreakdown
Fields
| Name | Type | Tags | Description | Getter | Setter |
|---|---|---|---|---|---|
itemTotal |
?Money |
Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getItemTotal(): ?Money | setItemTotal(?Money itemTotal): void |
shipping |
?Money |
Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getShipping(): ?Money | setShipping(?Money shipping): void |
handling |
?Money |
Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getHandling(): ?Money | setHandling(?Money handling): void |
taxTotal |
?Money |
Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getTaxTotal(): ?Money | setTaxTotal(?Money taxTotal): void |
insurance |
?Money |
Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getInsurance(): ?Money | setInsurance(?Money insurance): void |
shippingDiscount |
?Money |
Optional | The currency and amount for a financial transaction, such as a balance or payment due. | getShippingDiscount(): ?Money | setShippingDiscount(?Money shippingDiscount): void |
discount |
?Money |
Optional | The discount amount and currency code. For list of supported currencies and decimal precision, see the PayPal REST APIs Currency Codes. | getDiscount(): ?Money | setDiscount(?Money discount): void |
Example (as JSON)
{
"item_total": {
"currency_code": "currency_code0",
"value": "value6"
},
"shipping": {
"currency_code": "currency_code0",
"value": "value6"
},
"handling": {
"currency_code": "currency_code2",
"value": "value8"
},
"tax_total": {
"currency_code": "currency_code4",
"value": "value0"
},
"insurance": {
"currency_code": "currency_code2",
"value": "value8"
}
}