Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Can't change the payment status from "Pending" to "Paid" for orders created through POST API

Can't change the payment status from "Pending" to "Paid" for orders created through POST API

AlexeyKhimich
New Member
5 0 0

I am using POST API to create an order (not a draft order) with all necessary data in the Shopify system, with financial status set to "Pending". The goal is to be able to manually mark the order "Paid" after getting the payment, which is transferred otherwise and is out of Shopify's scope. The order can be created successfully, however, the payment status can not be changed manually. When I try to do so, I'm getting an error along the lines of "Couldn't mark as paid". Orders created through the admin panel seem to play nice, and allow me to set the payment status to "Pay later", which can then be successfully marked as paid. If I were to guess, this seems to be a limitation placed on orders created through the POST API. Are there any ways to solve this issue, aside from resorting to Draft Orders, which I'd rather not do?

 

Replies 6 (6)

Moira
Shopify Staff (Retired)
2118 231 337

Hey @AlexeyKhimich,

 

Welcome to the Shopify Community!

 

It sounds like you are attempting to change the financial status of an order to "Paid" through the API, but you are experiencing an error.

 

It is not uncommon for certain actions to be restricted when using the API, and it is possible that the ability to manually mark an order as "Paid" is only available through the Shopify admin panel and not through the API.

 

One option you could try is to use the Transactions API to create a transaction on the order and set the kind field to 'sale'. This would simulate the order being paid and could be a way to achieve the desired behavior.

 

You could also consider using the Draft Order API to create a draft order and then use the Order Editing API to make changes to the draft order, including setting the financial status to "Paid", before it is finalised. This would allow you to update the order through the API.

 

You can learn more via our Shopify Developer guides about getting started with authentication and building apps.

 

Let me know how you get on!

Moira | Social Care @ 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 the Shopify Help Center or the Shopify Blog

AlexeyKhimich
New Member
5 0 0

I'm sorry, I wasn't clear enough. I am attempting to change the status to "Paid" using the admin panel, and this is where the error comes up. The API is only used to create an order with the "Pending" status.

AlexeyKhimich
New Member
5 0 0

@Moira hope you don't mind the ping 🙂

Moira
Shopify Staff (Retired)
2118 231 337

@AlexeyKhimich I see! By default, Shopify has certain order status flows that are enforced to ensure the integrity of the data and the financials of the store. It's possible that the order status "Pending" is not configured to allow for manual marking as "Paid" in the admin panel.

 

It may be possible to use a Shopify app from the app store that allows you to customize your order statuses and the transitions between them.

 

I will do some digging and let you know!

Moira | Social Care @ 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 the Shopify Help Center or the Shopify Blog

CCIDeveloper
Visitor
2 0 0

Hello,

 

We're experiencing the same sort of problem here. We're using a 3rd party tool (FileMaker Pro) to create the Orders and send them over to shopify for fulfillment via Invoice later. Was this ever resolved? If so, how could we get these orders to be marked as Paid?

CCIDeveloper
Visitor
2 0 0

Did you ever find a solution for this?