GET
/
v1
/
invoices
/
by-processor-id
/
{processorId}
Fetch invoice by processor ID
curl --request GET \
  --url https://api.useaira.com/v1/invoices/by-processor-id/{processorId} \
  --header 'X-API-KEY: <api-key>'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "displayId": "<string>",
  "customer": {
    "id": "<string>",
    "externalId": "cust_1234567890abcdef",
    "name": "Acme Inc.",
    "customFields": {
      "custom_field_1": "value1",
      "custom_field_2": "value2"
    }
  },
  "paymentAccount": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "businessName": "<string>",
    "tradeName": "<string>",
    "taxId": "<string>",
    "email": "jsmith@example.com",
    "address": {
      "zipCode": "<string>",
      "number": "<string>",
      "street": "<string>",
      "neighborhood": "<string>",
      "city": "<string>",
      "state": "AC",
      "country": "Brasil",
      "complement": "<string>"
    }
  },
  "contract": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "startDate": "2023-12-25",
    "endDate": "2023-12-25",
    "billingEndDay": 16,
    "status": "active",
    "paymentSettings": {
      "scheduledPaymentDay": 16,
      "dueOffsetDays": 6
    },
    "billingSettings": {
      "billingCycleMinimumAmount": 1
    },
    "customFields": {}
  },
  "startDate": "2023-12-25",
  "endDate": "2023-12-25",
  "totalAmount": 1,
  "closedReason": "end_of_cycle",
  "payments": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "amount": 123,
      "dueDate": "2023-12-25",
      "createdAt": "2023-11-07T05:31:56Z",
      "processedAt": "2023-11-07T05:31:56Z",
      "paymentMethod": "bolepix",
      "status": "created",
      "pixLink": "<string>",
      "bankSlipLink": "<string>"
    }
  ],
  "status": "open",
  "plans": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "description": "<string>",
      "product": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>"
      },
      "planSettings": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "fixedAmount": 1,
        "minimumAmount": 1
      },
      "metrics": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "resourceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "currencyUnitId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "name": "<string>",
          "billingModel": "in_full",
          "priceTierDivision": "unique_tier",
          "fixedAmount": 1,
          "minimumAmount": 1,
          "resourceName": "<string>",
          "resourceType": "unit",
          "currencyUnit": {
            "id": "<string>",
            "name": "<string>",
            "code": "<string>"
          },
          "priceTiers": [
            {
              "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
              "billingType": "unit",
              "from": 2,
              "to": 2,
              "packageSize": 2,
              "price": "<string>",
              "fixedPrice": "<string>",
              "basisPoints": 1,
              "totalAmount": 1,
              "usage": 1
            }
          ],
          "totalAmount": 1
        }
      ],
      "totalAmount": 1
    }
  ],
  "additionalItems": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "description": "<string>",
      "amount": 2,
      "type": "discount"
    }
  ]
}

Authorizations

X-API-KEY
string
header
required

API Key Authentication.

Path Parameters

processorId
string
required

Response

Default Response

id
string<uuid>
required

The unique identifier of the invoice.

displayId
string
required

The human-readable identifier of the invoice.

customer
object
required

The customer associated with this invoice.

paymentAccount
object
required

The payment account used for this invoice.

contract
object
required

The contract associated with this invoice.

startDate
string<date>
required

The start date of the billing period.

endDate
string<date>
required

The end date of the billing period.

totalAmount
number
required

The total amount to be paid for this invoice.

Required range: x >= 0
closedReason
enum<string> | null
required

The reason why the billing cycle was closed.

Available options:
end_of_cycle,
billing_end_day_updated
payments
object[] | null
required

List of payments associated with this invoice.

status
enum<string>
required

The current status of the invoice.

Available options:
open,
closed,
paid,
canceled
plans
object[]
required

List of plans associated with this invoice.

Minimum length: 1
additionalItems
object[]
required

List of additional items charged in this invoice.