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:
Attribute | Op | Notes |
---|---|---|
intent | replace | |
payer | replace, add | Using replace op for payer will replace the whole payer object with the value sent in request. |
purchase_units | replace, add | |
purchase_units[].custom_id | replace, add, remove | |
purchase_units[].description | replace, add, remove | |
purchase_units[].payee.email | replace | |
purchase_units[].shipping.name | replace, add | |
purchase_units[].shipping.email_address | replace, add | |
purchase_units[].shipping.phone_number | replace, add | |
purchase_units[].shipping.options | replace, add | |
purchase_units[].shipping.address | replace, add | |
purchase_units[].shipping.type | replace, add | |
purchase_units[].soft_descriptor | replace, remove | |
purchase_units[].amount | replace | |
purchase_units[].items | replace, add, remove | |
purchase_units[].invoice_id | replace, add, remove | |
purchase_units[].payment_instruction | replace | |
purchase_units[].payment_instruction.disbursement_mode | replace | By default, disbursement_mode is INSTANT . |
purchase_units[].payment_instruction.payee_receivable_fx_rate_id | replace, add, remove | |
purchase_units[].payment_instruction.platform_fees | replace, add, remove | |
purchase_units[].supplementary_data.airline | replace, add, remove | |
purchase_units[].supplementary_data.card | replace, add, remove | |
application_context.client_configuration | replace, add |
Request
Path Parameters
Possible values: non-empty
and <= 36 characters
, Value must match regular expression ^[A-Z0-9]+$
The ID of the order to update.
Header Parameters
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>
.
An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion.
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
.
- application/json
Body
any
Responses
- 204
- 400
- 401
- 404
- 422
- default
A successful request returns the HTTP 204 No Content
status code with an empty object in the JSON response body.
Request is not well-formed, syntactically incorrect, or violates schema.
- application/json
- Schema
- Example (from schema)
Schema
The human-readable, unique name of the error.
The message that describes the error.
The PayPal internal ID. Used for correlation purposes.
An array of additional details about the error.
An array of request-related HATEOAS links.
{
"name": "string",
"message": "string",
"debug_id": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
],
"description": "string"
}
],
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}
Authentication failed due to missing authorization header, or invalid authentication credentials.
- application/json
- Schema
- Example (from schema)
Schema
The human-readable, unique name of the error.
The message that describes the error.
The PayPal internal ID. Used for correlation purposes.
An array of additional details about the error.
An array of request-related HATEOAS links.
{
"name": "string",
"message": "string",
"debug_id": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
],
"description": "string"
}
],
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}
The specified resource does not exist.
- application/json
- Schema
- Example (from schema)
Schema
The human-readable, unique name of the error.
The message that describes the error.
The PayPal internal ID. Used for correlation purposes.
An array of additional details about the error.
An array of request-related HATEOAS links.
{
"name": "string",
"message": "string",
"debug_id": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
],
"description": "string"
}
],
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}
The requested action could not be performed, semantically incorrect, or failed business validation.
- application/json
- Schema
- Example (from schema)
Schema
The human-readable, unique name of the error.
The message that describes the error.
The PayPal internal ID. Used for correlation purposes.
An array of additional details about the error.
An array of request-related HATEOAS links.
{
"name": "string",
"message": "string",
"debug_id": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
],
"description": "string"
}
],
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}
The error response.
- application/json
- Schema
- Example (from schema)
Schema
The human-readable, unique name of the error.
The message that describes the error.
The PayPal internal ID. Used for correlation purposes.
An array of additional details about the error.
An array of request-related HATEOAS links.
{
"name": "string",
"message": "string",
"debug_id": "string",
"details": [
{
"field": "string",
"value": "string",
"location": "body",
"issue": "string",
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
],
"description": "string"
}
],
"links": [
{
"href": "string",
"rel": "string",
"method": "GET"
}
]
}