Matching the sales summary reporting

We have been instructed that sales are recognized in the Square reporting according to below:

Most Square orders will be set to COMPLETED at the time of payment. The exception to this is orders with a fulfillment. Orders that contain a fulfillment cannot reach the COMPLETED state until both the order is fully paid, and all fulfillments have a fulfillment.state: COMPLETED. Regardless of whether the order has a fulfillment or not, it will be reported in gross sales when it is paid. The completion of the fulfillment (required to COMPLETE the top-level order.state) does not factor into revenue recognition.

We have an order which does not appear to align with this approach. It was not recognized as sales in reporting until 2/8/24 but the order was fully paid on 2/2/24. Any guidance as to why this happened is helpful. Order below:

{
    "order": {
        "id": "QGMtLV5pj9aia3JqEbTLbVdqqRJZY",
        "location_id": "Z522HT9FNB8ZA",
        "line_items": [
            {
                "uid": "1847b253-ceb6-4178-814f-0bfd51031e96",
                "quantity": "1",
                "base_price_money": {
                    "amount": 1553488,
                    "currency": "USD"
                },
                "note": "Partial Invoice Payment",
                "gross_sales_money": {
                    "amount": 1553488,
                    "currency": "USD"
                },
                "total_tax_money": {
                    "amount": 0,
                    "currency": "USD"
                },
                "total_discount_money": {
                    "amount": 0,
                    "currency": "USD"
                },
                "total_money": {
                    "amount": 1553488,
                    "currency": "USD"
                },
                "variation_total_price_money": {
                    "amount": 1553488,
                    "currency": "USD"
                },
                "item_type": "CUSTOM_AMOUNT",
                "total_service_charge_money": {
                    "amount": 0,
                    "currency": "USD"
                }
            }
        ],
        "created_at": "2024-02-01T18:29:24.804Z",
        "updated_at": "2024-02-08T16:21:42.000Z",
        "state": "COMPLETED",
        "version": 24,
        "total_tax_money": {
            "amount": 0,
            "currency": "USD"
        },
        "total_discount_money": {
            "amount": 0,
            "currency": "USD"
        },
        "total_tip_money": {
            "amount": 0,
            "currency": "USD"
        },
        "total_money": {
            "amount": 1553488,
            "currency": "USD"
        },
        "closed_at": "2024-02-08T16:21:46.309Z",
        "tenders": [
            {
                "id": "7jjcSgKohxr7SsKibTmKC3RZJNFZY",
                "location_id": "Z522HT9FNB8ZA",
                "transaction_id": "QGMtLV5pj9aia3JqEbTLbVdqqRJZY",
                "created_at": "2024-02-02T21:00:29.834Z",
                "amount_money": {
                    "amount": 1553488,
                    "currency": "USD"
                },
                "type": "CARD",
                "card_details": {
                    "status": "FAILED",
                    "card": {
                        "card_brand": "",
                        
                        "card_type": "CREDIT",
                        "prepaid_type": "NOT_PREPAID",
                        "bin": ""
                    },
                    "entry_method": "KEYED"
                },
                "payment_id": "7jjcSgKohxr7SsKibTmKC3RZJNFZY"
            },
            {
                "id": "V8FEr4BN9qxhVuZtFNollgyPXHRZY",
                "location_id": "Z522HT9FNB8ZA",
                "transaction_id": "QGMtLV5pj9aia3JqEbTLbVdqqRJZY",
                "created_at": "2024-02-02T21:04:49Z",
                "amount_money": {
                    "amount": 1553488,
                    "currency": "USD"
                },
                "type": "CARD",
                "card_details": {
                    "status": "CAPTURED",
                    "card": {
                        
                        "fingerprint": ""
                    },
                    "entry_method": "KEYED"
                },
                "payment_id": "V8FEr4BN9qxhVuZtFNollgyPXHRZY"
            },
            {
                "id": "nvmiBpCTfQWxvV38Imb0Gnbt33RZY",
                "location_id": "Z522HT9FNB8ZA",
                "transaction_id": "QGMtLV5pj9aia3JqEbTLbVdqqRJZY",
                "created_at": "2024-02-05T23:54:15.965Z",
                "amount_money": {
                    "amount": 1553487,
                    "currency": "USD"
                },
                "type": "CARD",
                "card_details": {
                    "status": "FAILED",
                    "card": {
                        "card_brand": "",
                        
                        "card_type": "DEBIT",
                        "prepaid_type": "NOT_PREPAID",
                        "bin": ""
                    },
                    "entry_method": "KEYED"
                },
                "payment_id": "nvmiBpCTfQWxvV38Imb0Gnbt33RZY"
            },
            {
                "id": "bvjV8PR1HR9gTPXFQmDSVJuPR9ZZY",
                "location_id": "Z522HT9FNB8ZA",
                "transaction_id": "QGMtLV5pj9aia3JqEbTLbVdqqRJZY",
                "created_at": "2024-02-08T15:57:59.836Z",
                "amount_money": {
                    "amount": 1739905,
                    "currency": "USD"
                },
                "type": "CARD",
                "card_details": {
                    "status": "FAILED",
                    "card": {
                        "card_brand": "",

                        "card_type": "DEBIT",
                        "prepaid_type": "NOT_PREPAID",
                        "bin": ""
                    },
                    "entry_method": "KEYED"
                },
                "payment_id": "bvjV8PR1HR9gTPXFQmDSVJuPR9ZZY"
            },
            {
                "id": "3Bp1h8oUcQzXAEZmQqCl26iw9m9YY",
                "location_id": "Z522HT9FNB8ZA",
                "transaction_id": "QGMtLV5pj9aia3JqEbTLbVdqqRJZY",
                "created_at": "2024-02-08T16:20:28.378Z",
                "amount_money": {
                    "amount": 1739905,
                    "currency": "USD"
                },
                "type": "CARD",
                "card_details": {
                    "status": "FAILED",
                    "card": {
                        "card_brand": "",
                       
                        "card_type": "DEBIT",
                        "prepaid_type": "NOT_PREPAID",
                        "bin": ""
                    },
                    "entry_method": "KEYED"
                },
                "payment_id": "3Bp1h8oUcQzXAEZmQqCl26iw9m9YY"
            },
            {
                "id": "vDqKyzMQTq29DAQkP2pRCvKZ2A6YY",
                "location_id": "Z522HT9FNB8ZA",
                "transaction_id": "QGMtLV5pj9aia3JqEbTLbVdqqRJZY",
                "created_at": "2024-02-08T16:21:41.580Z",
                "amount_money": {
                    "amount": 1739905,
                    "currency": "USD"
                },
                "type": "CARD",
                "card_details": {
                    "status": "FAILED",
                    "card": {
                        "card_brand": "",
                        
                        "card_type": "CREDIT",
                        "prepaid_type": "NOT_PREPAID",
                        "bin": ""
                    },
                    "entry_method": "KEYED"
                },
                "payment_id": "vDqKyzMQTq29DAQkP2pRCvKZ2A6YY"
            }
        ],
        "total_service_charge_money": {
            "amount": 0,
            "currency": "USD"
        },
        "return_amounts": {
            "total_money": {
                "amount": 0,
                "currency": "USD"
            },
            "tax_money": {
                "amount": 0,
                "currency": "USD"
            },
            "discount_money": {
                "amount": 0,
                "currency": "USD"
            },
            "tip_money": {
                "amount": 0,
                "currency": "USD"
            },
            "service_charge_money": {
                "amount": 0,
                "currency": "USD"
            }
        },
        "net_amounts": {
            "total_money": {
                "amount": 1553488,
                "currency": "USD"
            },
            "tax_money": {
                "amount": 0,
                "currency": "USD"
            },
            "discount_money": {
                "amount": 0,
                "currency": "USD"
            },
            "tip_money": {
                "amount": 0,
                "currency": "USD"
            },
            "service_charge_money": {
                "amount": 0,
                "currency": "USD"
            }
        },
        "source": {
            "name": "Invoices"
        },
        "customer_id": "SSXHRMAGDW7BPAX83DC3P6S4JG",
        "net_amount_due_money": {
            "amount": 0,
            "currency": "USD"
        }
    }
}

:wave: 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

https://developer.squareup.com/docs/orders-api/what-it-does
https://developer.squareup.com/docs/app-marketplace/requirements/orders-api
Invoices API Overview

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.

This order is for a partially paid Invoice. It looks like it was partially paid on 2/2/24 and then got into a failed state for too many failed payments. At that point the order went to a COMPLETED state. There were supposed to be more payments on the invoice but they failed. :slightly_smiling_face:

What within the order indicates that it was partially paid as of 2/2? The total_money equals the tender with the status of captured on 2/2 for 15534.88. As a result, the net_amount_due_money shows 0.00 which indicates the order would have been recognized from a revenue standpoint on 2/2. I am confused where it indicates the order is partially paid as of 2/2 irregardless of the later failed payment attempts. Any guidance is much appreciated based on the logic I was provided:

"All Square first party reporting is on the cash basis, so orders are reported in gross sales on the day they are paid. When the order reaches a COMPLETED state doesn’t factor into reporting.

Most Square orders will be set to COMPLETED at the time of payment. The exception to this is orders with a fulfillment. Orders that contain a fulfillment cannot reach the COMPLETED state until both the order is fully paid, and all fulfillments have a fulfillment.state: COMPLETED. Regardless of whether the order has a fulfillment or not, it will be reported in gross sales when it is paid. The completion of the fulfillment (required to COMPLETE the top-level order.state) does not factor into revenue recognition."

In the line_items the note indicates that it’s a partially paid invoice. If you were to call the SearchInvoices by customer_id you’ll get the additional invoice details.

Also not all Square orders will be COMPLETED at the time of payment. If they are fulfilling orders with a fulfillment on an order the order will remain in an OPEN state till the order fulfillment is COMPLETED. Payments for these orders will be included in the Sales Summary report for the day the payment is made instead of the day the order is fulfilled and COMPLETED which can be very far out. :slightly_smiling_face:

Thank you. This is very helpful.