cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable shipping details input in the checkout form when using orders API

Options
Go to solution
samebenezer
Contributor
Posted on

I would like to store shipping details on my server and keep the payment process simple by just accepting payment through PayPal...

How can I disable shipping details input in the BASIC INTEGRATION?? 

 

Any help Appreciated🙃....

1 ACCEPTED SOLUTION

Accepted Solutions
Solved

How to disable shipping details input in the checkout form when using orders API

Options
Go to solution
Frigidman
Contributor

In the REST API v2 for Orders, you could pass "application_context.shipping_preference = NO_SHIPPING" when you POST to "/v2/checkout/orders".

https://developer.paypal.com/docs/api/orders/v2/#definition-order_application_context

 

In the REST API v1, you would first have to create an Experience Profile, and then pass that profile ID with the create payment on "experience_profile_id" (set after "intent").

https://developer.paypal.com/docs/integration/direct/payment-experience/?mark=experience_profile_id#...

View solution in original post

7 REPLIES 7
Solved

How to disable shipping details input in the checkout form when using orders API

Options
Go to solution
Frigidman
Contributor

In the REST API v2 for Orders, you could pass "application_context.shipping_preference = NO_SHIPPING" when you POST to "/v2/checkout/orders".

https://developer.paypal.com/docs/api/orders/v2/#definition-order_application_context

 

In the REST API v1, you would first have to create an Experience Profile, and then pass that profile ID with the create payment on "experience_profile_id" (set after "intent").

https://developer.paypal.com/docs/integration/direct/payment-experience/?mark=experience_profile_id#...

View solution in original post

How to disable shipping details input in the checkout form when using orders API

Options
Go to solution
samebenezer
Contributor

Thanks for your answer...🤗

Is there an example code snippet that i can refer to with respect to the above said problem

using the script tag on the client side??

How to disable shipping details input in the checkout form when using orders API

Options
Go to solution
Frigidman
Contributor

@samebenezer wrote:

Thanks for your answer...🤗

Is there an example code snippet that i can refer to with respect to the above said problem

using the script tag on the client side??


I assume you mean the v2 javascript sdk method like described here: (?)

https://developer.paypal.com/docs/checkout/integrate/#4-set-up-the-transaction

 

If so, it would go outside of the `purchase_units` section like so:

 

return actions.order.create({
    purchase_units: [{
      amount: {
        value: '0.01'
      }
    }],
    application_context: {
      shipping_preference: 'NO_SHIPPING'
    }
  });

 

 

How to disable shipping details input in the checkout form when using orders API

Options
Go to solution
samebenezer
Contributor

That was really helpful. Thank you🤗💛

How to disable shipping details input in the checkout form when using orders API

Options
Go to solution
palictomas
New Community Member

This worked for me. Thanks a lot!!!

How to disable shipping details input in the checkout form when using orders API

Options
Go to solution
JackieDaytona
Contributor

Gee DID YOU EVER THINK (AND i USE THAT LOOSELY) THAT YOU MIGHT, JUST MIGHT WANT TO PUT THIS IN YOUR DOCUMENTATION.  i SPENT TWO DAYS LOOKING FOR THIS ANSWER.... 

How to disable shipping details input in the checkout form when using orders API

Options
Go to solution
JohnAckison35
Contributor
I have tried to find it seems that I have found it thanks to your and thanks again for helping hope everybody figures it out

Haven't Found your Answer?

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