dambel

دمبل

shevron
ورود | ثبت نام

API Docs / payments / index



GET /api/v1/payments

Retrieves a list of payments and transactions. Users can view their own records; admins can view all records in the system.


Permissions

PermissionDescription
payments.view_allView all payments
payments.view_ownView only own payments

Query Parameters

NameTypeRequiredDescriptionExample
typestringNoSee available types. Comma-separated"wallet,subscription"
payable_typestringNoFilter by payable type(s), comma-separated"gym,plan"
payable_idintNoFilter by payable ID(s), comma-separated"1,2,3"
user_idintNoFilter by user ID(s), comma-separated"10,20"
is_doneboolNoFilter by completion statustrue
start_datestringNoStart of date range (YYYY-MM-DD)"2024-01-01"
end_datestringNoEnd of date range (YYYY-MM-DD)"2024-01-31"
min_amountnumberNoMinimum amount100
max_amountnumberNoMaximum amount1000
descriptionstringNoSearch in description"membership"
pageintNoPage number for pagination1
sortstringNoSort order: desc or asc"desc"

Request Example

GET /api/v1/payments?type=income&user_id=10&sort=desc&page=1
Authorization: Bearer {token}

Response

200 OK

Returns a paginated list of payment resources.

Example

{
  "data": [
    { /* payment resource */ },
    { /* payment resource */ }
  ],
  "links": { /* pagination data */ },
  "meta": { /* pagination data */ }
}

For a full schema, see Payment Resource.

See Pagination Data (per page: 30).


Error Responses

StatusDescriptionReference
401UnauthorizedAuthentication error
footer wave
logo

دمبل، دنیای هوشمند ورزش و تغذیه

LinkedinInstagramXYoutube