GET
/
v1
/
invoices
/
{id}
curl --request GET \
  --url https://api.withflex.com/v1/invoices/{id} \
  --header 'Authorization: Bearer <token>'
{
  "invoice": {
    "invoice_id": "<string>",
    "total": 123,
    "amount_due": 123,
    "amount_paid": 123,
    "payment_intent": {
      "payment_intent_id": "<string>",
      "amount": 123,
      "amount_capturable": 123,
      "amount_received": 123,
      "application_fee_amount": 123,
      "customer": {
        "customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
        "first_name": "John",
        "last_name": "Doe",
        "email": "joh.doe@example.com",
        "phone": "+15555555555",
        "employer": "Flex",
        "shipping": {
          "shipping_address_id": "<string>",
          "line1": "<string>",
          "line2": "<string>",
          "city": "<string>",
          "state": "<string>",
          "postal_code": "<string>",
          "country": "<string>"
        },
        "created_at": "<string>",
        "test_mode": true
      },
      "transfer_data": {
        "amount": 123,
        "destination": "<string>"
      },
      "status": "canceled",
      "latest_charge": "<string>",
      "created_at": "<string>",
      "invoice": "<string>",
      "capture_method": "automatic",
      "client_secret": "<string>",
      "metadata": {},
      "payment_method": "<string>",
      "test_mode": true,
      "transfer_group": "<string>"
    },
    "charge": "<string>",
    "customer": {
      "customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
      "first_name": "John",
      "last_name": "Doe",
      "email": "joh.doe@example.com",
      "phone": "+15555555555",
      "employer": "Flex",
      "shipping": {
        "shipping_address_id": "<string>",
        "line1": "<string>",
        "line2": "<string>",
        "city": "<string>",
        "state": "<string>",
        "postal_code": "<string>",
        "country": "<string>"
      },
      "created_at": "<string>",
      "test_mode": true
    },
    "period_end": "<string>",
    "period_start": "<string>",
    "subscription": {
      "subscription_id": "<string>",
      "created_at": "<string>",
      "items": [
        {
          "subscription_item_id": "<string>",
          "price": {
            "price_id": "<string>",
            "description": "<string>",
            "trial_period_days": 123,
            "unit_amount": 123,
            "recurring": {
              "interval": "daily",
              "interval_count": 1,
              "trial_period_days": 1
            },
            "active": true,
            "product": {
              "product_id": "<string>",
              "name": "<string>",
              "description": "<string>",
              "created_at": "<string>",
              "visit_type": "cbtSleep",
              "active": true,
              "upc_code": "<string>",
              "gtin": "<string>",
              "reference_gtin": "<string>",
              "hsa_fsa_eligibility": "not_eligible",
              "test_mode": true,
              "metadata": {}
            },
            "created_at": "<string>",
            "type": "one_time",
            "metadata": {},
            "hsa_fsa_eligibility": "not_eligible",
            "test_mode": true
          },
          "quantity": 123,
          "created_at": "<string>",
          "updated_at": "<string>",
          "test_mode": true
        }
      ],
      "latest_invoice": {},
      "customer": {
        "customer_id": "fcus_01HACM7FZ1084XB1GB6053VM0D",
        "first_name": "John",
        "last_name": "Doe",
        "email": "joh.doe@example.com",
        "phone": "+15555555555",
        "employer": "Flex",
        "shipping": {
          "shipping_address_id": "<string>",
          "line1": "<string>",
          "line2": "<string>",
          "city": "<string>",
          "state": "<string>",
          "postal_code": "<string>",
          "country": "<string>"
        },
        "created_at": "<string>",
        "test_mode": true
      },
      "status": "incomplete",
      "cancel_at_period_end": true,
      "current_period_end": "<string>",
      "current_period_start": "<string>",
      "metadata": {},
      "test_mode": true,
      "client_secret": {
        "setup_secret": "<string>",
        "payment_secret": "<string>"
      },
      "proration_behavior": "always_invoice",
      "trial_start": "<string>",
      "trial_end": "<string>",
      "cancel_at": "<string>"
    },
    "status": "draft",
    "collection_method": "charge_automatically",
    "test_mode": true,
    "metadata": {}
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Response

200
application/json

The response is of type object.