403 Error on Create payment with order_id


My app is designed so that it creates an order that can then later be viewed by a customer and paid.
However, whenever I try, either to create a payment with an order_id OR to link a successful payment to an existing unpaid order, I get the same message:

The order UiTIHZxz3cu8Q7JqmpTErnX3dd4F is owned by another application.

Strangely, I am sure the orders are owned by the application since they are created by that same application. Also, I am able to list and search those very orders, only unable to apparently link a payment to those.

Hi @charlesdarras welcome to the forums!

I dug into this, and it’s because this order was used to create an invoice. Once an order becomes an invoice, it must be paid as an invoice, and not through our public APIs (like CreatePayment). The error you’re seeing is coming from the CreatePayment request. The Invoices API documents it as:

Paying for the order. You can only pay for the order by paying the invoice. You cannot use other Square APIs (for example, PayOrder , CreatePayment, and Charge) to process the payment for the order.

Please let me know if you have any additional questions or concerns, I’m happy to help!

Thanks, I understand the problem.

I just rant into this too! @sjosey
So let me see if I understand this correctly. If I create an invoice in our SaaS product so that it’s available at the POS system, my clients can’t pay it via the API, it has to be paid at the POS system? #@%^@@#@#$ ARRRGGGGGG this is getting really annoying. The whole purpose was that invoices can be paid both online in our SaaS product AND at the POS if the member so chooses.

I guess the only thing I can do in this case is to accept the payment in the SaaS product and cancel the invoice at the POS? Am I correct?
You guys have to make a change to this, it makes absolutely no sense.

You can send the invoice via email even if it’s created by POS, which would allow them to pay it online as well; you just can’t use the API to pay it off directly at this time.