Green
Green

Reputation: 30805

How do I remove a "Ship to" section from Checkout Popup?

Is there any option, when creating a payment with Paypal API, that allows to remove a "Ship to" section from Checkout popup? I mean just not to displayit in popup.

I do not use a shipping_address option anywhere in payment_json object when creating a configuration for a payment. But the section still persists.

enter image description here

Upvotes: 3

Views: 1259

Answers (2)

Mansoorkhan Cherupuzha
Mansoorkhan Cherupuzha

Reputation: 1761

I'm adding this answer since I came here while searching for disabling the shipping to information by using PayPal Smart Payment Button. This answer may help them.

You have to add the below line to remove Ship to address.

application_context: { shipping_preference: 'NO_SHIPPING' }

Eg:

paypal.Buttons({
  createOrder: function(data, actions) {
    return actions.order.create({
      purchase_units: [{ amount: { value: 1.00 } }],
      application_context: { shipping_preference: 'NO_SHIPPING' }
    });
  }
}).render("#paypal-button-container");

Upvotes: 5

Ivnhal
Ivnhal

Reputation: 1095

You need to use Payment Experience API.

Create new web_profile, and set presentation with

"no_shipping": 1,
"address_override": 0

Upvotes: 2

Related Questions