User is asked for shipping address when creating a credit card order
Sören2
New Community Member
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Apr-08-2024
01:50 AM
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
1 REPLY 1
mikercharlie
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec-09-2024
01:12 PM
Have you found a solution for this? I can't get the no shipping to work for credit cards either.

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- Sandbox account collect billing and shipping address in Sandbox Environment
- Error payment in PayPal Payments Standard
- Why does PayPal make it difficult to send an item to a different shipping address from billing? in PayPal Upgrade Community
- How do I change shipping preference in Paypal? in REST APIs
- Inserting province/autonomous region by address when creating an order does not take effect in Braintree Server-side Integration (PHP, Java, .NET, Ruby, Python, NodeJS SDKs)