Opt out by D1 SDK
Overview
This page explains how the issuer application can opt out from Click to Pay by using the D1 SDK.
D1 SDK provides two opt-out APIs:
optOutCardremoves one card from Click to Pay.optOutConsumerremoves all cards for the end user from Click to Pay.
Use these SDK flows when you want the end user to start the opt-out directly from the issuer application while D1 orchestrates the backend interactions with the Click to Pay directories and the payment network.
Choose the right SDK API
optOutCard
optOutCardUse optOutCard when the end user wants to remove one specific card from Click to Pay.
This option keeps other enrolled cards unchanged.
optOutConsumer
optOutConsumerUse optOutConsumer when the end user wants to remove the full Click to Pay profile.
This option removes all cards enrolled in Click to Pay for that end user.
Flow
The diagram below depicts the overall SDK-based opt-out flow:
Sequence diagram
The SDK flow has the same functional behavior as the backend opt-out flow, but it is initiated directly from the issuer application.
The following sequence diagram shows the flow initiated from the issuer application:
Key points
Both operations are asynchronous.
The immediate result contains a status of
SUCCESSFULorPENDING, plus anoperationID.Use Retrieve profiles by D1 SDK before opt-out when the issuer application must show the current Click to Pay state.
optOutCardremoves one digital card from the payment network side.optOutConsumerremoves the full Click to Pay profile for the end user across enrolled cards.The final result can also be tracked through the Get Operation endpoint in the D1 API summary or through D1 Notifications.
The diagrams illustrate the opt-out flow started from the issuer application.
optOutConsumer follows the same SDK pattern as optOutCard, but applies to all cards linked to the end user.
Handle Click to Pay push notifications
Refer to Handle Click to Pay push notifications in the enrollment by D1 SDK documentation for the implementation details.
SDK API for optOutCard
optOutCardSince D1 SDK 4.2.0, optOutCard (Android / iOS) is available through D1 SDK.
Use this API when the end user wants to opt out one specific card only.
Use optOutCard when the issuer application presents a card list and the end user selects one card to remove.
SDK API for optOutConsumer
optOutConsumerSince D1 SDK 4.3.0, optOutConsumer (Android / iOS) is available through D1 SDK.
Use this API when the end user wants to opt out all cards from Click to Pay in a single action.
Use optOutConsumer carefully.
This action removes all Click to Pay cards for the end user.
Last updated
Was this helpful?