Integration GuideAPI Reference
Integration Guide

H2H: Manage Saved Cards

Use the payment instruments API to display a customer's saved cards, retrieve a card by its pi_ token or remove a saved card. Each card belongs to a settlement account and a customer identified by merchantPayerReference.

These endpoints manage cards saved through the API or Hosted Checkout. To create a saved card, see Card Tokenization via API. To charge it, see Payments with Saved Cards.

Access and customer identification

📘

Ask the integration team to enable H2H tokenization for the settlement account. The feature must be enabled for listing, retrieving and deleting cards.

Paths below are relative to the processing base URL. See Access URLs and API Authentication.

Headers for all requests
HeaderRequiredValue
AuthorizationYesBearer <access_token>
settlement-account-idYesThe settlement account in which the cards were saved

For a list or deletion request, supply exactly one customer selector:

  • merchantPayerReference: the same nonblank customer reference you used when saving the card.
  • payerId: the platform payer identifier, including its PAYR prefix.

Do not send both selectors. payerId is an alternative for these management requests; payments by token still require payer.merchantPayerReference.


List saved cards

API reference: Get saved payment instruments by payer.

Endpoint: GET /api/v1/payment-instruments

Example: GET /api/v1/payment-instruments?merchantPayerReference=12345&status=ACTIVE

Use the shared request headers above. No request body is required. This example selects cards whose reported status is ACTIVE.

Query parameters
ParameterRequirementDescription
merchantPayerReferenceOne customer selector requiredYour nonblank customer reference; mutually exclusive with payerId
payerIdOne customer selector requiredPlatform payer ID, such as PAYR204264682781298689; mutually exclusive with merchantPayerReference
paymentMethodNameOptional, repeatableMatch the method name, such as BankCardRU. An unknown name produces no matching cards
typeOptional, repeatableInstrument type. The supported value is CARD
statusOptional, repeatableACTIVE, BLOCKED, TERMINATED, USABLE or UNUSABLE
sortOptionaldesc by default, or asc, by lastUsedAt

Omit status to include the available status categories. USABLE is a shorthand for ACTIVE; UNUSABLE selects BLOCKED or TERMINATED. These are status filters, not a guarantee of payment approval or MIT eligibility.

Repeat the parameter name to select multiple values. For example:

GET /api/v1/payment-instruments?merchantPayerReference=12345&paymentMethodName=BankCardRU&status=ACTIVE&status=TERMINATED&sort=desc

Values within one filter are combined with OR; different filters are combined with AND. Use status=ACTIVE&status=TERMINATED, without square brackets in parameter names. Empty optional filter values are ignored.

Sorting does not update lastUsedAt. Records with no lastUsedAt appear first for desc and last for asc. Deleted tokens are excluded from the list.


Retrieve a saved card

API reference: Get saved payment instrument by token.

Endpoint: GET /api/v1/payment-instruments/{paymentInstrumentToken}

Example: GET /api/v1/payment-instruments/pi_01J8ZC4M7QK3T5V9XB2NDR6HAG

Use the shared request headers above. No request body or customer query parameter is required.

Path parameter
ParameterTypeRequiredDescription
paymentInstrumentTokenStringYesThe saved-card token beginning with pi_
📘

The endpoint checks that the token belongs to the settlement account supplied in the header. Your application must still ensure that the returned card belongs to the user viewing it.


Delete a saved card

API reference: Delete saved payment instrument by token.

Endpoint: DELETE /api/v1/payment-instruments/{paymentInstrumentToken}

Example: DELETE /api/v1/payment-instruments/pi_01J8ZC4M7QK3T5V9XB2NDR6HAG?merchantPayerReference=12345

Alternatively, identify the customer with payerId:

DELETE /api/v1/payment-instruments/pi_01J8ZC4M7QK3T5V9XB2NDR6HAG?payerId=PAYR204264682781298689

Use the shared request headers above. No request body is required. The account, token and customer must match.

Path parameter
ParameterTypeRequiredDescription
paymentInstrumentTokenStringYesThe saved-card token beginning with pi_
Query parameters
ParameterRequirementDescription
merchantPayerReferenceOne customer selector requiredThe same nonblank customer reference used when saving the card; mutually exclusive with payerId
payerIdOne customer selector requiredPlatform customer identifier, beginning with PAYR; mutually exclusive with merchantPayerReference

After deletion:

  • The token is excluded from card lists and cannot be used for new payments.
  • Retrieving that token returns HTTP 404 with INSTRUMENT_NOT_FOUND.
  • Saving the same card again creates a new token.
  • Existing payment records remain available. A token echoed on a historical payment does not mean it is still usable.
flowchart LR
  saved["Saved card: pi_ token"] -->|"Eligible CIT or MIT payment"| saved
  saved -->|"Delete token"| deleted["Token unavailable"]
  deleted -->|"Save the card again"| replacement["New pi_ token"]
📘

Deleting a card does not cancel or refund a payment already in progress. Check that payment's result and use the standard cancellation or refund operation when applicable.

Errors

HTTP statuserrorCodeMeaning
400400Invalid query parameters, such as missing or conflicting customer selectors, an invalid payer ID, status, type or sort value
403CAPABILITY_DISABLEDH2H tokenization is disabled for the settlement account. This also applies to deletion
404INSTRUMENT_NOT_FOUNDGET cannot find the token within the settlement account, including when it was deleted. DELETE cannot find it within the settlement account and customer scope
Error response object
FieldTypeDescription
errorCodeNumber or stringNumeric 400 for an invalid request, or the named error code shown above
failureMessageStringExplanation of the error
timestampNumberTime the error response was generated, as a Unix timestamp in seconds; it can include a fractional part

Example HTTP 404 response excerpt:

{
  "errorCode": "INSTRUMENT_NOT_FOUND",
  "failureMessage": "Saved payment instrument not found"
}

The full error response also includes timestamp.


Did this page help you?