PlexySDK DOCS

Account Updater

Automatically update stored card credentials when cards are replaced, renewed, or reissued

Account Updater

Account Updater automatically retrieves updated card information from card networks when cards are replaced, renewed, or reissued. This reduces payment failures and involuntary churn by keeping your stored payment methods current without requiring customer action.

How Account Updater Works

Card networks (Visa and Mastercard) maintain databases of card updates. When a card is replaced, the issuer reports the new details to the network. Plexy queries these databases to retrieve updates for your stored cards.

Update Types

Account Updater can return several types of updates:

Update TypeCodeDescriptionRecommended Action
New card numbernew_panCard was replaced with a new numberAutomatically updated, no action needed
New expirationnew_expiryCard renewed with new expiry dateAutomatically updated, no action needed
Account closedaccount_closedCardholder closed their accountContact customer for new payment method
Contact cardholdercontact_cardholderNo update available, manual verification neededReach out to customer
No updateno_updateCard is current, no changesNo action needed

Account Updater Modes

Plexy offers two modes for retrieving card updates:

ModeDescriptionBest For
Real-TimeQuery for updates at transaction timeRecurring payments, subscription billing
BatchProactive updates on a scheduleLarge card portfolios, periodic maintenance

Both modes can be used together. Real-Time ensures payments succeed when attempted, while Batch keeps your entire card portfolio current between transactions.

Enabling Account Updater

Via API

Enable Account Updater for individual payments:

curl -X POST https://api.plexypay.com/v2/payments \
  -H "x-api-key: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 9900,
    "currency": "USD",
    "customer": "cus_abc123",
    "payment_method": "pm_card_visa_abc123",
    "off_session": true,
    "account_updater": {
      "enabled": true,
      "mode": "realtime"
    }
  }'
import { Plexy } from '@plexy/plexy-web';

const plexy = new Plexy({
  apiKey: process.env.PLEXY_SECRET_KEY,
});

const payment = await plexy.payments.create({
  amount: 9900,
  currency: 'USD',
  customer: 'cus_abc123',
  payment_method: 'pm_card_visa_abc123',
  off_session: true,
  account_updater: {
    enabled: true,
    mode: 'realtime',
  },
});

// Check if card was updated
if (payment.account_updater_result) {
  console.log('Update type:', payment.account_updater_result.update_type);
}
import os
from plexy import Plexy

plexy = Plexy(api_key=os.environ['PLEXY_SECRET_KEY'])

payment = plexy.payments.create(
    amount=9900,
    currency='USD',
    customer='cus_abc123',
    payment_method='pm_card_visa_abc123',
    off_session=True,
    account_updater={
        'enabled': True,
        'mode': 'realtime',
    },
)

# Check if card was updated
if payment.account_updater_result:
    print(f"Update type: {payment.account_updater_result['update_type']}")

Via Plexy Dashboard

Enable Account Updater as a default for all transactions:

Go to Settings > Account Management > Account Updater.

Toggle Real-Time Account Updater to check for updates during payment processing.

Toggle Batch Account Updater and select your preferred schedule (daily, weekly, or monthly).

Enable webhook notifications for card updates.

Webhook Events

Account Updater sends webhook notifications when card details change:

payment_method.updated

Sent when a stored payment method is updated with new card details.

{
  "id": "evt_abc123",
  "type": "payment_method.updated",
  "created_at": "2026-03-25T10:30:00Z",
  "data": {
    "payment_method": "pm_card_visa_abc123",
    "customer": "cus_abc123",
    "update_source": "account_updater",
    "update_type": "new_expiry",
    "changes": {
      "exp_month": {
        "old": 12,
        "new": 12
      },
      "exp_year": {
        "old": 2026,
        "new": 2029
      }
    },
    "card": {
      "brand": "visa",
      "last4": "4242",
      "exp_month": 12,
      "exp_year": 2029
    }
  }
}

payment_method.updated (New PAN)

When a card number changes:

{
  "id": "evt_def456",
  "type": "payment_method.updated",
  "created_at": "2026-03-25T10:35:00Z",
  "data": {
    "payment_method": "pm_card_visa_abc123",
    "customer": "cus_abc123",
    "update_source": "account_updater",
    "update_type": "new_pan",
    "changes": {
      "last4": {
        "old": "4242",
        "new": "8910"
      },
      "exp_month": {
        "old": 12,
        "new": 6
      },
      "exp_year": {
        "old": 2026,
        "new": 2030
      }
    },
    "card": {
      "brand": "visa",
      "last4": "8910",
      "exp_month": 6,
      "exp_year": 2030
    }
  }
}

payment_method.action_required

Sent when Account Updater cannot find an update and recommends contacting the cardholder.

{
  "id": "evt_ghi789",
  "type": "payment_method.action_required",
  "created_at": "2026-03-25T10:40:00Z",
  "data": {
    "payment_method": "pm_card_visa_abc123",
    "customer": "cus_abc123",
    "action": "contact_cardholder",
    "reason": "no_update_available",
    "card": {
      "brand": "visa",
      "last4": "4242",
      "exp_month": 12,
      "exp_year": 2026
    },
    "recommendation": "The card may be expired or closed. Contact the customer to update their payment method."
  }
}

payment_method.closed

Sent when Account Updater reports that the account is closed.

{
  "id": "evt_jkl012",
  "type": "payment_method.closed",
  "created_at": "2026-03-25T10:45:00Z",
  "data": {
    "payment_method": "pm_card_visa_abc123",
    "customer": "cus_abc123",
    "update_source": "account_updater",
    "reason": "account_closed",
    "card": {
      "brand": "visa",
      "last4": "4242"
    },
    "recommendation": "Remove this payment method and contact the customer for an alternative."
  }
}

Checking Update History

Retrieve the update history for a payment method:

curl https://api.plexypay.com/v2/payment_methods/pm_card_visa_abc123/account_updates \
  -H "x-api-key: Bearer YOUR_API_KEY"
const updates = await plexy.paymentMethods.listAccountUpdates('pm_card_visa_abc123');

for (const update of updates.data) {
  console.log(`${update.update_type} at ${update.updated_at}`);
}
updates = plexy.payment_methods.list_account_updates('pm_card_visa_abc123')

for update in updates.data:
    print(f"{update['update_type']} at {update['updated_at']}")

Response

{
  "object": "list",
  "data": [
    {
      "id": "acu_abc123",
      "payment_method": "pm_card_visa_abc123",
      "update_type": "new_expiry",
      "source": "batch",
      "changes": {
        "exp_year": {
          "old": 2026,
          "new": 2029
        }
      },
      "updated_at": "2026-03-24T02:15:00Z"
    },
    {
      "id": "acu_def456",
      "payment_method": "pm_card_visa_abc123",
      "update_type": "no_update",
      "source": "batch",
      "updated_at": "2026-02-24T02:10:00Z"
    }
  ],
  "has_more": false
}

Supported Regions and Networks

NetworkReal-TimeBatchCoverage
Visa (VAU)YesYesUS, EU, APAC, LATAM
Mastercard (ABU)YesYesUS, EU, APAC, LATAM
American ExpressNoYesUS only
DiscoverNoYesUS only
UnionPayNoYesChina, APAC

Account Updater coverage varies by issuer. Not all issuers participate in card network update programs. Contact support for specific coverage in your markets.

Best Practices

Combine Both Modes

Use Real-Time for payments and Batch for proactive maintenance:

  • Real-Time: Ensures payments succeed when they're attempted
  • Batch: Keeps your full card portfolio current, even for inactive customers

Handle All Update Types

Implement handlers for each update type:

async function handleAccountUpdate(event) {
  const { update_type, payment_method, customer } = event.data;

  switch (update_type) {
    case 'new_pan':
    case 'new_expiry':
      // Card updated automatically, log for records
      await logCardUpdate(payment_method, update_type);
      break;

    case 'account_closed':
      // Mark payment method as inactive
      await markPaymentMethodInactive(payment_method);
      // Notify customer
      await sendPaymentMethodClosedEmail(customer);
      break;

    case 'contact_cardholder':
      // Queue customer outreach
      await queueCustomerOutreach(customer, payment_method);
      break;
  }
}

Monitor Update Metrics

Track these key metrics in Plexy Dashboard:

  • Update success rate: Percentage of cards successfully updated
  • Update type distribution: Breakdown by new PAN, new expiry, closed, etc.
  • Cards requiring action: Count of cards needing customer contact

Sync with Your Systems

When a card is updated, sync the changes with your CRM and customer-facing systems:

app.post('/webhooks/plexy', async (req, res) => {
  const event = verifyWebhook(req);

  if (event.type === 'payment_method.updated') {
    const { customer, card, changes } = event.data;

    // Update your customer database
    await db.customers.updatePaymentMethod(customer, {
      last4: card.last4,
      exp_month: card.exp_month,
      exp_year: card.exp_year,
    });

    // Update billing system
    await billingSystem.updateCard(customer, card);

    // Update CRM
    await crm.logCardUpdate(customer, changes);
  }

  res.status(200).send('OK');
});

Pricing

Account Updater is included in your Plexy account:

FeatureCost
Real-Time queriesIncluded
Batch updatesIncluded
Network feesPassed through at cost

Card networks charge per-query fees for Account Updater. These fees are typically $0.01-$0.03 per card checked and are passed through at cost. Contact your account manager for volume pricing.

Next Steps

On this page