Skip to main content
The 3DS Scenarios API allows a merchant to manage custom 3D Secure authentication scenarios for the hosted 3DS flow. Scenarios define specific authentication behaviors and response patterns for testing purposes.

Overview

3DS Scenarios are configuration templates that define how 3D Secure authentication should behave for transactions. Use scenarios to:
  • Test specific authentication flows and outcomes
  • Configure consistent challenge behaviors across payment tests
  • Simulate different 3DS authentication scenarios
3DS Scenarios are only available for the hosted 3DS flow. For other integration methods, refer to the 3DS testing guide to use test cards from the underlying 3DS providers.

Registering a scenario

Register a new 3DS scenario by making a request to the create scenario endpoint:
var res = await sdk.ThreeDsScenarios.CreateAsync(threeDSecureScenarioCreate: new ThreeDSecureScenarioCreate() {
    Conditions = new ThreeDSecureScenarioConditions() {
        CardNumber = "4242424242424242",
    },
    Outcome = new ThreeDSecureScenarioOutcome() {
        Version = "2.2.0",
        Authentication = new ThreeDSecureScenarioOutcomeAuthentication() {
            TransactionStatus = "Y",
        },
    },
});
A 3DS scenario is used any time the conditions are matched to a new transaction. Note that if multiple scenarios match, the most specific scenario (the one with the most conditions matched) is used for the transaction. Once created, you can manage scenarios using the 3DS Scenarios API endpoints, such as List 3DS Scenarios.