Skip to main content

Update order

PATCH 

/orders/:id

Updates an order with a CREATED or APPROVED status. You cannot update an order with the COMPLETED status.

To make an update, you must provide a reference_id. If you omit this value with an order that contains only one purchase unit, PayPal sets the value to default which enables you to use the path: "/purchase_units/@reference_id=='default'/{attribute-or-object}". Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout.

Note: For error handling and troubleshooting, see Orders v2 errors.
Patchable attributes or objects:

AttributeOpNotes
intentreplace
payerreplace, addUsing replace op for payer will replace the whole payer object with the value sent in request.
purchase_unitsreplace, add
purchase_units[].custom_idreplace, add, remove
purchase_units[].descriptionreplace, add, remove
purchase_units[].payee.emailreplace
purchase_units[].shipping.namereplace, add
purchase_units[].shipping.email_addressreplace, add
purchase_units[].shipping.phone_numberreplace, add
purchase_units[].shipping.optionsreplace, add
purchase_units[].shipping.addressreplace, add
purchase_units[].shipping.typereplace, add
purchase_units[].soft_descriptorreplace, remove
purchase_units[].amountreplace
purchase_units[].itemsreplace, add, remove
purchase_units[].invoice_idreplace, add, remove
purchase_units[].payment_instructionreplace
purchase_units[].payment_instruction.disbursement_modereplaceBy default, disbursement_mode is INSTANT.
purchase_units[].payment_instruction.payee_receivable_fx_rate_idreplace, add, remove
purchase_units[].payment_instruction.platform_feesreplace, add, remove
purchase_units[].supplementary_data.airlinereplace, add, remove
purchase_units[].supplementary_data.cardreplace, add, remove
application_context.client_configurationreplace, add

Request

Path Parameters

    id stringrequired

    Possible values: non-empty and <= 36 characters, Value must match regular expression ^[A-Z0-9]+$

    The ID of the order to update.

Header Parameters

    Authorization stringrequired

    To make REST API calls, include the bearer token in this header with the Bearer authentication scheme. The value is Bearer <Access-Token> or Basic <client_id:secret>.

    PayPal-Auth-Assertion string

    An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion.

    Content-Type stringrequired

    Possible values: non-empty and <= 255 characters, Value must match regular expression ^[A-Za-z0-9/+-]+$

    The media type. Required for operations with a request body. The value is application/<format>, where format is json.

Body

    any

Responses

A successful request returns the HTTP 204 No Content status code with an empty object in the JSON response body.

Loading...