Quantcast
Channel: Opinion: Shopify Community - Shopify APIs & SDKs
Viewing all articles
Browse latest Browse all 25503

API Returning a 422 Unprocessible when trying to Capture a payment for an order by Erinc Erol

$
0
0

Hi,

I'm creating an order by using API without any transactions and setting its payment status to pending. Then, I try to update the order's payment status to paid. To do this, I'm trying to POST transaction by using order's Id setting "kind" to "capture"; "{\"transaction\":{\"kind\":\"capture\"}}". This is my json data and I'm trying to post it from C# with shopUrl + string.Format("/admin/orders/{0}/transactions.json", orderId), adding json data to POST request but I'm getting the error in the title. I have tried various ways but couldn't seem to solve it. Any help or other suggestions how to change payment status would be great. Beside this, I tried to update it directly from other by using PUT request but it went even worse.

 

Thanks


Viewing all articles
Browse latest Browse all 25503

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>