API reference

Invoice Payments

Knox answers these operations with the same requests and responses as Stripe's API. Authenticate with your secret key, Authorization: Bearer sk_test_..., from your server, and send form-encoded bodies. Test mode only: live processing is currently disabled.

Base URL
https://api.knoxapi.com

List all payments for an invoice

GET/v1/invoice_payments

When retrieving an invoice, there is an includable payments property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of payments.

Query parameters

  • createdobject | integer

    Only return invoice payments that were created during the given date interval.

    Show 4 child parameters
    • gtinteger
    • gteinteger
    • ltinteger
    • lteinteger
  • ending_beforestring

    A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

  • expandarray of strings

    Specifies which fields in the response should be expanded.

  • invoicestring

    The identifier of the invoice whose payments to return.

  • limitinteger

    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • paymentobject

    The payment details of the invoice payments to return.

    Show 3 child parameters
    • typestringRequired
      Possible values
      • payment_intent
      • payment_record
    • payment_intentstring
    • payment_recordstring
  • starting_afterstring

    A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

  • statusstring

    The status of the invoice payments to return.

    Possible values
    • canceled
    • open
    • paid

Returns

A list of invoice_payment objects.

GET /v1/invoice_payments
curl -G https://api.knoxapi.com/v1/invoice_payments \
  -H "Authorization: Bearer $KNOX_SECRET_KEY" \
  --data-urlencode limit=3
Response
{
  "object": "list",
  "url": "/v1/invoice_payments",
  "has_more": false,
  "data": [
    {
      "amount_paid": null,
      "amount_requested": 1112626247,
      "created": 1028554472,
      "currency": "currency",
      "id": "obj_123",
      "invoice": "invoice",
      "is_default": true,
      "livemode": true,
      "object": "invoice_payment",
      "payment": {
        "type": "payment_intent"
      },
      "status": "status",
      "status_transitions": {
        "canceled_at": null,
        "paid_at": null
      }
    }
  ]
}

Retrieve an InvoicePayment

GET/v1/invoice_payments/{invoice_payment}

Retrieves the invoice payment with the given ID.

Path parameters

  • invoice_paymentstringRequired

Query parameters

  • expandarray of strings

    Specifies which fields in the response should be expanded.

Returns

The invoice_payment object.

GET /v1/invoice_payments/{invoice_payment}
curl https://api.knoxapi.com/v1/invoice_payments/obj_123 \
  -H "Authorization: Bearer $KNOX_SECRET_KEY"
Response
{
  "amount_paid": null,
  "amount_requested": 1112626247,
  "created": 1028554472,
  "currency": "currency",
  "id": "obj_123",
  "invoice": "invoice",
  "is_default": true,
  "livemode": true,
  "object": "invoice_payment",
  "payment": {
    "type": "payment_intent"
  },
  "status": "status",
  "status_transitions": {
    "canceled_at": null,
    "paid_at": null
  }
}

Operations and schemas come from the pinned Stripe OpenAPI specification (MIT); response examples from its fixtures. Nested object definitions and enums are in the complete specification.