curl --request POST \
--url https://api-m.sandbox.paypal.com/v2/checkout/orders/order-update-callback \
--header 'Content-Type: application/json' \
--data '
{
"shipping_address": {
"country_code": "<string>",
"admin_area_2": "<string>",
"admin_area_1": "<string>",
"postal_code": "<string>"
},
"purchase_units": [
{
"amount": {
"currency_code": "<string>",
"value": "<string>",
"breakdown": {}
},
"reference_id": "<string>",
"payee": {
"email_address": "<string>",
"merchant_id": "<string>"
},
"payment_instruction": {
"platform_fees": [
{
"amount": {
"currency_code": "<string>",
"value": "<string>"
},
"payee": {
"email_address": "<string>",
"merchant_id": "<string>"
}
}
],
"disbursement_mode": "INSTANT",
"payee_pricing_tier_id": "<string>",
"payee_receivable_fx_rate_id": "<string>"
},
"description": "<string>",
"custom_id": "<string>",
"invoice_id": "<string>",
"soft_descriptor": "<string>",
"items": [
{
"name": "<string>",
"unit_amount": {
"currency_code": "<string>",
"value": "<string>"
},
"quantity": "<string>",
"description": "<string>",
"sku": "<string>",
"url": "<string>",
"image_url": "<string>"
}
],
"shipping": {
"name": {
"full_name": "<string>"
},
"email_address": "<string>",
"options": [
{
"id": "<string>",
"label": "<string>",
"selected": true
}
]
},
"supplementary_data": {
"card": {
"level_2": {
"invoice_id": "<string>"
},
"level_3": {
"ships_from_postal_code": "<string>",
"line_items": [
{
"name": "<string>",
"quantity": "<string>",
"description": "<string>",
"sku": "<string>",
"url": "<string>",
"image_url": "<string>",
"commodity_code": "<string>",
"unit_of_measure": "<string>"
}
]
}
},
"risk": {
"customer": {
"ip_address": "<string>"
}
}
}
}
]
}
'{
"id": "<string>",
"purchase_units": {
"reference_id": "<string>",
"amount": {
"currency_code": "<string>",
"value": "<string>",
"breakdown": {
"item_total": {
"currency_code": "<string>",
"value": "<string>"
},
"shipping": {
"currency_code": "<string>",
"value": "<string>"
},
"handling": {
"currency_code": "<string>",
"value": "<string>"
},
"tax_total": {
"currency_code": "<string>",
"value": "<string>"
},
"insurance": {
"currency_code": "<string>",
"value": "<string>"
},
"shipping_discount": {
"currency_code": "<string>",
"value": "<string>"
},
"discount": {
"currency_code": "<string>",
"value": "<string>"
}
}
},
"shipping_options": [
{
"id": "<string>",
"label": "<string>",
"selected": true,
"amount": {
"currency_code": "<string>",
"value": "<string>"
}
}
]
}
}{
"name": "INVALID_REQUEST",
"message": "Request is not well-formed, syntactically incorrect, or violates schema.",
"details": [
{
"issue": "<string>",
"field": "<string>",
"value": "<string>",
"location": "body",
"description": "<string>"
}
],
"debug_id": "<string>",
"links": [
{
"href": "<string>",
"rel": "<string>"
}
]
}{
"name": "NOT_AUTHORIZED",
"message": "Authorization failed due to insufficient permissions.",
"details": [
{
"issue": "<string>",
"field": "<string>",
"value": "<string>",
"location": "body",
"description": "<string>"
}
],
"debug_id": "<string>",
"links": [
{
"href": "<string>",
"rel": "<string>"
}
]
}{
"name": "UNPROCESSABLE_ENTITY",
"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
"details": [
{
"issue": "<string>",
"field": "<string>",
"value": "<string>",
"location": "body",
"description": "<string>"
}
],
"debug_id": "<string>",
"links": [
{
"href": "<string>",
"rel": "<string>"
}
]
}{
"name": "INTERNAL_SERVER_ERROR",
"message": "An internal server error occurred.",
"debug_id": "90957fca61718",
"links": [
{
"href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR",
"rel": "information_link"
}
]
}{
"name": "INVALID_REQUEST",
"message": "Request is not well-formed, syntactically incorrect, or violates schema.",
"details": [
{
"issue": "<string>",
"field": "<string>",
"value": "<string>",
"location": "body",
"description": "<string>"
}
],
"debug_id": "<string>",
"links": [
{
"href": "<string>",
"rel": "<string>"
}
]
}Receive updated order information via callback URL
The documentation for this ‘endpoint’ is different from the other endpoints under v2 Orders. For this endpoint the role of client and server is reversed. The client sending the request is PayPal, and the server sending the response is the merchant. In the request, PayPal will send the buyer’s redacted shipping address and selected shipping option to the callback URL defined the create order request. The response from the merchant will update the Orders resource.
curl --request POST \
--url https://api-m.sandbox.paypal.com/v2/checkout/orders/order-update-callback \
--header 'Content-Type: application/json' \
--data '
{
"shipping_address": {
"country_code": "<string>",
"admin_area_2": "<string>",
"admin_area_1": "<string>",
"postal_code": "<string>"
},
"purchase_units": [
{
"amount": {
"currency_code": "<string>",
"value": "<string>",
"breakdown": {}
},
"reference_id": "<string>",
"payee": {
"email_address": "<string>",
"merchant_id": "<string>"
},
"payment_instruction": {
"platform_fees": [
{
"amount": {
"currency_code": "<string>",
"value": "<string>"
},
"payee": {
"email_address": "<string>",
"merchant_id": "<string>"
}
}
],
"disbursement_mode": "INSTANT",
"payee_pricing_tier_id": "<string>",
"payee_receivable_fx_rate_id": "<string>"
},
"description": "<string>",
"custom_id": "<string>",
"invoice_id": "<string>",
"soft_descriptor": "<string>",
"items": [
{
"name": "<string>",
"unit_amount": {
"currency_code": "<string>",
"value": "<string>"
},
"quantity": "<string>",
"description": "<string>",
"sku": "<string>",
"url": "<string>",
"image_url": "<string>"
}
],
"shipping": {
"name": {
"full_name": "<string>"
},
"email_address": "<string>",
"options": [
{
"id": "<string>",
"label": "<string>",
"selected": true
}
]
},
"supplementary_data": {
"card": {
"level_2": {
"invoice_id": "<string>"
},
"level_3": {
"ships_from_postal_code": "<string>",
"line_items": [
{
"name": "<string>",
"quantity": "<string>",
"description": "<string>",
"sku": "<string>",
"url": "<string>",
"image_url": "<string>",
"commodity_code": "<string>",
"unit_of_measure": "<string>"
}
]
}
},
"risk": {
"customer": {
"ip_address": "<string>"
}
}
}
}
]
}
'{
"id": "<string>",
"purchase_units": {
"reference_id": "<string>",
"amount": {
"currency_code": "<string>",
"value": "<string>",
"breakdown": {
"item_total": {
"currency_code": "<string>",
"value": "<string>"
},
"shipping": {
"currency_code": "<string>",
"value": "<string>"
},
"handling": {
"currency_code": "<string>",
"value": "<string>"
},
"tax_total": {
"currency_code": "<string>",
"value": "<string>"
},
"insurance": {
"currency_code": "<string>",
"value": "<string>"
},
"shipping_discount": {
"currency_code": "<string>",
"value": "<string>"
},
"discount": {
"currency_code": "<string>",
"value": "<string>"
}
}
},
"shipping_options": [
{
"id": "<string>",
"label": "<string>",
"selected": true,
"amount": {
"currency_code": "<string>",
"value": "<string>"
}
}
]
}
}{
"name": "INVALID_REQUEST",
"message": "Request is not well-formed, syntactically incorrect, or violates schema.",
"details": [
{
"issue": "<string>",
"field": "<string>",
"value": "<string>",
"location": "body",
"description": "<string>"
}
],
"debug_id": "<string>",
"links": [
{
"href": "<string>",
"rel": "<string>"
}
]
}{
"name": "NOT_AUTHORIZED",
"message": "Authorization failed due to insufficient permissions.",
"details": [
{
"issue": "<string>",
"field": "<string>",
"value": "<string>",
"location": "body",
"description": "<string>"
}
],
"debug_id": "<string>",
"links": [
{
"href": "<string>",
"rel": "<string>"
}
]
}{
"name": "UNPROCESSABLE_ENTITY",
"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
"details": [
{
"issue": "<string>",
"field": "<string>",
"value": "<string>",
"location": "body",
"description": "<string>"
}
],
"debug_id": "<string>",
"links": [
{
"href": "<string>",
"rel": "<string>"
}
]
}{
"name": "INTERNAL_SERVER_ERROR",
"message": "An internal server error occurred.",
"debug_id": "90957fca61718",
"links": [
{
"href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR",
"rel": "information_link"
}
]
}{
"name": "INVALID_REQUEST",
"message": "Request is not well-formed, syntactically incorrect, or violates schema.",
"details": [
{
"issue": "<string>",
"field": "<string>",
"value": "<string>",
"location": "body",
"description": "<string>"
}
],
"debug_id": "<string>",
"links": [
{
"href": "<string>",
"rel": "<string>"
}
]
}Body
Shipping Options Callback request. This will be implemented by the merchants.
The portable international postal address. Maps to AddressValidationMetadata and HTML 5.1 Autofilling form controls: the autocomplete attribute.
Show child attributes
Show child attributes
An array of purchase units. At present only 1 purchase_unit is supported. Each purchase unit establishes a contract between a payer and the payee. Each purchase unit represents either a full or partial order that the payer intends to purchase from the payee.
1 elementShow child attributes
Show child attributes
The options that the payee or merchant offers to the payer to ship or pick up their items.
Show child attributes
Show child attributes
Response
The callback to merchant was successful.
Returns the updated shipping options for an order.
Was this page helpful?