--- title: "One-time password (OTP) authentication" description: "Learn how to add the cardholder's mobile phone number, email address, and a password to support 3D Secure." url: "https://docs.adyen.com/issuing/3d-secure/password-otp" source_url: "https://docs.adyen.com/issuing/3d-secure/password-otp.md" canonical: "https://docs.adyen.com/issuing/3d-secure/password-otp" last_modified: "2021-09-09T11:21:00+02:00" language: "en" --- # One-time password (OTP) authentication Learn how to add the cardholder's mobile phone number, email address, and a password to support 3D Secure. [View source](/issuing/3d-secure/password-otp.md) If you choose to enroll your Adyen-issued card in 3D Secure through the one-time password (OTP) flow, the cardholder goes through the following process when making an online payment: 1. The cardholder is redirected to a 3D Secure authentication page. In this page, they must provide: * Their password. * A one-time password (OTP) sent through SMS or email. 2. The cardholder's credentials are validated against the authentication data that you set for the card. * If the authentication is successful, the payment is sent to Adyen for [authorisation](/issuing/authorisation). * If the authentication fails, the payment fails. 3. If the payment authorisation is approved, the payment is completed. ## Requirements | Requirement | Description | | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **Integration type** | [Issuing](/issuing) | | **API credential roles** | To enroll cards in 3D Secure, make sure your API credential has the **Bank SCA Webservice Role**. For more information, refer to [Roles for API credentials](/issuing/manage-access/webservice-roles). | ## Add authentication data To enroll the Adyen-issued card in 3D Secure, add the cardholder's mobile phone number, an email address, and a password when issuing cards. When creating the card, include the [authentication](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/paymentInstruments#request-card-authentication) object containing: * A [password](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/post/paymentInstruments__reqParam_card-authentication-password), which is required for both SMS and email OTP challenges. * A [phone](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/paymentInstruments#request-card-authentication-phone) object that includes the `number` and `type` set to **mobile**. * An [email](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/paymentInstruments#request-card-authentication-email) address. By default, email OTP is a lower-priority method than an SMS OTP. However, in some countries, we always use email OTP. The OTP method is selected based on the cardholder's credentials and a predefined order of preference: * If a phone number is available, the OTP is sent via SMS. * If no phone number is provided, it falls back to email, if available. * If neither contact method is provided, the transaction is declined, because the OTP cannot be sent. Using the contact details and password, Adyen enrolls the card in 3D Secure. Here is an example of how you can create a card with authentication data to support 3D Secure authentication. **Create a card with authentication data for 3D Secure** #### curl ```bash curl https://balanceplatform-api-test.adyen.com/bcl/v2/paymentInstruments \ -H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \ -H 'content-type: application/json' \ -X POST \ -d '{ "type": "card", "issuingCountryCode": "NL", "balanceAccountId": "BA3227C223222B5CTBLR8BWJB", "status": "inactive", "card": { "formFactor": "physical", "brand": "mc", "brandVariant": "mcdebit", "cardholderName": "Sam Hopper", "authentication": { "password": "CARDUSERPASSWORD$1", "email" : "S.Hopper@example.com", "phone": { "number": "31611223344", "type": "Mobile" } }, "deliveryContact": { "address": { "city": "Amsterdam", "country": "NL", "stateOrProvince": "NH", "line1": "Simon Carmiggeltstraat", "line2": "5-60", "postalCode": "1011DJ" }, "name": { "firstName": "Sam", "lastName": "Hopper" } }, "configuration": { "configurationProfileId": "YOUR_CONFIGURATION_PROFILE_ID" }, "description": "YOUR_DESCRIPTION" } }' ``` #### Java ```java // Adyen Java API Library v39.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.balanceplatform.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.service.balancePlatform.*; Client client = new Client("ADYEN_BALANCE_PLATFORM_API_KEY", Environment.TEST); // Create the request object(s) DeliveryAddress deliveryAddress = new DeliveryAddress() .country("NL") .stateOrProvince("NH") .city("Amsterdam") .postalCode("1011DJ") .line2("5-60") .line1("Simon Carmiggeltstraat"); Name name = new Name() .firstName("Sam") .lastName("Hopper"); Phone phone = new Phone() .number("31611223344") .type(Phone.TypeEnum.MOBILE); CardConfiguration cardConfiguration = new CardConfiguration() .configurationProfileId("YOUR_CONFIGURATION_PROFILE_ID"); DeliveryContact deliveryContact = new DeliveryContact() .address(deliveryAddress) .name(name); Authentication authentication = new Authentication() .password("CARDUSERPASSWORD$1") .phone(phone) .email("S.Hopper@example.com"); CardInfo cardInfo = new CardInfo() .brandVariant("mcdebit") .configuration(cardConfiguration) .formFactor(CardInfo.FormFactorEnum.PHYSICAL) .cardholderName("Sam Hopper") .deliveryContact(deliveryContact) .brand("mc") .authentication(authentication); PaymentInstrumentInfo paymentInstrumentInfo = new PaymentInstrumentInfo() .balanceAccountId("BA3227C223222B5CTBLR8BWJB") .type(PaymentInstrumentInfo.TypeEnum.CARD) .issuingCountryCode("NL") .card(cardInfo) .status(PaymentInstrumentInfo.StatusEnum.INACTIVE); // Send the request PaymentInstrumentsApi service = new PaymentInstrumentsApi(client); PaymentInstrument response = service.createPaymentInstrument(paymentInstrumentInfo, null); ``` #### PHP ```php setXApiKey("ADYEN_BALANCE_PLATFORM_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $deliveryAddress = new DeliveryAddress(); $deliveryAddress ->setCountry("NL") ->setStateOrProvince("NH") ->setCity("Amsterdam") ->setPostalCode("1011DJ") ->setLine2("5-60") ->setLine1("Simon Carmiggeltstraat"); $name = new Name(); $name ->setFirstName("Sam") ->setLastName("Hopper"); $phone = new Phone(); $phone ->setNumber("31611223344") ->setType("Mobile"); $cardConfiguration = new CardConfiguration(); $cardConfiguration ->setConfigurationProfileId("YOUR_CONFIGURATION_PROFILE_ID"); $deliveryContact = new DeliveryContact(); $deliveryContact ->setAddress($deliveryAddress) ->setName($name); $authentication = new Authentication(); $authentication ->setPassword("CARDUSERPASSWORD\$1") ->setPhone($phone) ->setEmail("S.Hopper@example.com"); $cardInfo = new CardInfo(); $cardInfo ->setBrandVariant("mcdebit") ->setConfiguration($cardConfiguration) ->setFormFactor("physical") ->setCardholderName("Sam Hopper") ->setDeliveryContact($deliveryContact) ->setBrand("mc") ->setAuthentication($authentication); $paymentInstrumentInfo = new PaymentInstrumentInfo(); $paymentInstrumentInfo ->setBalanceAccountId("BA3227C223222B5CTBLR8BWJB") ->setType("card") ->setIssuingCountryCode("NL") ->setCard($cardInfo) ->setStatus("inactive"); // Send the request $service = new PaymentInstrumentsApi($client); $response = $service->createPaymentInstrument($paymentInstrumentInfo); ``` #### C\# ```cs // Adyen .net API Library v32.0.1 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.BalancePlatform; using Adyen.Service.BalancePlatform; var config = new Config() { XApiKey = "ADYEN_BALANCE_PLATFORM_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) DeliveryAddress deliveryAddress = new DeliveryAddress { Country = "NL", StateOrProvince = "NH", City = "Amsterdam", PostalCode = "1011DJ", Line2 = "5-60", Line1 = "Simon Carmiggeltstraat" }; Name name = new Name { FirstName = "Sam", LastName = "Hopper" }; Phone phone = new Phone { Number = "31611223344", Type = Phone.TypeEnum.Mobile }; CardConfiguration cardConfiguration = new CardConfiguration { ConfigurationProfileId = "YOUR_CONFIGURATION_PROFILE_ID" }; DeliveryContact deliveryContact = new DeliveryContact { Address = deliveryAddress, Name = name }; Authentication authentication = new Authentication { Password = "CARDUSERPASSWORD$1", Phone = phone, Email = "S.Hopper@example.com" }; CardInfo cardInfo = new CardInfo { BrandVariant = "mcdebit", Configuration = cardConfiguration, FormFactor = CardInfo.FormFactorEnum.Physical, CardholderName = "Sam Hopper", DeliveryContact = deliveryContact, Brand = "mc", Authentication = authentication }; PaymentInstrumentInfo paymentInstrumentInfo = new PaymentInstrumentInfo { BalanceAccountId = "BA3227C223222B5CTBLR8BWJB", Type = PaymentInstrumentInfo.TypeEnum.Card, IssuingCountryCode = "NL", Card = cardInfo, Status = PaymentInstrumentInfo.StatusEnum.Inactive }; // Send the request var service = new PaymentInstrumentsService(client); var response = service.CreatePaymentInstrument(paymentInstrumentInfo); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v28.0.0 const { Client, BalancePlatformAPI } = require('@adyen/api-library'); const client = new Client({ apiKey: "ADYEN_BALANCE_PLATFORM_API_KEY", environment: "TEST" }); // Create the request object(s) const paymentInstrumentInfo = { type: "card", issuingCountryCode: "NL", balanceAccountId: "BA3227C223222B5CTBLR8BWJB", status: "inactive", card: { formFactor: "physical", brand: "mc", brandVariant: "mcdebit", cardholderName: "Sam Hopper", authentication: { password: "CARDUSERPASSWORD$1", email: "S.Hopper@example.com", phone: { number: "31611223344", type: "Mobile" } }, deliveryContact: { address: { city: "Amsterdam", country: "NL", stateOrProvince: "NH", line1: "Simon Carmiggeltstraat", line2: "5-60", postalCode: "1011DJ" }, name: { firstName: "Sam", lastName: "Hopper" } }, configuration: { configurationProfileId: "YOUR_CONFIGURATION_PROFILE_ID" }, description: "YOUR_DESCRIPTION" } } // Send the request const balancePlatformAPI = new BalancePlatformAPI(client); const response = balancePlatformAPI.PaymentInstrumentsApi.createPaymentInstrument(paymentInstrumentInfo); ``` #### Go ```go // Adyen Go API Library v21.0.0 import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/balancePlatform" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_BALANCE_PLATFORM_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) deliveryAddress := balancePlatform.DeliveryAddress{ Country: "NL", StateOrProvince: common.PtrString("NH"), City: common.PtrString("Amsterdam"), PostalCode: common.PtrString("1011DJ"), Line2: common.PtrString("5-60"), Line1: common.PtrString("Simon Carmiggeltstraat"), } name := balancePlatform.Name{ FirstName: "Sam", LastName: "Hopper", } phone := balancePlatform.Phone{ Number: "31611223344", Type: "Mobile", } cardConfiguration := balancePlatform.CardConfiguration{ ConfigurationProfileId: "YOUR_CONFIGURATION_PROFILE_ID", } deliveryContact := balancePlatform.DeliveryContact{ Address: deliveryAddress, Name: name, } authentication := balancePlatform.Authentication{ Password: common.PtrString("CARDUSERPASSWORD$1"), Phone: &phone, Email: common.PtrString("S.Hopper@example.com"), } cardInfo := balancePlatform.CardInfo{ BrandVariant: "mcdebit", Configuration: &cardConfiguration, FormFactor: "physical", CardholderName: "Sam Hopper", DeliveryContact: &deliveryContact, Brand: "mc", Authentication: &authentication, } paymentInstrumentInfo := balancePlatform.PaymentInstrumentInfo{ BalanceAccountId: "BA3227C223222B5CTBLR8BWJB", Type: "card", IssuingCountryCode: "NL", Card: &cardInfo, Status: common.PtrString("inactive"), } // Send the request service := client.BalancePlatform() req := service.PaymentInstrumentsApi.CreatePaymentInstrumentInput().PaymentInstrumentInfo(paymentInstrumentInfo) res, httpRes, err := service.PaymentInstrumentsApi.CreatePaymentInstrument(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v13.5.1 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_BALANCE_PLATFORM_API_KEY" adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "type": "card", "issuingCountryCode": "NL", "balanceAccountId": "BA3227C223222B5CTBLR8BWJB", "status": "inactive", "card": { "formFactor": "physical", "brand": "mc", "brandVariant": "mcdebit", "cardholderName": "Sam Hopper", "authentication": { "password": "CARDUSERPASSWORD$1", "email": "S.Hopper@example.com", "phone": { "number": "31611223344", "type": "Mobile" } }, "deliveryContact": { "address": { "city": "Amsterdam", "country": "NL", "stateOrProvince": "NH", "line1": "Simon Carmiggeltstraat", "line2": "5-60", "postalCode": "1011DJ" }, "name": { "firstName": "Sam", "lastName": "Hopper" } }, "configuration": { "configurationProfileId": "YOUR_CONFIGURATION_PROFILE_ID" }, "description": "YOUR_DESCRIPTION" } } # Send the request result = adyen.balancePlatform.payment_instruments_api.create_payment_instrument(request=json_request) ``` #### Ruby ```rb # Adyen Ruby API Library v10.3.0 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_BALANCE_PLATFORM_API_KEY' adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :type => 'card', :issuingCountryCode => 'NL', :balanceAccountId => 'BA3227C223222B5CTBLR8BWJB', :status => 'inactive', :card => { :formFactor => 'physical', :brand => 'mc', :brandVariant => 'mcdebit', :cardholderName => 'Sam Hopper', :authentication => { :password => 'CARDUSERPASSWORD$1', :email => 'S.Hopper@example.com', :phone => { :number => '31611223344', :type => 'Mobile' } }, :deliveryContact => { :address => { :city => 'Amsterdam', :country => 'NL', :stateOrProvince => 'NH', :line1 => 'Simon Carmiggeltstraat', :line2 => '5-60', :postalCode => '1011DJ' }, :name => { :firstName => 'Sam', :lastName => 'Hopper' } }, :configuration => { :configurationProfileId => 'YOUR_CONFIGURATION_PROFILE_ID' }, :description => 'YOUR_DESCRIPTION' } } # Send the request result = adyen.balancePlatform.payment_instruments_api.create_payment_instrument(request_body) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v28.0.0 import { Client, BalancePlatformAPI, Types } from "@adyen/api-library"; const client = new Client({ apiKey: "ADYEN_BALANCE_PLATFORM_API_KEY", environment: "TEST" }); // Create the request object(s) const deliveryAddress: Types.balancePlatform.DeliveryAddress = { country: "NL", stateOrProvince: "NH", city: "Amsterdam", postalCode: "1011DJ", line2: "5-60", line1: "Simon Carmiggeltstraat" }; const name: Types.balancePlatform.Name = { firstName: "Sam", lastName: "Hopper" }; const phone: Types.balancePlatform.Phone = { number: "31611223344", type: Types.balancePlatform.Phone.TypeEnum.Mobile }; const cardConfiguration: Types.balancePlatform.CardConfiguration = { configurationProfileId: "YOUR_CONFIGURATION_PROFILE_ID" }; const deliveryContact: Types.balancePlatform.DeliveryContact = { address: deliveryAddress, name: name }; const authentication: Types.balancePlatform.Authentication = { password: "CARDUSERPASSWORD$1", phone: phone, email: "S.Hopper@example.com" }; const cardInfo: Types.balancePlatform.CardInfo = { brandVariant: "mcdebit", configuration: cardConfiguration, formFactor: Types.balancePlatform.CardInfo.FormFactorEnum.Physical, cardholderName: "Sam Hopper", deliveryContact: deliveryContact, brand: "mc", authentication: authentication }; const paymentInstrumentInfo: Types.balancePlatform.PaymentInstrumentInfo = { balanceAccountId: "BA3227C223222B5CTBLR8BWJB", type: Types.balancePlatform.PaymentInstrumentInfo.TypeEnum.Card, issuingCountryCode: "NL", card: cardInfo, status: Types.balancePlatform.PaymentInstrumentInfo.StatusEnum.Inactive }; // Send the request const balancePlatformAPI = new BalancePlatformAPI(client); const response = balancePlatformAPI.PaymentInstrumentsApi.createPaymentInstrument(paymentInstrumentInfo); ``` ## Update authentication data You can add the [authentication](https://docs.adyen.com/api-explorer/balanceplatform/latest/post/paymentInstruments#request-card-authentication) object at a later time or update the cardholder's phone number, password or email address by sending a PATCH [/paymentInstruments/{id}](https://docs.adyen.com/api-explorer/#/balanceplatform/latest/patch/paymentInstruments/{id}) request. **Add or change authentication data of existing card** #### curl ```bash curl https://balanceplatform-api-test.adyen.com/bcl/v2/paymentInstruments/{id} \ -H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \ -H 'content-type: application/json' \ -X PATCH \ -d '{ "card": { "authentication": { "password": "CARDUSERPASSWORD$1", "email" : "S.Hopper@example.com", "phone": { "number": "31611223344", "type": "Mobile" } } } }' ``` #### Java ```java // Adyen Java API Library v39.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.model.balanceplatform.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.service.balancePlatform.*; Client client = new Client("ADYEN_BALANCE_PLATFORM_API_KEY", Environment.TEST); // Create the request object(s) Phone phone = new Phone() .number("31611223344") .type(Phone.TypeEnum.MOBILE); Authentication authentication = new Authentication() .password("CARDUSERPASSWORD$1") .phone(phone) .email("S.Hopper@example.com"); CardInfo cardInfo = new CardInfo() .authentication(authentication); PaymentInstrumentUpdateRequest paymentInstrumentUpdateRequest = new PaymentInstrumentUpdateRequest() .card(cardInfo); // Send the request PaymentInstrumentsApi service = new PaymentInstrumentsApi(client); UpdatePaymentInstrument response = service.updatePaymentInstrument("id", paymentInstrumentUpdateRequest, null); ``` #### PHP ```php setXApiKey("ADYEN_BALANCE_PLATFORM_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $phone = new Phone(); $phone ->setNumber("31611223344") ->setType("Mobile"); $authentication = new Authentication(); $authentication ->setPassword("CARDUSERPASSWORD\$1") ->setPhone($phone) ->setEmail("S.Hopper@example.com"); $cardInfo = new CardInfo(); $cardInfo ->setAuthentication($authentication); $paymentInstrumentUpdateRequest = new PaymentInstrumentUpdateRequest(); $paymentInstrumentUpdateRequest ->setCard($cardInfo); // Send the request $service = new PaymentInstrumentsApi($client); $response = $service->updatePaymentInstrument('id', $paymentInstrumentUpdateRequest); ``` #### C\# ```cs // Adyen .net API Library v32.0.1 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Model; using Adyen.Model.BalancePlatform; using Adyen.Service.BalancePlatform; var config = new Config() { XApiKey = "ADYEN_BALANCE_PLATFORM_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Create the request object(s) Phone phone = new Phone { Number = "31611223344", Type = Phone.TypeEnum.Mobile }; Authentication authentication = new Authentication { Password = "CARDUSERPASSWORD$1", Phone = phone, Email = "S.Hopper@example.com" }; CardInfo cardInfo = new CardInfo { Authentication = authentication }; PaymentInstrumentUpdateRequest paymentInstrumentUpdateRequest = new PaymentInstrumentUpdateRequest { Card = cardInfo }; // Send the request var service = new PaymentInstrumentsService(client); var response = service.UpdatePaymentInstrument("id", paymentInstrumentUpdateRequest); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v28.0.0 const { Client, BalancePlatformAPI } = require('@adyen/api-library'); const client = new Client({ apiKey: "ADYEN_BALANCE_PLATFORM_API_KEY", environment: "TEST" }); // Create the request object(s) const paymentInstrumentUpdateRequest = { card: { authentication: { password: "CARDUSERPASSWORD$1", email: "S.Hopper@example.com", phone: { number: "31611223344", type: "Mobile" } } } } // Send the request const balancePlatformAPI = new BalancePlatformAPI(client); const response = balancePlatformAPI.PaymentInstrumentsApi.updatePaymentInstrument("id", paymentInstrumentUpdateRequest); ``` #### Go ```go // Adyen Go API Library v21.0.0 import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/balancePlatform" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_BALANCE_PLATFORM_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) phone := balancePlatform.Phone{ Number: "31611223344", Type: "Mobile", } authentication := balancePlatform.Authentication{ Password: common.PtrString("CARDUSERPASSWORD$1"), Phone: &phone, Email: common.PtrString("S.Hopper@example.com"), } cardInfo := balancePlatform.CardInfo{ Authentication: &authentication, } paymentInstrumentUpdateRequest := balancePlatform.PaymentInstrumentUpdateRequest{ Card: &cardInfo, } // Send the request service := client.BalancePlatform() req := service.PaymentInstrumentsApi.UpdatePaymentInstrumentInput("id").PaymentInstrumentUpdateRequest(paymentInstrumentUpdateRequest) res, httpRes, err := service.PaymentInstrumentsApi.UpdatePaymentInstrument(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v13.5.1 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_BALANCE_PLATFORM_API_KEY" adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "card": { "authentication": { "password": "CARDUSERPASSWORD$1", "email": "S.Hopper@example.com", "phone": { "number": "31611223344", "type": "Mobile" } } } } # Send the request result = adyen.balancePlatform.payment_instruments_api.update_payment_instrument(request=json_request, id="id") ``` #### Ruby ```rb # Adyen Ruby API Library v10.3.0 require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_BALANCE_PLATFORM_API_KEY' adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { :card => { :authentication => { :password => 'CARDUSERPASSWORD$1', :email => 'S.Hopper@example.com', :phone => { :number => '31611223344', :type => 'Mobile' } } } } # Send the request result = adyen.balancePlatform.payment_instruments_api.update_payment_instrument(request_body, 'id') ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v28.0.0 import { Client, BalancePlatformAPI, Types } from "@adyen/api-library"; const client = new Client({ apiKey: "ADYEN_BALANCE_PLATFORM_API_KEY", environment: "TEST" }); // Create the request object(s) const phone: Types.balancePlatform.Phone = { number: "31611223344", type: Types.balancePlatform.Phone.TypeEnum.Mobile }; const authentication: Types.balancePlatform.Authentication = { password: "CARDUSERPASSWORD$1", phone: phone, email: "S.Hopper@example.com" }; const cardInfo: Types.balancePlatform.CardInfo = { authentication: authentication }; const paymentInstrumentUpdateRequest: Types.balancePlatform.PaymentInstrumentUpdateRequest = { card: cardInfo }; // Send the request const balancePlatformAPI = new BalancePlatformAPI(client); const response = balancePlatformAPI.PaymentInstrumentsApi.updatePaymentInstrument("id", paymentInstrumentUpdateRequest); ``` ## Get updates You can use the cardholder authenticated webhook to get notified about the status and outcome of the cardholder's 3D secure authentication. Regardless of outcome of the authentication process, we send the [balancePlatform.authentication.created](https://docs.adyen.com/api-explorer/acs-webhook/latest/post/balancePlatform.authentication.created) webhook. To keep track of webhooks, make sure that your server can [receive and accept webhooks](/development-resources/webhooks/configure-and-manage). The [balancePlatform.authentication.created](https://docs.adyen.com/api-explorer/acs-webhook/latest/post/balancePlatform.authentication.created) webhook contains the following information. ### Tab: Authenticated (frictionless flow) **Successful authentication via the frictionless flow** ```json { "data": { "authentication": { "acsTransID": "6a4c1709-a42e-4c7f-96c7-1043adacfc97", "challengeIndicator": "01", "createdAt": "2022-12-22T15:45:03+01:00", "deviceChannel": "app", "dsTransID": "a3b86754-444d-46ca-95a2-ada351d3f42c", "exemptionIndicator": "lowValue", "inPSD2scope": true, "messageCategory": "payment", "messageVersion": "2.2.0", "riskScore": 0, "threeDSServerTransID": "6edcc246-23ee-4e94-ac5d-8ae620bea7d9", "transStatus": "Y", "type": "frictionless" }, "balancePlatform": "YOUR_BALANCE_PLATFORM", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "paymentInstrumentId": "PI3227C223222B5BPCMFXD2XG", "purchase": { "date": "2022-12-22T15:49:03+01:00", "merchantName": "TeaShop_NL", "originalAmount": { "currency": "EUR", "value": 1000 } }, "status": "authenticated" }, "environment": "test", "type": "balancePlatform.authentication.created" } ``` ### Tab: Authenticated (challenge flow) **Successful authentication via the challenge flow** ```json { "data": { "authentication": { "acsTransID": "6a4c1709-a42e-4c7f-96c7-1043adacfc97", "challenge": { "flow": "OOB", "lastInteraction": "2022-12-22T15:49:03+01:00" }, "challengeIndicator": "01", "createdAt": "2022-12-22T15:45:03+01:00", "deviceChannel": "app", "dsTransID": "a3b86754-444d-46ca-95a2-ada351d3f42c", "exemptionIndicator": "lowValue", "inPSD2scope": true, "messageCategory": "payment", "messageVersion": "2.2.0", "riskScore": 0, "threeDSServerTransID": "6edcc246-23ee-4e94-ac5d-8ae620bea7d9", "transStatus": "Y", "type": "challenge" }, "balancePlatform": "YOUR_BALANCE_PLATFORM", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "paymentInstrumentId": "PI3227C223222B5BPCMFXD2XG", "purchase": { "date": "2022-12-22T15:49:03+01:00", "merchantName": "TeaShop_NL", "originalAmount": { "currency": "EUR", "value": 1000 } }, "status": "authenticated" }, "environment": "test", "type": "balancePlatform.authentication.created" } ``` ### Tab: Rejected (retries exceeded) **Rejected authentication due to exceeded number of retries** ```json { "data": { "balancePlatform": "YOUR_BALANCE_PLATFORM", "creationDate": "2023-01-19T17:07:59+01:00", "id": "a8fc7a40-6e48-498a-bdc2-494daf0f490a", "authentication": { "acsTransId": "a8fc7a40-6e48-498a-bdc2-494daf0f490a", "challenge": { "flow": "OTP_SMS", "lastInteraction" : "2023-01-19T17:37:13+01:00", "phoneNumber" : "******6789", "resends" : 0, "retries" : 2 }, "challengeIndicator": "01", "createdAt": "2023-01-19T17:07:17+01:00", "deviceChannel": "app", "dsTransID": "59de4e30-7f84-4a77-aaf8-1ca493092ef9", "exemptionIndicator": "noExemptionApplied", "inPSD2Scope": "false", "messageCategory": "payment", "messageVersion": "2.2.0", "threeDSServerTransID": "8bc0fdbd-5c8a-4bed-a171-9d10347e7798", "transStatus": "N", "transStatusReason": "19", "type": "challenge" }, "paymentInstrumentId": "PI3227C223222B5BPCMFXD2XG", "purchase": { "date": "2022-12-22T15:49:03+01:00", "merchantName": "TeaShop_NL", "originalAmount": { "currency": "EUR", "value": 1000 } }, "status": "rejected" }, "environment": "test", "type": "balancePlatform.authentication.created" } ``` ## Next steps Before your users can start making purchases with the newly issued card, you will have to choose how to fund the accounts, process payments, and manage the card lifecycle. [required](/issuing/authorisation) [Process payments](/issuing/authorisation) [Choose how to authorise card payments.](/issuing/authorisation) [required](/issuing/add-manage-funds) [Manage funds](/issuing/add-manage-funds) [Choose how to allocate funds to balance accounts.](/issuing/add-manage-funds) [3D Secure transactions](/issuing/3d-secure) [Understand failed, out of scope, and exempted transactions.](/issuing/3d-secure)