how to update order application_context?

Temp20231103C
New Community Member

when request url: https://api-m.sandbox.paypal.com/v2/checkout/orders/0X200157A9517130F

params: 

[
    {
        "op":"replace",
        "path":"/application_context/shipping_preference",
        "value": "GET_FROM_FILE"
    }
]
 
response:
{
    "name": "UNPROCESSABLE_ENTITY",
    "details": [
        {
            "field": "path",
            "value": "/application_context/shipping_preference",
            "location": "body",
            "issue": "INVALID_JSON_POINTER_FORMAT",
            "description": "Path should be a valid JSON Pointer https://tools.ietf.org/html/rfc6901 that references a location within the request where the operation is performed."
        }
    ],
    "message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
    "debug_id": "d845f58576d09",
    "links": [
        {
            "rel": "information_link",
            "method": "GET"
        }
    ]
}
Login to Me Too
1 REPLY 1

vaishnavib
Moderator
Moderator

Good day @Temp20231103C,

 

Thank you for reaching out to the PayPal community.

 

The previously used fields in the application_context are now deprecated. Instead, please utilize the experience_context object under the payment_source. This will allow you to access the necessary fields, such as payment_source.paypal.experience_context.shipping_preference. By specifying this field in the experience_context object, instead of the application_context object, you will be able to proceed smoothly.

 

For further information and details about this change, I kindly request you to refer to the following link:

https://developer.paypal.com/docs/api/orders/v2/#orders_create!path=application_context/shipping_pre...

 

https://developer.paypal.com/docs/api/orders/v2/#orders_create!path=payment_source/paypal/experience...

 

I would suggest to please check the path and pass the valid request to the PayPal system.

 

If you are still encountering any issues, please create an MTS ticket by visiting the following URL:

https://www.paypal-support.com/s/?language=en_US. In the ticket, please provide a detailed description of the problem and include any error details you may have encountered.

 

Thank you for choosing PayPal.

 

Sincerely,

Vaishnavi

PayPal MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.