Partner operations
These operations support your own systems and your support team rather than the customer directly. Use them to reconcile subscription state with Truemed, catch expirations before they break a charge, and cancel tokens when a customer leaves.
List subscriptions
list_payment_token returns every token
associated with your API key. Use it to reconcile against your own records, to look up a customer for a
support agent, or to drive the expiration sweep below.
The response includes a pagination object with count, current_page, last_page, and page_size.
Iterate page up to last_page to walk the full set.
Monitor expirations
Run a recurring job that filters for LMNs and cards expiring in the next 30 days, and email those customers to update their payment method or retake the survey.
Nothing pushes these expirations to you—there’s no advance-warning webhook—so this job is the only way to catch them before a charge fails.
Running it daily gets you three things:
- Expiring cards caught before they cause a declined charge.
- Expiring LMNs caught before they cause an eligibility block.
- Customers who have time to act without their subscription being interrupted.
lmn_expires_before returns LMNs expiring between today and the date you pass. An LMN that
lapsed yesterday is not returned, even though that’s exactly the state blocking the next charge. Store
lmn_expires_at on your own subscription record so already-lapsed tokens stay visible to you.
Generate the link for each affected customer with
update_payment_token:
- Expiring card: send
update_card_info: true. It returns anUpdatePaymentMethodredirect_urlunconditionally. - Expiring LMN: send
renew_eligibility: truealong with the subscription’s currentorder_items. Without that flag a still-valid LMN comes backnext_action: "None"with no link to email. See Renew eligibility before the LMN expires.
The two cannot be combined in one call—make two.
Cancel a subscription
delete_payment_token permanently cancels a
token. Future charges are disabled—any attempt to use it with
create_payment_session returns a
NotFound error.
Deletion is irreversible. A token cannot be reactivated, and the customer has to requalify from scratch to subscribe again. To support pause/resume or grace periods, keep that state in your own system and only delete the token when the cancellation is final.