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. CCG onlyFor the direct-API request/response shape, see Reference: Duplicate Payment Method.
- Prerequisite: An existing customer wallet with at least one saved payment method.
- Use: Integrating and troubleshooting duplicate payment-method scenarios
π InternalNot visible in the public site
Duplicate detection internal processing steps and sequence diagram have moved to Engineering Guide β Duplicate Payment Method β Processing.
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
CARDwith 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_ACCOUNTwith 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
When processing duplicate cards, CCG follows specific rules for handling default and manufacturer card flags:
| Scenario | Result | Reason |
|---|---|---|
| Adding default card when existing is a manufacturer card | Default flag NOT honored | Manufacturer cards cannot be set as default |
| Adding manufacturer card when existing is a default card | Manufacturer flag honored, default status removed | System prioritizes manufacturer flag |
| Adding non-default card when existing is default | Non-default status honored | User 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.
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β
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.
| Event | When Triggered |
|---|---|
PAYMENT_METHOD_CREATED | Sent first, reflecting the initial create attempt |
PAYMENT_METHOD_UPDATED | Sent 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."
}
}
}
}
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. CCG onlySee Reference: Duplicate Payment Method β API Response for the full response shape. 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. CCG onlyCheck the API response for a DUPLICATE_ENTRY warning 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?β
CCG onlyThis CCG guidance is not exposed in Optum Wallet.
Verify the latest payment method details via POST /v2/payment-methods/search and re-sync your records if needed.
Integration Checklistβ
CCG onlyThis CCG guidance is not exposed in Optum Wallet.
- Check every payment-method record for a
warningfield, not justerror
- Surface
DUPLICATE_ENTRYto users as "your payment information was updated," not as a failure - Process
PAYMENT_METHOD_CREATEDandPAYMENT_METHOD_UPDATEDwebhooks in order and reconcile against the finalPAYMENT_METHOD_UPDATEDstate
CCG onlyThis CCG guidance is not exposed in Optum Wallet.
- Refresh your local payment-method list after handling a duplicate response
Related Documentationβ
CCG onlyThis CCG guidance is not exposed in Optum Wallet.
- Reference: Duplicate Payment Method β API request/response shape
- Payment Methods β business capability overview
- Webhooks β general webhook setup
- Payment Error Codes