I am making payments on behalf of user using REST API, but I get ORDER_ALREADY_COMPLETED

princetrickier
Contributor
Contributor

I have used saved payment method without transaction method in my web app, so I have now the vault ID to make payments on behalf of users. 

Now when I made the first payment from postman, I got order success as result, but now when I do another request, I am getting error.

 

```

{
"name": "UNPROCESSABLE_ENTITY",
"details": [
{
"issue": "ORDER_ALREADY_CAPTURED",
"description": "Order already captured.If 'intent=CAPTURE' only one capture per order is allowed."
}
],
"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
"debug_id": "27dc54d72caec",
"links": [
{
"href": "https://developer.paypal.com/docs/api/orders/v2/#error-ORDER_ALREADY_CAPTURED",
"rel": "information_link",
"method": "GET"
}
]
}

```

Login to Me Too
1 REPLY 1

MTS_Chiranjeevi
Moderator
Moderator

Good day @princetrickier,

 

Thank you for posting to the PayPal community.

 

I would suggest to please cross check your internal website system and make sure your not performing the "Capture Order" API call twice for particular "Order ID".

 

The "Order ID" passed in the"Capture Order" API call might have already been captured. Since, your trying to capture again with the same "Order ID", your facing the error ORDER_ALREADY_COMPLETED.

 

I would suggest to please check the "Order ID" before passing in you "Capture Order" API call.

 

NoteMerchant should perform unique Create Order API(https://developer.paypal.com/docs/api/orders/v2/#orders_create) calls and then redirect the customer/buyer to "approve" URL.

 

Once the order is approved by the customer/buyer, merchant should perform unique Capture Order(https://developer.paypal.com/docs/api/orders/v2/#orders_capture) API calls.

 

If your still facing any issues, please create a MTS ticket via -  https://www.paypal-support.com/s/?language=en_US with the detail information and error details.

 

Sincerely,

Chiranjeevi

PayPal/Braintree MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

Haven't Found your Answer?

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