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.
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:
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.