{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/purchase_unit", "title": "Purchase Unit", "type": "object", "description": "The purchase unit details. Used to capture 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`.
Note: If there are multiple purchase units, reference_id is required for each purchase unit.",
"minLength": 1,
"maxLength": 256
},
"amount": {
"$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.",
"minLength": 1,
"maxLength": 127
},
"custom_id": {
"type": "string",
"description": "The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports.",
"minLength": 1,
"maxLength": 127
},
"invoice_id": {
"type": "string",
"description": "The API caller-provided external invoice ID for this order.",
"minLength": 1,
"maxLength": 127
},
"id": {
"type": "string",
"description": "The PayPal-generated ID for the purchase unit. This ID appears in both the payer's transaction history and the emails that the payer receives. In addition, this ID is available in transaction and settlement reports that merchants and API callers can use to reconcile transactions. This ID is only available when an order is saved by calling v2/checkout/orders/id/save.",
"minLength": 1,
"maxLength": 19
},
"soft_descriptor": {
"type": "string",
"description": "The payment descriptor on account transactions on the customer's credit card statement, that PayPal sends to processors. The maximum length of the soft descriptor information that you can pass in the API field is 22 characters, in the following format:22 - len(PAYPAL * (8)) - len(Descriptor in Payment Receiving Preferences of Merchant account + 1)The PAYPAL prefix uses 8 characters.