User is asked for shipping address when creating a credit card order

Sören2
New Community Member

Hi,

 

currently working on migrating an application from the deprecated Checkout-Java-SDK to using the Paypal REST Api directly. Frontend uses `@paypal/react-paypal-js` in both cases.

 

When the buyer chooses "Credit Card", this request is send via our server to Paypal:

```

{
"intent" : "CAPTURE",
"purchase_units" : [ {
"amount" : {
"currency_code" : "EUR",
"value" : "833.0",
"breakdown" : {
"item_total" : {
"currency_code" : "EUR",
"value" : "700.0"
},
"tax_total" : {
"currency_code" : "EUR",
"value" : "133.0"
}
}
},
"items" : [ {
"name" : "Some product",
"unit_amount" : {
"currency_code" : "EUR",
"value" : "700.0"
},
"tax" : {
"currency_code" : "EUR",
"value" : "133.0"
},
"quantity" : "1",
"category" : "DIGITAL_GOODS"
} ]
} ],
"payment_source" : {
"card" : {
"name" : "LIAM SMITH",
"billing_address" : {
"address_line_1" : "Fox Cube 2",
"admin_area_2" : "Hamburg",
"postal_code" : "20102",
"country_code" : "DE"
},
"experience_context" : {
"brand_name" : "Brand",
"landing_page" : "GUEST_CHECKOUT",
"shipping_preference" : "NO_SHIPPING",
"payment_method" : {
"payee_preferred" : "IMMEDIATE_PAYMENT_REQUIRED"
}
}
}
}
}
```
 
As you can see, this already includes the "shipping_preference" : "NO_SHIPPING" - but the buyer is still prompted to provide a shipping address. Why ask for a shipping address for a digital product that doesn't need shipping?
For card payments shipping_preference is not one of the documented fields but the one under application_context is a) deprecated (and using deprecated fields defeats the purpose of replacing a deprecated library) and b) doesn’t seem to work for credit card
 
Login to Me Too
0 REPLIES 0

Haven't Found your Answer?

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