Get invoice

One invoice with its line items, state and totals.

GET https://cotlet.dev/api/v1/recurly/invoices/{invoice_number}

read

Returns one invoice by invoice_number: line items with their ids, quantities and amounts, the state, the totals and the linked subscription. Read it before refund_invoice to pick the right line item_id and to see what was already refunded.

Parameters

Parameters: get_invoice
NameTypeDescription
invoice_number string required string Invoice number from list_invoices.

Request

cURL
curl https://cotlet.dev/api/v1/recurly/invoices/invoice%20number \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("recurly", "get_invoice", {"invoice_number":"invoice number"})
Node.js
const result = await cotlet.call('recurly', 'get_invoice', {"invoice_number":"invoice number"});
CLI
cotlet call recurly get_invoice --data '{"invoice_number":"invoice number"}'

Example response

JSON

{
  "invoice_number": "1042",
  "account_code": "acme-co",
  "state": "collected",
  "line_items": [
    {
      "line_item_id": "3dc1a8f09b4c4e55a1e0",
      "description": "Setup fee",
      "quantity": 2,
      "unit_amount_in_cents": 900,
      "total_in_cents": 1800
    },
    {
      "line_item_id": "9ab07e22c15f4b0d8e61",
      "description": "Team plan",
      "quantity": 1,
      "unit_amount_in_cents": 24000,
      "total_in_cents": 24000
    }
  ],
  "subtotal_in_cents": 25800,
  "tax_in_cents": 0,
  "total_in_cents": 25800,
  "currency": "USD"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.