List Payment Sessions

All payment sessions created with the Create payment session API call can be listed via a GET to `/payments/v1/payment_sessions`. By default, all payment sessions, including those that are pending, created as auth holds and those that have been manually voided or captured will be listed. Options are provided for granular filtering, pagination, and search. ## Pagination All results are paginated, with 30 per page. The response field `pagination` contains information on how many payment sessions there are and how many pages are available for the filtered query. ## Sorting Payment sessions are sorted by the date they are created, with newer ones being returned first. # Response Notes The response is an array of payment sessions in the `payment_sessions` key. A few things to point out about the response payload: - `order_items` **(Optional)** - The list of the current state of the order items passed into `create_payment_session` if `include_order_items` is True - `total_refundable` **(Optional)** - If the Payment Session has been captured, this value will be the remaining amount refundable for this item. Otherwise it will not be included. - `quantity_refundable` **(Optional)** - If the Payment Session has been captured, this value will be the remaining quantity refundable for this item. Otherwise it will not be included. - `total_capturable` **(Optional)** - If the Payment Session is an authorization and is currently authorized, this value will be the remaining amount capturable for this item. Otherwise it will not be included. - `quantity_capturable` **(Optional)** - If the Payment Session is an authorization and is currently authorized, this value will be the remaining quantity capturable for this item. Otherwise it will not be included. - `authorized_on` - the date the payment was authorized in ISO 8601 format - example: "2024-06-13T16:03:07.473Z" - For `kind`: `one_time_payment`, this will be the same as `captured_on` - `refund_amount` **(Optional)** - int - Only present when `summarize_refunds=True` is included in the request. - The sum of processed refunds for the payment session, **in cents** - `truemed_fee` **(Optional)** - decimal - **in dollars** - Only present when `include_truemed_fee=True` is included in the request. - The fee collected by truemed for this payment session. The response also includes a `pagination` object: ``` { "pagination": { "current_page": 1, "page_size": 30, "count": 54, "last_page": 2 }, "payment_sessions": [ ] } ``` - `current_page` - the page requested. If none was provided, this will default to 1. - `page_size` - the number of `payment_session`'s per page, which is always 30. - `count` - the total number of `payment_session`'s matching the filters provided. - `last_page` - the last page. - You can iterate through pages by providing integers up to `last_page` in the `page` parameter.

Authentication

x-truemed-api-keystring

Sales channel API key for merchant server-to-server authentication

Query parameters

pageintegerOptional
Optional field indicating which page to access. Defaults to 1.
page_sizeintegerOptional
Optional field indicating the number of records per page. Defaults to 30.
filter_pendingbooleanOptional
Filter out pending payment sessions.
filter_voidedbooleanOptional
Filter out voided payment sessions.
include_metadatabooleanOptional
Include metadata field in the response.
include_order_itemsbooleanOptional
Include order items in the response.
searchstringOptional
Search by payment session ID, user business ID, email, or name.
created_on_startdatetimeOptional

Filter payment sessions created on or after this date (ISO 8601 format).

created_on_enddatetimeOptional

Filter payment sessions created on or before this date (ISO 8601 format).

captured_on_startdatetimeOptional

Filter payment sessions captured on or after this date (ISO 8601 format).

captured_on_enddatetimeOptional

Filter payment sessions captured on or before this date (ISO 8601 format).

include_refundsbooleanOptional

Include refund details in the response (default: true).

include_disputesbooleanOptional

Include dispute details in the response (default: true).

kindlist of stringsOptional

Filter by payment kind (comma-separated list: one_time_payment, authorization).

statuslist of stringsOptional

Filter by payment session status (comma-separated list).

summarize_refundsbooleanOptional

Include refund_amount summary instead of full refund details.

include_truemed_feebooleanOptional
Include Truemed fee in the response.
payment_tokenstringOptional
Filter payment sessions by payment token ID.

Response

Successful response
payment_sessionslist of objects
List of payment session details.
paginationobject or null
A pagination object with information about the current page, page size, total count, and last page.

Errors