{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/purchase_unit_request", "title": "Purchase Unit Request", "type": "object", "description": "The purchase unit request. Includes required information for the payment contract.", "properties": { "reference_id": { "type": "string", "description": "The API caller-provided external ID for the purchase unit. Required for multiple purchase units when you must update the order through `PATCH`. If you omit this value and the order contains only one purchase unit, PayPal sets this value to `default`.", "minLength": 1, "maxLength": 256 }, "amount": { "description": "The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.
If you specify `amount.breakdown`, the amount equals `item_total` plus `tax_total` plus `shipping` plus `handling` plus `insurance` minus `shipping_discount` minus discount.
The amount must be a positive number. The `amount.value` field supports up to 15 digits preceding the decimal. For a list of supported currencies, decimal precision, and maximum charge amount, see the PayPal REST APIs Currency Codes.", "$ref": "#/components/schemas/amount_with_breakdown" }, "payee": { "description": "The merchant who receives payment for this transaction.", "$ref": "#/components/schemas/payee" }, "payment_instruction": { "$ref": "#/components/schemas/payment_instruction" }, "description": { "type": "string", "description": "The purchase description. The maximum length of the character is dependent on the type of characters used. The character length is specified assuming a US ASCII character. Depending on type of character; (e.g. accented character, Japanese characters) the number of characters that that can be specified as input might not equal the permissible max length.", "minLength": 1, "maxLength": 127 }, "custom_id": { "type": "string", "description": "The API caller-provided external ID. Used to reconcile client transactions with PayPal transactions. Appears in transaction and settlement reports but is not visible to the payer.", "minLength": 1, "maxLength": 127 }, "invoice_id": { "type": "string", "description": "The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.", "minLength": 1, "maxLength": 127 }, "soft_descriptor": { "type": "string", "description": "The soft descriptor is the dynamic text used to construct the statement descriptor that appears on a payer's card statement.

If an Order is paid using the \"PayPal Wallet\", the statement descriptor will appear in following format on the payer's card statement: PAYPAL_prefix+(space)+merchant_descriptor+(space)+ soft_descriptor
Note: The merchant descriptor is the descriptor of the merchant\u2019s payment receiving preferences which can be seen by logging into the merchant account https://www.sandbox.paypal.com/businessprofile/settings/info/edit
The PAYPAL prefix uses 8 characters. Only the first 22 characters will be displayed in the statement.
For example, if:Then, the statement descriptor on the card is PAYPAL * Janes Gift 80.", "minLength": 1, "maxLength": 22 }, "items": { "type": "array", "description": "An array of items that the customer purchases from the merchant.", "items": { "description": "The item.", "$ref": "#/components/schemas/item" } }, "shipping": { "description": "The name and address of the person to whom to ship the items.", "$ref": "#/components/schemas/shipping_detail" }, "supplementary_data": { "description": "Contains Supplementary Data.", "$ref": "#/components/schemas/supplementary_data" } }, "required": [ "amount" ] }