Checking access…

Skip to main content
Audience: Consumers, CCG Platform Engineers

Duplicate Payment Method

CCG automatically detects when a newly added payment method matches one already in a customer's wallet, updates the existing record instead of creating a second one, and returns a warning so your integration can react correctly. This page covers how detection works and how to react to it via webhooks.

Integration Details
  • Prerequisite: An existing customer wallet with at least one saved payment method.
  • Use: Integrating and troubleshooting duplicate payment-method scenarios

Duplicate Detection Rules​

How a payment method is identified as a duplicate

Card​

A card is identified as duplicate when it has:

  • Payment method type CARD with identical card number and vendor fingerprint as an existing card
  • Same or updated metadata such as expiry date, cardholder name, nickname, or zip code

Bank Account​

A bank account is identified as duplicate when it has:

  • Payment method type BANK_ACCOUNT with identical account number and routing number as an existing bank account
  • Same or updated metadata such as bank account name or nickname

Special Handling of Card Flags​

Flag behavior with duplicate cards
Flag Handling Limitations

When processing duplicate cards, CCG follows specific rules for handling default and manufacturer card flags:

ScenarioResultReason
Adding default card when existing is a manufacturer cardDefault flag NOT honoredManufacturer cards cannot be set as default
Adding manufacturer card when existing is a default cardManufacturer flag honored, default status removedSystem prioritizes manufacturer flag
Adding non-default card when existing is defaultNon-default status honoredUser preference is respected

This ensures data consistency and compliance with business rules, though it may sometimes result in unexpected behavior from the end-user perspective.

info

DUPLICATE_ENTRY is a warning, not an error β€” it doesn't fail the request, whether you see it via the direct API or the webhook payload below. Do not treat it as a failure condition.

Webhooks​

Not yet in the webhooks-v2 OpenAPI spec

Payment-method lifecycle events are not currently modeled in /webhooks-v2/ (only Payment, Refund, and Dispute are). The event names and payload below reflect current platform behavior; confirm with your CCG integration contact before relying on them as a versioned contract.

EventWhen Triggered
PAYMENT_METHOD_CREATEDSent first, reflecting the initial create attempt
PAYMENT_METHOD_UPDATEDSent second, confirming the existing payment method was updated instead
PAYMENT_METHOD_UPDATED event β€” warning payload
{
"name": "PAYMENT_METHOD_UPDATED",
"payload": {
"paymentMethod": {
"id": "xxx-xxx-xxx-xxx-xxx",
"paymentMethodType": "CARD",
"warning": {
"code": "DUPLICATE_ENTRY",
"title": "Payment method already exists",
"description": "Any new details provided have been updated accordingly."
}
}
}
}
caution

Process these events in order. The PAYMENT_METHOD_UPDATED event is the one that reflects the final state β€” do not treat PAYMENT_METHOD_CREATED alone as confirmation that a new payment method was created.

Error Handling​

DUPLICATE_ENTRY is a warning on an otherwise-successful response, not an error code. For genuine failure responses on this flow, see the general Payment Error Codes reference.

FAQ​

I expected a new payment method but got an update instead β€” why?​

CCG detected a duplicate. Check the PAYMENT_METHOD_UPDATED webhook payload's warning field to confirm.

Why wasn't the default flag applied to my newly added card?​

The existing matching card is a manufacturer card, which cannot be set as default β€” see Special Handling of Card Flags.

The payment method still shows outdated information β€” what happened?​

The update may not have completed, or the PAYMENT_METHOD_UPDATED webhook hasn't arrived yet β€” there's no direct lookup to fall back on. If it doesn't arrive, contact your CCG representative for reconciliation.

Integration Checklist​

  • Surface DUPLICATE_ENTRY to users as "your payment information was updated," not as a failure
  • Process PAYMENT_METHOD_CREATED and PAYMENT_METHOD_UPDATED webhooks in order and reconcile against the final PAYMENT_METHOD_UPDATED state