Capture Truemed Session

Report a charge you captured on your own payment rail. Send a `transaction_info` block describing the charge; Truemed records it onto the session — for substantiation and session history — and computes its fee. The captured amount is derived from the session's order items rather than trusted from the request, so there is no separate amount field. Idempotent on the pair of sales channel and `merchant_transaction_id`: replaying the same merchant transaction returns the originally recorded result rather than double-recording the charge.

Authentication

x-truemed-api-keystring

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

Path parameters

truemed_session_idstringRequired
The Truemed session ID from the URL path.

Request

Request body for CaptureTruemedSessionV2Request
item_detailslist of objectsRequired

Itemized attribution for the captured amount: each entry captures part of a line item, up to its capturable quantity and total from the session detail. The captured amount is derived from these line totals, not a separate amount field.

idempotency_keystring or nullOptional1-200 characters

A unique key making the capture report safely retryable. Capture reports are also deduplicated by merchant_transaction_id.

merchant_transaction_idstring or nullOptional1-200 characters

Your processor’s identifier for the captured transaction. Deduplication key: reporting the same merchant_transaction_id again returns the original result. Required when reporting a capture.

transaction_infoobject or nullOptional

Settlement details for a capture your platform processed on its own rail. Required alongside merchant_transaction_id.

Response

Successful response
captured_amount_centsinteger
Cumulative captured amount on this session, in cents, including this capture.
truemed_session_idstring
The session the capture was executed against.
capture_idstring or null

Truemed’s stable ID for the recorded capture (mrt_<capture_id>).

Errors

400
Bad Request Error
404
Not Found Error
405
Method Not Allowed Error
500
Internal Server Error
501
Not Implemented Error