Selected Shipping Method amount not updating to cart for card payment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am implementing the PayPal Checkout using the JavaScript SDK and have encountered an issue related to shipping method selection. Here are the details:
Code to Create Order:
actions.order.create({
payer: get_payer_data(values),
purchase_units: [{
amount: {
value: values.amount,
currency_code: values.currency_code,
item_total: {
currency_code: values.currency_code,
value: values.amount
}
},
description: values.so_reference,
reference_id: values.reference,
shipping: shipping_data,
}],
});
This code successfully creates an order and displays the shipping methods in the PayPal payment popup.
Observed Behavior:
Case 1: Paying with PayPal Account
When paying with a PayPal account, if I change the shipping method during the payment process, the total order amount updates correctly.
The new total reflects the sum of the item amount and the selected shipping amount.
Case 2: Paying with Card
When selecting the card payment option, the popup also shows the shipping methods passed during order creation.
However, if I change the shipping method in the popup, the total amount remains unchanged.
I verified that the onShippingChange callback function is triggered when changing the shipping method, but the total amount does not update.
Request for Assistance:
Why does the total amount update correctly when paying with a PayPal account but not when using the card payment option?
Is there a specific configuration or additional step required to ensure the total amount updates correctly when the shipping method is changed for card payments?
Any guidance or suggestions would be greatly appreciated. Thank you for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also checked the approach of order patching on callback funtion onShippingChange
here is code

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- How can I have orders marked as shipped in Shopify be updated as shipped in PayPal? in Braintree Client-side Integration (JS, iOS, Android SDKs)
- permission_denied response in call to patch order when paying by Card in Braintree Client-side Integration (JS, iOS, Android SDKs)
- PayPalWebPayments - Shipping Address Change in SDKs
- Issues with PayPal Express Checkout Integration in Sandbox Environment