Skip to main content

Duplicate Payment Method

Payment method is considered as a duplicate payment method if newly added payment method details match with the existing payment method.

Duplicate Card

What is Duplicate Card?

If customer adds payment method with following details then, payment method is considered as a duplicate card.

  • Type as CARD with same card number and same fingerprint as existing card in the wallet.
  • Same or updated information like expiry date, name on card, nickname and zip code.

How CCG handles duplicate card scenario?

If customer adds duplicate card as per above definition in the wallet, then:

  • CCG updates existing card with updated information like new expiry date, name on card, nickname and zip code from newly added card.
  • PAYMENT_METHOD_CREATED webhook is sent to the merchant to indicate creation of new payment method.
  • PAYMENT_METHOD_UPDATED webhook is also sent to the merchant to indicate existing card details are updated as newly added payment method was duplicate.
  • In duplicate card scenario, if warning details mentioned below are present in the setup payment method details response or list payment methods response, then it indicates that duplicate card has been added by the customer, but CCG has updated existing card with new details and newly added card has been discarded.

⚠️ Warning Message Details:

  • Title: Payment method already exists
  • Description: Any new details provided have been updated accordingly.

How to access warning details?

1. GET Setup Payment Method API Response:
{
"data": {
"id": "xxx-xxx-xxx-xxx-xxx",
"platformVendorMerchantId": "platformVendorMerchantId",
"vendorSetupPaymentMethodSecret": "vendorSetupPaymentMethodSecret",
"status": "COMPLETED",
"paymentMethodId": "paymentMethodId",
"paymentMethodType": "CARD",
"error": null,
"warning": {
"code": "DUPLICATE_ENTRY",
"title": "Payment method already exists",
"description": "Any new details provided have been updated accordingly."
}
},
"url": "/customers/<customerId>/setup-payment-methods/<setupPaymentMethodId>"
}
2. GET Payment Methods API Response:
[
{
"id": "xxx-xxx-xxx-xxx-xxx",
"paymentMethodType": "CARD",
"vendorPaymentMethodId": "pm_xxx",
"vendorMerchantId": null,
"customerId": "xxx-xxx-xxx-xxx-xxx",
"vendor": "STRIPE",
"status": "COMPLETED",
"zipCode": "xxxxx",
"error": null,
"nickname": "nickname",
"lastModifiedBySource": null,
"lastModifiedByMerchantId": "xxx-xxx-xxx-xxx-xxx",
"lastModifiedByAgent": {
"firstName": null,
"lastName": null,
"isAccessVerified": null,
"userId": "string"
},
"paymentMethodDetails": {
"vendorPaymentMethodFingerprint": "fingerprint",
"type": "CARD",
"nameOnCard": "nameOnCard",
"cardBrand": "cardBrand",
"expiryMonth": "expiryMonth",
"expiryYear": "expiryYear",
"last4": "last4",
"manufacturerCard": true,
"zipCode": null,
"status": "ACTIVE"
},
"warning": {
"code": "DUPLICATE_ENTRY",
"title": "Payment method already exists",
"description": "Any new details provided have been updated accordingly."
},
"accountNumber": null,
"card": {
"vendorPaymentMethodFingerprint": "fingerprint",
"type": "CARD",
"nameOnCard": "nameOnCard",
"cardBrand": "cardBrand",
"expiryMonth": "expiryMonth",
"expiryYear": "expiryYear",
"last4": "last4",
"manufacturerCard": true,
"zipCode": null,
"status": "ACTIVE"
},
"usbankAccountDetails": null,
"usbankAccount": false,
"default": false
}
]