Beta

Retrieve an invoice

Retrieves an invoice by ID. Use this endpoint to inspect line items, payment attempts, billing period, and status after receiving an invoice webhook event.

Related guides: Invoices, Subscriptions, and Webhooks

Path Parameters
  • id
    Type: string
    max length:  
    100
    required
Query Parameters
  • expand
    Type: array string[]enum
    const:  
    customer

    Pass customer to return the full Customer object in the customer field instead of only the customer ID.

    values
    • customer
Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/v1/invoices/{id}
curl 'https://api.paypercut.io/v1/invoices/{id}?expand=customer' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": "01KA9TBINVOICE123456789",
  "object": "invoice",
  "customer": "01KA9SXYZ123456789ABCDEFGH",
  "status": "paid",
  "created": "2026-03-01T00:00:00Z",
  "updated": "2026-03-01T00:00:12Z",
  "livemode": true,
  "metadata": {
    "order_id": "sub-renewal-1042"
  },
  "billing_reason": "subscription_cycle",
  "collection_method": "charge_automatically",
  "currency": "USD",
  "amount_due": 2000,
  "amount_paid": 2000,
  "amount_remaining": 0,
  "period": {
    "start": "2026-03-01T00:00:00Z",
    "end": "2026-04-01T00:00:00Z"
  },
  "parent": {
    "type": "subscription_details",
    "subscription_details": {
      "subscription": "01KA9TSUBSCRIPTION123",
      "metadata": {
        "plan": "pro"
      }
    }
  },
  "lines": {
    "object": "list",
    "data": [
      {
        "id": "01KA9TLINE1234567890",
        "object": "invoice_line_item",
        "invoice": "01KA9TBINVOICE123456789",
        "amount": 2000,
        "currency": "USD",
        "description": "Pro plan - monthly",
        "quantity": 1,
        "period": {
          "start": "2026-03-01T00:00:00Z",
          "end": "2026-04-01T00:00:00Z"
        },
        "parent": {
          "type": "subscription_item_details",
          "subscription_item_details": {
            "subscription": "01KA9TSUBSCRIPTION123",
            "subscription_item": "01KA9TITEM123456789"
          }
        },
        "pricing": {
          "price": "01KA9TPRICE123456789",
          "product": "01KA9TPRODUCT1234567"
        },
        "metadata": {}
      }
    ],
    "has_more": false,
    "url": "/v1/invoice_lines?invoice=01KA9TBINVOICE123456789"
  },
  "payments": {
    "object": "list",
    "data": [
      {
        "id": "01KA9TPAYMENT12345678",
        "object": "invoice_payment",
        "invoice": "01KA9TBINVOICE123456789",
        "status": "paid",
        "amount_requested": 2000,
        "amount_paid": 2000,
        "currency": "USD",
        "payment": {
          "type": "payment_intent",
          "payment_intent": "01KA9T0ABC123456789DEFGHIJ",
          "payment": "01KA9TPAY123456789"
        },
        "created": "2026-03-01T00:00:05Z",
        "paid_at": "2026-03-01T00:00:12Z",
        "failed_at": null
      }
    ],
    "has_more": false,
    "url": "/v1/invoice_payments?invoice=01KA9TBINVOICE123456789"
  },
  "status_transitions": {
    "finalized_at": "2026-03-01T00:00:03Z",
    "marked_uncollectible_at": null,
    "paid_at": "2026-03-01T00:00:12Z",
    "voided_at": null
  },
  "last_finalization_error": null
}