- create - Create a 3DS scenario
- list - List 3DS scenario
- update - Update a 3DS scenario
- delete - Delete a 3DS scenario
Create a new 3DS scenario for a merchant account. Only available in sandbox environments.
package hello.world;
import com.gr4vy.sdk.Gr4vy;
import com.gr4vy.sdk.models.components.*;
import com.gr4vy.sdk.models.errors.*;
import com.gr4vy.sdk.models.operations.CreateThreeDsScenarioResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Gr4vy sdk = Gr4vy.builder()
.merchantAccountId("<id>")
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
CreateThreeDsScenarioResponse res = sdk.threeDsScenarios().create()
.threeDSecureScenarioCreate(ThreeDSecureScenarioCreate.builder()
.conditions(ThreeDSecureScenarioConditions.builder()
.build())
.outcome(ThreeDSecureScenarioOutcome.builder()
.authentication(ThreeDSecureScenarioOutcomeAuthentication.builder()
.transactionStatus(ThreeDSecureScenarioOutcomeAuthenticationTransactionStatus.Y)
.build())
.build())
.build())
.call();
if (res.threeDSecureScenario().isPresent()) {
System.out.println(res.threeDSecureScenario().get());
}
}
}
| Parameter |
Type |
Required |
Description |
merchantAccountId |
JsonNullable<String> |
➖ |
The ID of the merchant account to use for this request. |
threeDSecureScenarioCreate |
ThreeDSecureScenarioCreate |
✔️ |
N/A |
CreateThreeDsScenarioResponse
| Error Type |
Status Code |
Content Type |
| models/errors/Error400 |
400 |
application/json |
| models/errors/Error401 |
401 |
application/json |
| models/errors/Error403 |
403 |
application/json |
| models/errors/Error404 |
404 |
application/json |
| models/errors/Error405 |
405 |
application/json |
| models/errors/Error409 |
409 |
application/json |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/Error425 |
425 |
application/json |
| models/errors/Error429 |
429 |
application/json |
| models/errors/Error500 |
500 |
application/json |
| models/errors/Error502 |
502 |
application/json |
| models/errors/Error504 |
504 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
List all 3DS scenarios for a merchant account. Only available in sandbox environments.
package hello.world;
import com.gr4vy.sdk.Gr4vy;
import com.gr4vy.sdk.models.errors.*;
import com.gr4vy.sdk.models.operations.GetThreeDsScenarioResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Gr4vy sdk = Gr4vy.builder()
.merchantAccountId("<id>")
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
sdk.threeDsScenarios().list()
.limit(20L)
.callAsStream()
.forEach((GetThreeDsScenarioResponse item) -> {
// handle page
});
}
}
| Parameter |
Type |
Required |
Description |
Example |
cursor |
JsonNullable<String> |
➖ |
A pointer to the page of results to return. |
ZXhhbXBsZTE |
limit |
Optional<Long> |
➖ |
The maximum number of items that are at returned. |
20 |
merchantAccountId |
JsonNullable<String> |
➖ |
The ID of the merchant account to use for this request. |
|
GetThreeDsScenarioResponse
| Error Type |
Status Code |
Content Type |
| models/errors/Error400 |
400 |
application/json |
| models/errors/Error401 |
401 |
application/json |
| models/errors/Error403 |
403 |
application/json |
| models/errors/Error404 |
404 |
application/json |
| models/errors/Error405 |
405 |
application/json |
| models/errors/Error409 |
409 |
application/json |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/Error425 |
425 |
application/json |
| models/errors/Error429 |
429 |
application/json |
| models/errors/Error500 |
500 |
application/json |
| models/errors/Error502 |
502 |
application/json |
| models/errors/Error504 |
504 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
Update a 3DS scenario. Only available in sandbox environments.
package hello.world;
import com.gr4vy.sdk.Gr4vy;
import com.gr4vy.sdk.models.components.ThreeDSecureScenarioUpdate;
import com.gr4vy.sdk.models.errors.*;
import com.gr4vy.sdk.models.operations.UpdateThreeDsScenarioResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Gr4vy sdk = Gr4vy.builder()
.merchantAccountId("<id>")
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
UpdateThreeDsScenarioResponse res = sdk.threeDsScenarios().update()
.threeDsScenarioId("7099948d-7286-47e4-aad8-b68f7eb44591")
.threeDSecureScenarioUpdate(ThreeDSecureScenarioUpdate.builder()
.build())
.call();
if (res.threeDSecureScenario().isPresent()) {
System.out.println(res.threeDSecureScenario().get());
}
}
}
| Parameter |
Type |
Required |
Description |
Example |
threeDsScenarioId |
String |
✔️ |
The ID of the 3DS scenario |
7099948d-7286-47e4-aad8-b68f7eb44591 |
merchantAccountId |
JsonNullable<String> |
➖ |
The ID of the merchant account to use for this request. |
|
threeDSecureScenarioUpdate |
ThreeDSecureScenarioUpdate |
✔️ |
N/A |
|
UpdateThreeDsScenarioResponse
| Error Type |
Status Code |
Content Type |
| models/errors/Error400 |
400 |
application/json |
| models/errors/Error401 |
401 |
application/json |
| models/errors/Error403 |
403 |
application/json |
| models/errors/Error404 |
404 |
application/json |
| models/errors/Error405 |
405 |
application/json |
| models/errors/Error409 |
409 |
application/json |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/Error425 |
425 |
application/json |
| models/errors/Error429 |
429 |
application/json |
| models/errors/Error500 |
500 |
application/json |
| models/errors/Error502 |
502 |
application/json |
| models/errors/Error504 |
504 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |
Removes a 3DS scenario from our system. Only available in sandbox environments.
package hello.world;
import com.gr4vy.sdk.Gr4vy;
import com.gr4vy.sdk.models.errors.*;
import com.gr4vy.sdk.models.operations.DeleteThreeDsScenarioResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws Exception {
Gr4vy sdk = Gr4vy.builder()
.merchantAccountId("<id>")
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
DeleteThreeDsScenarioResponse res = sdk.threeDsScenarios().delete()
.threeDsScenarioId("7099948d-7286-47e4-aad8-b68f7eb44591")
.call();
// handle response
}
}
| Parameter |
Type |
Required |
Description |
Example |
threeDsScenarioId |
String |
✔️ |
The ID of the 3DS scenario |
7099948d-7286-47e4-aad8-b68f7eb44591 |
merchantAccountId |
JsonNullable<String> |
➖ |
The ID of the merchant account to use for this request. |
|
DeleteThreeDsScenarioResponse
| Error Type |
Status Code |
Content Type |
| models/errors/Error400 |
400 |
application/json |
| models/errors/Error401 |
401 |
application/json |
| models/errors/Error403 |
403 |
application/json |
| models/errors/Error404 |
404 |
application/json |
| models/errors/Error405 |
405 |
application/json |
| models/errors/Error409 |
409 |
application/json |
| models/errors/HTTPValidationError |
422 |
application/json |
| models/errors/Error425 |
425 |
application/json |
| models/errors/Error429 |
429 |
application/json |
| models/errors/Error500 |
500 |
application/json |
| models/errors/Error502 |
502 |
application/json |
| models/errors/Error504 |
504 |
application/json |
| models/errors/APIException |
4XX, 5XX |
*/* |