Set manual payments as paid using API

kv1
New Member
1 0 0

Hi,

 

I can find in the API docs how we can get the products to show them on our website, and I also found that I can create a manual payment in case users don't want to pay with a creditcard.

 

The docs say you need to set manual payments as "paid" as soon as you have gotten the money.

 

Can this also be done with an API? if so, with which one?

 

Thanks!

0 Likes
_JB
Shopify Staff
Shopify Staff
834 98 188

Hey @kv1,

 

To mark a manual payment as paid through the API, you can use the Orders Transaction API to "capture" the payment. Here's an example of what that call will look like:

 

POST /admin/orders/##order_id##/transactions.json

{
"transaction": {
"currency": "USD",
"amount": "14.99",
"kind": "capture",
"parent_id": ##parent_id##
}
}

 

You can find more details about in our API docs here.

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes

Hey JB,

This is a life saviour. Works for manual payments but not payments processed through Advanced Cash on Delivery app by Shopify.

Is there a way we could update the payment status on those orders without having to manually do it? A massive pain for merchants in India!

0 Likes