How to set shipping_preference: 'SET_PROVIDED_ADDRESS' to NO_ADDRESS?

emykka
New Community Member

Hello. I need help with this, I'm selling digital and I don't need the buyer's address. However, everytime I try to check out I receive this message:

 

[UNPROCESSABLE_ENTITY] The requested action could not be performed, semantically incorrect, or failed business validation. https://developer.paypal.com/docs/api/orders/v2/#error-MISSING_SHIPPING_ADDRESS

 

I need to change shipping_preference: 'SET_PROVIDED_ADDRESS' to NO_ADDRESS 

 

How can I edit the shipping_preference? Thank you

Login to Me Too
4 REPLIES 4

AE00
New Community Member

Any solutions?

Login to Me Too

Linovy
New Community Member

In case anyone found this unresolved issue and has the same problem:

 

The API Documentation seems to be off.

If you provide an Address like this its working:

 

purchase_units: [{ ........... shipping: { address: { "address_line_1": "<removed>", "address_line_2": "<removed>", "admin_area_2": "San Francisco", "admin_area_1": "CA", "postal_code": "<removed>", "country_code": "US" }, }, }]

 

Login to Me Too

Ampopo
New Community Member

Il parametro corretto è:

shipping_preference: 'NO_SHIPPING'

Login to Me Too

MTS_Chiranjeevi
Moderator
Moderator

Good day @emykka@Linovy / @AE00,

 

Thank you for posting to the PayPal community.

 

Merchants should be able to handle shipping address details using the "shipping_preference" field in the Orders API request call. 

 

I would suggest to please contact your website developer or the support of third party eCommerce and pass the "NO_SHIPPING" value under "shipping_preference" in your Create Order API call "https://developer.paypal.com/docs/api/orders/v2/#orders_create". 

 

For reference: 

 

"payment_source": {

    "paypal": {

      "experience_context": {

        "payment_method_preference": "IMMEDIATE_PAYMENT_REQUIRED",

        "payment_method_selected": "PAYPAL",

        "brand_name": "EXAMPLE INC",

        "locale": "en-US",

        "landing_page": "LOGIN",

        "shipping_preference": "NO_SHIPPING",

        "user_action": "PAY_NOW",

        "return_url": "https://example.com/returnUrl",

        "cancel_url": "https://example.com/cancelUrl"

      }

    }

  }

Guide links - https://developer.paypal.com/docs/api/orders/v2/#definition-application_context  

                     https://developer.paypal.com/docs/api/orders/v2/#orders-create-request-body 

 

Sincerely,

Chiranjeevi

PayPal/Braintree 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.