Replace a Card

Outcome

Use this guide to replace an existing card through PayAPI while preserving the cardholder’s established customer and account context.

A replacement creates a successor card with:

  • A new PAN
  • A new public card token
  • A new expiry date

The source card remains the input to the lifecycle operation. After a successful response, use the returned successor token for all future card operations.

Who this is for

AudienceResponsibility
Backend EngineerOrchestrates the lifecycle API, persists the successor public card token, and implements idempotency and reconciliation.
Product ManagerDefines eligible reasons, product choice, initial status, wallet policy, and cardholder experience.
Operations and Fulfilment TeamConfirms physical-card personalization, delivery, activation, and support procedures.

Overview

Prerequisites

Before reissuing any cards, the following program-level configuration is enabled in cooperation with Paymentology:

PrerequisiteDescription
Client and API accessValid client_id and entitlement to use the Card Lifecycle V2 API.

The configuration is done during the onboarding in cooperation the Paymentology Implementation team.
Eligible source cardExisting public card token belonging to the client. Do not void the source card with status_nwk: 1199 before this operation.
Existing customerCustomer record associated with the source card.
Existing account relationshipSource card’s account mapping. A new account is not normally required.
Target card productExisting, eligible crd_prdct_id. This can be the current product or an approved alternative product.
Fulfilment configurationRequired for a physical successor: manufacturer, artwork, personalization, carrier, and delivery design.
Wallet-token policyA documented decision on how existing digital wallet tokens should be handled.

Recommended flow

Confirm the source-card context

Retrieve and validate the source card’s public token, customer, linked account, product, current status, and any linked wallet tokens.

For a lost or stolen card, decide whether linked wallet tokens should remain usable before changing card status.


Select the successor behaviour

DecisionRequired outcome
card_action1
PANNew
Public card tokenNew
ExpiryNew
ProductExisting or approved target product
Initial statusCommonly 1005 when a physical card must remain unusable until delivery

Call Card Renewal

API Reference: Card Renewal V2

Key inputs:

FieldValue / purpose
client_idYour program client ID
api_call_unique_identifierDurable idempotency identifier for this business attempt
tokenPublic token of the source card
card_action1
reasonBusiness reason recorded against the action
crd_prdct_idExisting target card product
status_nwkThe successor card’s network-facing status, commonly1005until delivery. It determines how the card’s public token is treated during authorization.

More information about the card statuses is available at Card status.
tok_flags

An optional 32-character binary string that controls card transaction behaviour

Each character represents one flag position:
  • 0 = flag inactive
  • 1 = flag active
Example:

E-commerce-only card. Position 5 is set to 1: "tok_flags":"00001000000000000000000000000000"

More information about token flags is available at Token flags.

exp_date

When provided in the request, the expiry is assigned during replacement.

When not provided in the request, automatic expiry date is computed from the Product during replacement.

image_name, image_fields, image_delivery, xml_fieldsCard-image and sensitive-response controls
update_digital_token

Controls whether existing digital-wallet tokens linked to the card should be included in the card lifecycle operation.

It does not create a new Apple Pay, Google Pay, VTS, or MDES token. It only applies to existing wallet tokens, and automatic processing is available only when the client uses Paymentology’s tokenization services.

client_card_refRecommended client-side business and reconciliation reference

Persist the successor public card token returned by the API. Do not continue using the source public card token for later card-management operations.


Physical personalisation and delivery

Use the Create Card request’s physical-card fields only where they are agreed for the program and supported by the selected manufacturer.

AreaExamples of relevant fields
Cardholder details i.e. the person whose name is associated with the card.

Use the ch_* fields to describe the person who will hold and use the card.

If you provide an existing cu_id, the Create Card contract states that the cardholder fields are not required. Use this pattern when the customer has already been created through Create Customer and you want one durable customer record to be reused across cards and accounts.

If you do not provide cu_id, provide the cardholder details required by your program. Do not send conflicting cu_id and ch_* data without agreeing which source is authoritative.

Delivery recipient and address

Use the del_* fields to state where and how the physical card should be delivered. These fields describe delivery logistics, not the identity of the cardholder.

Use them when the delivery recipient or address differs from the cardholder, or when the manufacturer and courier process requires explicit delivery information.

Purchaser delivery

A purchaser is the person or organisation arranging the card, rather than necessarily the person who will use it. This is relevant when a company, parent, guardian, or other authorised third party requests delivery for a cardholder.

pur_cust_type selects the address source for an individual delivery:
  • 0 - Deliver to the cardholder address.
  • 1 - Deliver to the purchaser address.
When pur_cust_type is 1, provide a complete and internally consistent pur_* identity and address set. When it is 0, ensure the cardholder details are sufficient for the agreed delivery design.
Carrier and packaging

A carrier is the physical packaging that holds the card when it is sent to the recipient. It can include printed information, terms, welcome material, activation instructions, or other inserts.

These fields, carrier_type, carrier_insrt1, carrier_insrt2, carrier_lang, envelope_ref, tell the physical-card fulfilment process which configured packaging components to use. Their allowed values are program- and manufacturer-specific.

Delivery grouping

Use bulk_delv_add_code when several physical cards should be delivered together to the same destination - for example, a batch of employee cards delivered to one company office.

Paymentology uses this value to group delivery information in the physical-card personalisation file under the BULK_DEL section.

Additional personalisation

These optional fields, ext_line1, ext_line2, custom_1, emboss_line4, carry additional card personalisation data to the manufacturer file: extra text lines, custom vendor data such as QR-code content, and a fourth front-of-card emboss line.

Some reserved values can automatically insert the card’s public token. Confirm the final printed placement and supported content with the configured card manufacturer.

The API creates the physical-card definition. The card is then included in the configured embossing or manufacturer-file process. File generation and dispatch frequency must be confirmed during onboarding; they are not proof of card delivery.


Wallet-token handling

A public card token is not a digital-wallet token. update_digital_token concerns existing network wallet tokens linked to the card.

Use caseRecommended approach
Existing wallet tokens should receive the new PANSet update_digital_token: true.
Lost or stolen card; wallet should stop workingUse Set Card Status V2 and apply the agreed wallet-status handling.
Physical card should be blocked while wallet remains usableSet the physical card status according to policy and validate wallet behavior in UAT.
No wallet tokens existDo not treat this operation as wallet provisioning. Wallet provisioning is a separate journey.

Current implementation distinguishes replacement as a PAN-replacement update. More at: LCM


Activate a successor issued in a blocked state

After physical delivery and the program’s activation checks, use Set Card Status V2.

API reference: Set Card Status V2

FieldValue / purpose
client_idYour program client ID.
api_call_unique_identifierIdempotency identifier for the status-change attempt.
tokenSuccessor card’s new public token.
status_nwkPass 1000 to activate the card.

More information about the card statuses is available at Card status.
action1 for the normal status-change path.

For wallet-token status propagation, include update_digital_token: true only when the wallet tokens should follow the card status.

What is created or changed

RecordReplacement
CustomerReused. Delivery or purchaser details may be updated where supplied.
Account and card-account relationshipReused for the successor card; validate in UAT.
CardNew successor card.
PANNew.
Public card tokenNew.
ExpiryNew.
Card productReused or changed to an approved target product.
Digital wallet tokenMay receive a lifecycle update when enabled; no new wallet token is provisioned.

Important considerations

  • Use V2 and treat the request as idempotent.
  • Do not run concurrent attempts for the same source card.
  • A timeout does not prove failure. Reconcile the original request before retrying.
  • Do not set the source card to 1199before calling the lifecycle API.
  • Persist the returned successor public token before initiating follow-on status or wallet actions.
  • Treat PAN, CVV, card image, delivery information, and wallet-token data as sensitive.
  • Validate downstream product eligibility, fulfillment, and wallet behavior in the target environment before production rollout.

Testing

Test caseExpected result
Happy pathA successor card is created with a new PAN, public card token, and expiry.
Physical successor issued blockedThe successor is unusable until activation.
Existing account relationshipThe successor has the expected account relationship.
Alternative approved productThe successor uses the configured target product and expected controls.
Wallet lifecycle update enabledExisting wallet tokens receive the agreed PAN-change lifecycle treatment.
Wallet lifecycle update disabledWallet-token behavior follows the agreed policy and is verified in UAT.
Duplicate submissionThe same idempotency identifier does not create an unintended second successor.
Timeout and retryThe client reconciles the original attempt before retrying.
FulfillmentManufacturer-file output, delivery data, and activation readiness match the agreed design.

Errors, retries, and request correction

Use header.error_id and header.error_desc as the primary outcome signal. Do not decide whether to retry from the HTTP status alone.

A replacement retains the existing public card token and updates the card expiry. For an uncertain or retryable replacement attempt, resend the identical payload with the same api_call_unique_identifier. Do not create a new identifier until you have reconciled whether the original renewal already completed.

Retry automatically

Error IDError descriptionAutomatic retry?Required retry behaviour
No response / timeoutNo API response was received.Yes, after reconciliationFirst check whether the request completed using the original identifier. If its outcome cannot be established, retry the identical request with the same identifier. Do not submit a second request with a new identifier.
1066Original request still processing. Please try again later.YesWait using bounded backoff, then resend the identical request with the same identifier. Do not run parallel retries.
987We are temporarily unable to handle the request. Please try again later.YesRetry the identical request using bounded backoff. Escalate if the retry limit is reached.
988Error executing Request. Contact Paymentology for support.ControlledRetry once only with the same payload and identifier. If it recurs, stop and raise a support case with the request identifier and timestamp.
989Error executing Request. Contact Paymentology for support.ControlledRetry once only with the same payload and identifier. If it recurs, stop and raise a support case with the request identifier and timestamp.
1035Failed to create card image, please contact Paymentology for support.ControlledRetry once with the same payload and identifier. If it recurs, investigate the card-image and product configuration before retrying again.

Do not retry automatically

Error IDError descriptionAutomatic retry?Required correction
990The client_id is invalid. Please provide a valid client id.NoCorrect the client credentials or client identifier.
993api_call_unique_identifier already been used.NoReconcile the earlier request using that identifier. Do not reuse it for a different replacement request.
994The token is invalid.NoCorrect the source card public token. Confirm that it identifies the card being replaced.
995model Validation Failed.NoCorrect the request. Typical causes include invalid status_nwk or 3ds_lang values.
996Permission denied. The client does not have access to this web service. Contact Paymentology.NoCorrect access entitlement and credentials. The service can process a corrected re-submission, but permission failures must not be scheduled as automatic retries.
997Description varies; for example, Token Details Not Found or Account Mapping list Not Found.NoCorrect the source-card reference or its account mapping before resubmitting.
1012The manufacturer id is not available in repository.NoUse a valid manufacturer configuration.
1013The manufacturer id is not associated with the client id.NoCorrect the manufacturer-to-client configuration.
1014The product id is not available in repository.NoCorrect the card product configuration.
1015Source-card lifecycle eligibility failure.NoCorrect the source card’s lifecycle eligibility and state, then submit a new, deliberate request. Do not repeatedly retry an unchanged request.
1019The card has been deactivated already.NoReconcile the source card’s current state and select the appropriate lifecycle action.
1021Inserting delivery details failed during physical card create.NoCorrect delivery details or fulfilment configuration. Check whether any downstream fulfilment record was created before resubmitting.
1022Inserting purchaser details failed during physical card create.NoCorrect purchaser details or fulfilment configuration. Check for partial downstream processing before resubmitting.
1028Weak CVV computed. Change expiry and resend request again.NoChange the applicable expiry value, then submit a new request.
1036Failed to encrypt card file.NoEscalate to Paymentology support. Do not repeatedly retry until the underlying issue is confirmed resolved.
1038Failed to upload into SFTP folder.NoCheck fulfilment-file and SFTP configuration, then reconcile whether a file was produced before resubmitting.

Related APIs:


Did this page help you?