I want to set the shipping preference during a “Create order ” POST /v2/checkout/orders
call.
If I use the deprecated method of using application_context
then it works fine:
{
"intent": "CAPTURE",
"purchase_units": [
{
"amount": {
"currency_code": "GBP",
"value": "110.62"
}
}
],
"application_context": {
"shipping_preference": "NO_SHIPPING"
}
}
However, if I use the recommended method of using experience_context
then I don’t get back a status of CREATED
but of PAYER_ACTION_REQUIRED
.
{
"intent": "CAPTURE",
"purchase_units": [
{
"amount": {
"currency_code": "GBP",
"value": "110.62"
}
}
],
"payment_source": {
"paypal": {
"experience_context": {
"shipping_preference": "NO_SHIPPING"
}
}
}
}
Why is that?
Note: The same problem was also asked one year ago in the PayPal community:
https://www.paypal-community.com/t5/REST-APIs/PAYER-ACTION-REQUIRED-when-creating-order-using-REST-API/td-p/3051720
But it was never solved.