latestOpenAPI 3.1.02026-08-203914245.9 MB

4a1a4a5d2c72

Payments

List payments

Returns a paginated list of payments for the actor in context, with optional filtering by product, plan, status, billing reason, currency, and creation date.

Required permissions:

  • payment:basic:read
  • plan:basic:read
  • access_pass:basic:read
  • member:email:read
  • member:basic:read
  • member:phone:read
  • promo_code:basic:read
  • shipment:basic:read
get/payments

Query parameters

afterstring

Returns the elements in the list that come after the specified cursor.

beforestring

Returns the elements in the list that come before the specified cursor.

firstinteger

Returns the first n elements from the list.

Example:42
lastinteger

Returns the last n elements from the list.

Example:42
company_idstring

The unique identifier of the company to list payments for.

Example:biz_xxxxxxxxxxxxxx
direction'asc' | 'desc'

The direction of the sort.

order'final_amount' | 'created_at' | 'paid_at'

The order to sort the results by.

product_idsstring[]

Filter payments to only those associated with these specific product identifiers.

billing_reasonsBillingReasons[]

Filter payments by their billing reason.

currenciesCurrencies[]

Filter payments by their currency code.

plan_idsstring[]

Filter payments to only those associated with these specific plan identifiers.

statusesReceiptStatus[]

Filter payments by their current status.

substatusesFriendlyReceiptStatus[]

Filter payments by their current substatus for more granular filtering.

include_freeboolean

Whether to include payments with a zero amount.

created_beforestring date-time

Only return payments created before this timestamp.

Example:2023-12-01T05:00:00.401Z
created_afterstring date-time

Only return payments created after this timestamp.

Example:2023-12-01T05:00:00.401Z
updated_beforestring date-time

Only return payments last updated before this timestamp.

Example:2023-12-01T05:00:00.401Z
updated_afterstring date-time

Only return payments last updated after this timestamp.

Example:2023-12-01T05:00:00.401Z
querystring

Search payments by user ID, membership ID, user email, name, or username. Email filtering requires the member:email:read permission.

checkout_configuration_idsstring[]

Only return payments from these checkout configurations.

Response

A successful response

Example response

{
  "data": [
    {
      "amount_after_fees": 6.9,
      "application_fee": {
        "amount": 6.9,
        "amount_captured": 6.9,
        "amount_refunded": 6.9,
        "created_at": "2023-12-01T05:00:00.401Z",
        "id": "apfee_xxxxxxxxxxxx"
      },
      "card_last4": "4242",
      "checkout_configuration_id": "ch_xxxxxxxxxxxxxxx",
      "company": {
        "id": "biz_xxxxxxxxxxxxxx"
      },
      "created_at": "2023-12-01T05:00:00.401Z",
      "dispute_alerted_at": "2023-12-01T05:00:00.401Z",
      "id": "pay_xxxxxxxxxxxxxx",
      "last_payment_attempt": "2023-12-01T05:00:00.401Z",
      "membership": {
        "id": "mem_xxxxxxxxxxxxxx"
      },
      "next_payment_attempt": "2023-12-01T05:00:00.401Z",
      "paid_at": "2023-12-01T05:00:00.401Z",
      "payment_instrument": {
        "installment_count": 42
      },
      "payment_method": {
        "card": {
          "exp_month": 42,
          "exp_year": 42,
          "last4": "4242"
        },
        "created_at": "2023-12-01T05:00:00.401Z",
        "id": "payt_xxxxxxxxxxxxx"
      },
      "payments_failed": 42,
      "plan": {
        "id": "plan_xxxxxxxxxxxxx"
      },
      "product": {
        "id": "prod_xxxxxxxxxxxxx",
        "route": "pickaxe-analytics",
        "title": "Pickaxe Analytics"
      },
      "promo_code": {
        "amount_off": 6.9,
        "id": "promo_xxxxxxxxxxxx",
        "number_of_intervals": 42
      },
      "refunded_amount": 6.9,
      "refunded_at": "2023-12-01T05:00:00.401Z",
      "shipment": {
        "carrier": "usps",
        "id": "ship_xxxxxxxxxxxxx",
        "tracking_number": "9400111899223456789012",
        "tracking_url": "https://track.aftership.com/9400111899223456789012"
      },
      "subtotal": 6.9,
      "tax_amount": 6.9,
      "total": 6.9,
      "updated_at": "2023-12-01T05:00:00.401Z",
      "usd_total": 6.9,
      "user": {
        "email": "john.doe@example.com",
        "id": "user_xxxxxxxxxxxxx",
        "name": "John Doe",
        "username": "johndoe42"
      }
    }
  ]
}