Example

JSON
{
  "invoice": {
    "due_at": "2023-01-28T02:43:21.859117Z",
    "due_days": 30,
    "ends_at": "2023-01-28T23:59:59.999999Z",
    "id": "16eda8d7-7418-4aa1-bd07-41e6430688bc",
    "invoice_number": "16eda8d7-0",
    "is_partial_agreement": false,
    "num_days": 0,
    "order": {
      "agreement_number": 1,
      "billing_schedule": "annually",
      "buyer": {
        "address": {
          "city": "Address City",
          "country": "Address Country",
          "id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
          "line_1": "123 Address Line 1",
          "line_2": "Address Line 2 ",
          "region": "Address Region",
          "zip": "00000"
        },
        "name": "Example Co."
      },
      "chain_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
      "closed_at": "2022-12-28T02:48:21.859117Z",
      "created_at": "2022-12-28T02:43:21.859117Z",
      "current_order_skus": [
        {
          "quantity": 1,
          "sku": {
            "code": "OrderBrickCode",
            "id": "ffffffff-ffff-ffff-ffff-ffffffffffff",
            "name": "OrderBrick"
          }
        }
      ],
      "ends_at": "2023-12-28T23:59:59.999+00:00",
      "grand_total": 100,
      "id": "c9b23aec-b7b7-4d2e-865d-71e4743ba828",
      "metadata": {},
      "order_type": "standard",
      "primary_user": {
        "company": {
          "address": {
            "city": "Address City",
            "country": "Address Country",
            "id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
            "line_1": "123 Address Line 1",
            "line_2": "Address Line 2 ",
            "region": "Address Region",
            "zip": "00000"
          },
          "name": "Example Co."
        },
        "email": "buyername@buyer.com",
        "first_name": "BuyerFirstName",
        "last_name": "BuyerLastName"
      },
      "stage": "closed",
      "starts_at": "2022-12-29T00:00:00.000+00:00",
      "updated_at": "2023-12-28T02:43:20.859657Z"
    },
    "paid_amount": 0,
    "paid_at": null,
    "payments": [
      {
        "error": null,
        "id": "4a842a5a-90b3-4f2e-80b0-511ab495226e",
        "invoice": "16eda8d7-7418-4aa1-bd07-41e6430688bc",
        "paid_amount": 8,
        "paid_at": null,
        "payment_method": "CREDIT_CARD",
        "status": "FAILED"
      }
    ],
    "remaining_amount": 8.333333333333334,
    "starts_at": "2022-12-29T00:00:00Z"
  }
}