v1

latestOpenAPI 3.0.02026-07-24161215397.4 KB
Payments

Retrieve all payments

Retrieve a list of payments based on provided filters

Required scopes: flex.billing.payments.read

get/api/v2/organizations/{orgSlug}/payments

Path parameters

orgSlugstring required

organization slug

Query parameters

_idstring
Example:_id[$in]=6780f1ba1a2b3c4d5e6f7a8b,6780f1ba1a2b3c4d5e6f7a8c

Filter by a list of payment ids

memberstring
Example:6780f1ba2b3c4d5e6f7a8b9c

Filter by member id of the payment.

companystring
Example:6780f1ba3c4d5e6f7a8b9c0d

Filter by company id of the payment.

datestring
Example:date[$gte]=2025-01-01T00:00:00.000Z

Filter by the issue date of the document. Supports date comparison filters: $gt, $gte, $lt, $lte

dueDatestring
Example:dueDate[$gte]=2025-01-01T00:00:00.000Z

Filter by the due date of the document. Supports date comparison filters: $gt, $gte, $lt, $lte

numberstring
Example:INV-123

Filter by the document number for the payment.

locationstring
Example:6780f1ba4d5e6f7a8b9c0d1e

Filter by location id of the payment.

documentType'creditNote' | 'invoice' | 'overpayment' | 'paymentCharge'

The type of the document. It could be either invoice, creditNote, or overpayment. If omitted, invoice is assumed.

Filter by the type of the document. It could be either invoice, creditNote, or overpayment. If omitted, invoice is assumed.

statusstring

Filter by status of the invoice, credit note, or overpayment. Supports both single status values (e.g., status=paid) and array operations (e.g., status[$in]=paid,pending). Note: Multiple values in simple string format (e.g., status=paid,pending) are not allowed - use status[$in] format instead.

modifiedAtstring
Example:modifiedAt[$gte]=YYYY-MM-DDTHH:mm:ssZ

Filter by the modified date. Supports date comparison filters: $gt, $gte, $lt, $lte

createdAtstring
Example:createdAt[$gte]=YYYY-MM-DDTHH:mm:ssZ

Support date comparison filters: $gt, $gte, $lt, $lte

$selectstring
Example:recipient,sender

Select fields to return

$cursorNextstring
$cursorPrevstring
$limitnumber
$sortstring
Example:propertyName:asc

Sort expression in the format <field>:<order>, where order is asc or desc

Response

rangeStartnumber
rangeEndnumber
cursorNextstring
cursorPrevstring

Example response

{
  "results": [
    {
      "properties": {
        "customProperty1": "value1",
        "customProperty2": "value2"
      },
      "_id": "6780f1ba1a2b3c4d5e6f7a8b",
      "number": "INV-123",
      "date": "2025-01-01T00:00:00.000Z",
      "dueDate": "2025-01-01T00:00:00.000Z",
      "company": "6780f1ba3c4d5e6f7a8b9c0d",
      "member": "6780f1ba2b3c4d5e6f7a8b9c",
      "location": "6780f1ba4d5e6f7a8b9c0d1e",
      "reference": "Payment for the membership fee.",
      "allocations": [],
      "lines": [
        {
          "description": "Membership fee",
          "quantity": 2,
          "account": "6780f1ba5e6f7a8b9c0d1e2f",
          "plan": "6780f1ba6f7a8b9c0d1e2f3a",
          "fee": "6780f1ba7a8b9c0d1e2f3a4b",
          "membership": "6780f1ba9c0d1e2f3a4b5c6d",
          "location": "6780f1ba4d5e6f7a8b9c0d1e",
          "taxRate": "6780f1ba1e2f3a4b5c6d7e8f",
          "taxPercent": 25,
          "taxAmount": 25.7,
          "discountAmount": 10,
          "price": 60,
          "unitPrice": 30,
          "unitDiscount": 5,
          "subTotal": 60,
          "baseUnitPrice": 70,
          "baseTotal": 60,
          "total": 60,
          "startDate": "2025-01-01T00:00:00.000Z",
          "endDate": "2025-01-01T00:00:00.000Z",
          "convertedAmounts": {
            "price": 60,
            "discountAmount": 10,
            "baseUnitPrice": 70,
            "subTotal": 60,
            "unitPrice": 30,
            "taxAmount": 12,
            "taxPercent": 15,
            "baseTotal": 60,
            "total": 60
          },
          "addons": [
            {
              "name": "Addon 1",
              "unitPrice": 10,
              "description": "Addon description"
            },
            {
              "name": "Addon 2",
              "unitPrice": 20,
              "description": "Addon description"
            }
          ],
          "fees": [
            "6780f1ba7a8b9c0d1e2f3a4b",
            "6780f1ba8b9c0d1e2f3a4b5c"
          ],
          "memberships": [
            "6780f1ba9c0d1e2f3a4b5c6d"
          ]
        }
      ],
      "processingFeeLine": {
        "taxPercent": 12,
        "taxAmount": 15,
        "price": 60,
        "discountAmount": 10,
        "unitPrice": 30,
        "baseUnitPrice": 70,
        "subTotal": 60,
        "baseTotal": 60,
        "total": 60,
        "convertedAmounts": {
          "taxPercent": 12,
          "taxAmount": 15,
          "price": 60,
          "discountAmount": 10,
          "unitPrice": 30,
          "baseUnitPrice": 70,
          "subTotal": 60,
          "baseTotal": 60,
          "total": 60
        },
        "description": "Membership fee",
        "account": "6780f1ba5e6f7a8b9c0d1e2f",
        "plan": "6780f1ba6f7a8b9c0d1e2f3a",
        "fee": "6780f1ba7a8b9c0d1e2f3a4b",
        "location": "6780f1ba4d5e6f7a8b9c0d1e",
        "membership": "6780f1ba9c0d1e2f3a4b5c6d",
        "taxRate": "6780f1ba1e2f3a4b5c6d7e8f",
        "discount": 10,
        "unitDiscount": 5,
        "quantity": 2,
        "startDate": "2023-01-01T00:00:00.000Z",
        "endDate": "2023-01-01T00:00:00.000Z",
        "addOns": {
          "name": "Basic addon",
          "unitPrice": 10,
          "description": "Addon description"
        },
        "fees": [
          "6780f1ba7a8b9c0d1e2f3a4b",
          "6780f1ba8b9c0d1e2f3a4b5c"
        ],
        "memberships": [
          "6780f1ba9c0d1e2f3a4b5c6d",
          "6780f1ba0d1e2f3a4b5c6d7e"
        ]
      },
      "taxAmounts": [
        {
          "percent": 25,
          "total": 25.7,
          "taxRate": "6780f1ba1e2f3a4b5c6d7e8f"
        }
      ],
      "subTotal": 60,
      "amount": 60,
      "payableAmount": 60,
      "accounting": {
        "provider": "xero",
        "providerId": "123456789",
        "externalOrgId": "987654321",
        "deepLink": "https://quickbooks.com/123456789",
        "lastSync": "2025-01-01T00:00:00.000Z",
        "error": "An error occurred while syncing with Xero"
      },
      "baseTotal": 60,
      "total": 80,
      "paidAmount": 40,
      "pendingAmount": 40,
      "allocatedAmount": 40,
      "currency": "USD",
      "currencyConversionRate": 0.98567,
      "isPaid": true,
      "chargeMethod": "Credit Card",
      "createdAt": "2025-01-01T00:00:00.000Z",
      "createdBy": "6780f1ba4b5c6d7e8f9a0b1c",
      "modifiedAt": "2025-01-01T00:00:00.000Z",
      "modifiedBy": "6780f1ba4b5c6d7e8f9a0b1c"
    }
  ]
}