Payments

Retrieve Payment Summary

Changed on

Totals up the same payments the list returns, so you can build status tabs and filter options without paging through them. Takes the same filters as List Payments.

get/payments/summary

Request

  • Base URL: https://api.whop.com/api/v1
  • URL: https://api.whop.com/api/v1/payments/summary
  • Auth: HTTP bearer

Query parameters

groupsstring[]

Which breakdowns to return, keyed by these names under groups. Repeat the parameter to ask for several; omit it for all of them.

[
  "substatus"
]
account_idstring

Only payments charged by this account, prefixed biz_.

statusesstring[]

Only payments in any of these lifecycle states. Repeat the parameter to pass several.

[
  "paid"
]
substatusesstring[]

Only payments whose substatus is any of these. Repeat the parameter to pass several.

[
  "succeeded"
]
billing_reasonsstring[]

Only payments charged for any of these reasons. Repeat the parameter to pass several.

[
  "subscription_cycle"
]
currenciesstring[]

Only payments presented in any of these three-letter currencies. Repeat the parameter to pass several.

[
  "usd"
]
plan_idsstring[]

Only payments priced by any of these variants, each prefixed plan_. Repeat the parameter to pass several.

[
  "plan_xxxxxxxxxxxxx"
]
product_idsstring[]

Only payments for any of these products, each prefixed prod_. Repeat the parameter to pass several.

[
  "prod_xxxxxxxxxxxxx"
]
payment_methodsstring[]

Only payments paid with any of these methods. Repeat the parameter to pass several.

[
  "visa"
]
tracking_statesstring[]

Only payments in any of these tracking states. Requires account_id and the shipment:basic:read permission.

[
  "needs_tracking"
]
created_afterstring date-time

Only payments created after this ISO 8601 timestamp.

created_beforestring date-time

Only payments created before this ISO 8601 timestamp.

querystring

Search payments by user ID, membership ID, user email, name, or username.

include_connected_accountsboolean

Only for searches: with query, also search the account's connected accounts. Requires account_id and query, and is a 400 without either; it never lists connected accounts' payments on its own. Matches on payment, user or membership ID, buyer email, or a card's first 6 or 8 digits and last 4 separated by a space or dash (424242 4242). Free-text queries such as a name search only the named account. Connected accounts' payments are returned only for connected accounts you can read payments on.

Response

summary returned

totalinteger required

How many payments match the filters.

Example response

{
  "groups": {
    "currency": {
      "usd": 1
    },
    "substatus": {
      "incomplete": 1
    }
  },
  "total": 1
}

Changes