What is the equivalent to https://developer.paypal.com/docs/api/orders/v1/#orders_cancel in the V2 of Paypal API?
After an order has been Authorised (using API v2 authorize request with 'CREATED' response), I want the user to be able to cancel it after the click of a button. That button runs a cancel() method.
So my question is, what request should I put in the cancel method to cancel/void the existing order using the orderID? I know I could just leave the order be in V2, but I specifically want to void/cancel it. (Also, I can only use post, put and patch requests with the implementation I've been given)
Would really appreciate it if you could provide the curl command or nodeJS fetch implementation for it.
Thank you in advance!
question from:https://stackoverflow.com/questions/66054105/how-do-i-cancel-void-an-order-using-paypal-api-v2