Retrieve Payment Summary
Changed onTotals 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.
Request
- Base URL: https://api.whop.com/api/v1
- URL: https://api.whop.com/api/v1/payments/summary
- Auth: HTTP bearer
Query parameters
Which breakdowns to return, keyed by these names under groups. Repeat the parameter to ask for several; omit it for all of them.
[ "substatus" ]
Only payments charged by this account, prefixed biz_.
Only payments in any of these lifecycle states. Repeat the parameter to pass several.
[ "paid" ]
Only payments whose substatus is any of these. Repeat the parameter to pass several.
[ "succeeded" ]
Only payments charged for any of these reasons. Repeat the parameter to pass several.
[ "subscription_cycle" ]
Only payments presented in any of these three-letter currencies. Repeat the parameter to pass several.
[ "usd" ]
Only payments priced by any of these variants, each prefixed plan_. Repeat the parameter to pass several.
[ "plan_xxxxxxxxxxxxx" ]
Only payments for any of these products, each prefixed prod_. Repeat the parameter to pass several.
[ "prod_xxxxxxxxxxxxx" ]
Only payments paid with any of these methods. Repeat the parameter to pass several.
[ "visa" ]
Only payments in any of these tracking states. Requires account_id and the shipment:basic:read permission.
[ "needs_tracking" ]
Only payments created after this ISO 8601 timestamp.
Only payments created before this ISO 8601 timestamp.
Search payments by user ID, membership ID, user email, name, or username.
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
Example response
{
"groups": {
"currency": {
"usd": 1
},
"substatus": {
"incomplete": 1
}
},
"total": 1
}Changes
- info
added the new optional
queryrequest parameterinclude_connected_accounts
- info
- info
endpoint added
- info