Skip to main content
POST
/
three-ds-scenarios
C#
using Gr4vy;
using Gr4vy.Models.Components;

var sdk = new Gr4vySDK(
    id: "example",
    server: SDKConfig.Server.Sandbox,
    bearerAuthSource: Auth.WithToken(privateKey),
    merchantAccountId: "default"
);

var res = await sdk.ThreeDsScenarios.CreateAsync(threeDSecureScenarioCreate: new ThreeDSecureScenarioCreate() {
    Conditions = new ThreeDSecureScenarioConditions() {},
    Outcome = new ThreeDSecureScenarioOutcome() {
        Version = "2.2.0",
        Authentication = new ThreeDSecureScenarioOutcomeAuthentication() {
            TransactionStatus = "Y",
        },
    },
});

// handle response
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "merchant_account_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "conditions": {
    "first_name": "<string>",
    "last_name": "<string>",
    "email_address": "<string>",
    "amount": 49999999,
    "external_identifier": "<string>",
    "card_number": "<string>"
  },
  "outcome": {
    "version": "<string>",
    "authentication": {
      "transaction_status": "Y"
    },
    "result": {
      "transaction_status": "Y"
    }
  },
  "type": "three-d-secure-scenario"
}
This endpoint requires the three-ds-scenarios.write scope.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-gr4vy-merchant-account-id
string

The ID of the merchant account to use for this request.

Example:

"default"

Body

application/json
conditions
ThreeDSecureScenarioConditions · object
required

Conditions for the scenario.

Example:
{
"amount": 100,
"card_number": "4242424242424242",
"email_address": "[email protected]",
"external_identifier": "buyer-12345",
"first_name": "John",
"last_name": "Luhn"
}
outcome
ThreeDSecureScenarioOutcome · object
required

Outcome for the scenario.

Examples:
{
"authentication": { "transaction_status": "C" },
"result": { "transaction_status": "Y" },
"version": "2.3.1"
}
{
"authentication": { "transaction_status": "N" },
"version": "2.3.1"
}

Response

Successful Response

id
string<uuid>
required

Unique identifier for the 3DS scenario

merchant_account_id
string
required

ID of the associated merchant account

created_at
string<date-time>
required

The date and time when this 3DS scenario was first created in our system.

Example:

"2013-07-16T19:23:00.000+00:00"

updated_at
string<date-time>
required

The date and time when this 3DS scenario was last updated in our system.

Example:

"2013-07-16T19:23:00.000+00:00"

conditions
ThreeDSecureScenarioConditions · object
required

Conditions for the scenario.

Example:
{
"amount": 100,
"card_number": "4242424242424242",
"email_address": "[email protected]",
"external_identifier": "buyer-12345",
"first_name": "John",
"last_name": "Luhn"
}
outcome
ThreeDSecureScenarioOutcome · object
required

Outcome for the scenario.

Examples:
{
"authentication": { "transaction_status": "C" },
"result": { "transaction_status": "Y" },
"version": "2.3.1"
}
{
"authentication": { "transaction_status": "N" },
"version": "2.3.1"
}
type
string
default:three-d-secure-scenario

Always three-d-secure-scenario.

Allowed value: "three-d-secure-scenario"
Example:

"three-d-secure-scenario"