Log in
Interface

PaymentTokenManagementInterface

Magento\Vault\Api\PaymentTokenManagementInterface

What it does

This interface defines the contract for managing payment vault tokens in Magento 2.

Developers use this to retrieve, save, and link stored payment tokens (like saved credit cards) to customers and orders, enabling features like "Save for later use" during checkout.

It provides methods to fetch tokens by customer ID, gateway token, public hash, or payment ID, and to establish relationships between tokens and order payments.

Public Methods

  • getListByCustomerId()
  • getByPaymentId()
  • getByGatewayToken()
  • getByPublicHash()
  • saveTokenWithPaymentLink()
  • addLinkToOrderPayment()