I’m using the Checkout API to generate Quick Pay payment links, and everything’s working great, including Web Hook integration back to our internal system. However, I’m wanting to mark the Order as “COMPLETE” programmatically (I can do so from the UI) but have hit a wall as doing so returns the following error:
All fulfillments must have a state of COMPLETED, CANCELED, or FAILED for an order to be able to have a state of COMPLETED.
Because I’m using Quick Pay, there are no fulfillments, so I’m in a Catch-22 situation.
Any suggestions?
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
Additional Documentation
Quick Pay Checkout
Pay for Orders
Payments API Webhooks
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
With the Quick Pay order we will add a fulfillment
to the order. You can call UpdateOrder
to update the order and order fulfillment
to COMPLETED
with one API call.
Yep, that worked - thanks. I hadn’t spotted that you create a Fulfillment item automatically when I use Quick Pay (with a type of DIGITAL, which I haven’t seen documented anywhere), so I just grabbed the UID for the Fulfillment item and set its status to COMPLETE along with the Order. Exactly what I was looking for.
Thanks for the quick turnaround.