OK, so the invoice ID is 1bDj1AgKEwShRSa8E6UwSA; It returns:
{
"invoice": {
"id": "1bDj1AgKEwShRSa8E6UwSA",
"version": 1,
"location_id": "L0R3KD1SXNRZB",
"order_id": "NBv0eMXfmsVtIeA4PHct7ixKGWfZY",
"payment_requests": [
{
"uid": "95a0b264-d27f-49f1-8fc1-8d18c59da98b",
"request_method": "EMAIL",
"request_type": "BALANCE",
"due_date": "2021-01-19",
"computed_amount_money": {
"amount": 300,
"currency": "USD"
},
"total_completed_amount_money": {
"amount": 0,
"currency": "USD"
}
}
],
"invoice_number": "000001",
"title": "Toilet Bar 1 Month Subscription Subscription",
"public_url": "https://squareup.com/pay-invoice/1bDj1AgKEwShRSa8E6UwSA",
"status": "UNPAID",
"timezone": "America/New_York",
"created_at": "2021-01-19T19:40:39Z",
"updated_at": "2021-01-19T19:40:39Z",
"primary_recipient": {
"customer_id": "FJ7D11H0S0V9DCTYP31KXRXDJM",
"given_name": "Toilet",
"family_name": "Bar Customer 001",
"email_address": "[email protected]"
},
"next_payment_amount_money": {
"amount": 300,
"currency": "USD"
}
}
}
So I can get the unpaid status from that, however, that is MASSIVELY inconvenient as it will need to be checked upon EVERY new invoice sent out…
The sub ID is acd1b86e-7b17-42ce-af28-7558c9c22c2e, and it returns:
{
"subscription": {
"id": "acd1b86e-7b17-42ce-af28-7558c9c22c2e",
"location_id": "L0R3KD1SXNRZB",
"plan_id": "CWHE652YFJEFNJFDC5VHGBFB",
"customer_id": "FJ7D11H0S0V9DCTYP31KXRXDJM",
"start_date": "2021-01-19",
"charged_through_date": "2021-02-19",
"status": "ACTIVE",
"invoice_ids": [
"1bDj1AgKEwShRSa8E6UwSA"
],
"version": 1611085239006,
"created_at": "2021-01-19T14:40:38-05:00",
"paid_until_date": "2021-02-19",
"timezone": "America/New_York"
}
}
This shows a paid until date, despite the invoice saying unpaid. There has to be an easier way to get the unpaid status, without having to go through each and every invoice upon its new release each month.