How to update Tax info after Paypal Order Creation ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using C# .net Core MVC and for Paypal V2 i am using https://github.com/paypal/Checkout-NET-SDK
I am not able to update the already created order with Tax info after user login/approval from user.
- I created Order using following
var request = new OrdersCreateRequest();
request.Prefer("return=representation");
request.RequestBody(order);
response = await client().Execute(request);
var statusCode = response.StatusCode;
Order result = response.Result<Order>();
Then it asks for user login at Paypal. The user login and clicks the "Continue" on Paypal and the code comes back to my Application.
At this point, i need to update the Tax info in order but don't know how to do it. I was looking at following links for Help.
https://developer.paypal.com/docs/checkout/integration-features/update-order-details/
https://developer.paypal.com/docs/api/orders/v2#orders_patch
so I looked at Patch Order to update the Tax. i can update the description as mentioned in example in first link I pasted above using "OrdersPatchRequest" but i am unable to understand how to update the Tax for each item in PurchaseUnits list and also how to update TaxTotal. The 2nd link I pasted above doesn't show any Tax related fields that can possibly be updated.
Please Help.
Once the application creates the Order > sends user to Paypal to login and click 'Continue' > the Application needs to update the Tax info in Order for Tax for each Item and TaxTotal. How can I do that ?
- Labels:
-
Payments REST APIs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for posting to the PayPal community.
Please use the “purchase_units[].amount” patchable attribute and replace the tax value in your Patch/Update Order API call(https://developer.paypal.com/docs/api/orders/v2/#orders_patch).
https://developer.paypal.com/docs/api/orders/v2/#definition-amount_breakdown
tax_total object : The total tax for all items. Required if the request includes purchase_units.items.tax. Must equal the sum of (items[].tax * items[].quantity) for all items. tax_total.value can not be a negative number.
Sincerely,
Chiranjeevi
PayPal/Braintree MTS
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- IPN works in sandbox but not live in Sandbox Environment
- Tracking API: permissions error when trying to use Tracking API in Sandbox Environment
- When clicking on a payment button generates error: Unexpected token ... in PayPal Payments Standard
- Error: "Unable to change shipping method. Please try again." in PayPal popup in REST APIs
- Refunding an order via HATEOAS URL failing with NOT_AUTHORIZED error in Sandbox Environment