Code Monkey home page Code Monkey logo

gpi-prevalidation-connector-sdk's Introduction

gpi-prevalidation-connector-sdk

Beneficiary account pre-validation

  • API version: 1.0.10

Move your app forward with the Account Pre-Validation API

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.swift.gpi.preval</groupId>
  <artifactId>java-client</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/java-client-1.0.0-jar-with-dependencies.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

import com.swift.gpi.preval.*;
import com.swift.gpi.preval.auth.*;
import com.swift.gpi.preval.model.*;
import com.swift.gpi.preval.api.VerifyAccountApi;

import java.io.File;
import java.util.*;

public class VerifyAccountApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: SwiftLAU
        ApiKeyAuth SwiftLAU = (ApiKeyAuth) defaultClient.getAuthentication("SwiftLAU");
        SwiftLAU.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //SwiftLAU.setApiKeyPrefix("Token");

        VerifyAccountApi apiInstance = new VerifyAccountApi();
        AccountVerificationRequest body = new AccountVerificationRequest(); // AccountVerificationRequest | Verify Account Details Request.
        String laUApplicationID = "laUApplicationID_example"; // String | ID that identifies the application generating the API and used by the gpi Connector to retrieve the related LAU keys, required for consumers using gpi connector only
        String laUVersion = "laUVersion_example"; // String | version of the LAUSigned header. Mandatory. \"1.0\" for this first release, required for consumers using gpi connector only
        String laUCallTime = "laUCallTime_example"; // String | timestamp in UTC of the API call in the format YYYY-MM-DDTHH:MM:SS.sssZ, required for consumers using gpi connector only
        String laURequestNonce = "laURequestNonce_example"; // String | a random value generated by the client consumer. Provided with the request and copied by the gpi Connector on the response, required for consumers using gpi connector only
        String laUSigned = "laUSigned_example"; // String | service specific HTTP headers composed of apiKey, rbac role and bic to route the request, required for consumers using gpi connector only
        String laUSignature = "laUSignature_example"; // String | contains the LAU (SHA256) signature, base64 encoded, required for consumers using gpi connector only
        String xBic = "xBic_example"; // String in lower case | describe the BIC for SWIFT to route the request, providers get the value and consumers are not required to fill it in
        String subjectDN = "subjectDN_example"; // String in lower case | describe the distinguish name of the consumer, providers get the value and consumers are not required to fill it in
        String institution = "institution_example"; // String in lower case | describe the BIC of the consumer, providers get the value and consumers are not required to fill it in
        try {
            AccountVerificationResponse1 result = apiInstance.verifyAccount(body, laUApplicationID, laUVersion, laUCallTime, laURequestNonce, laUSigned, laUSignature, xBic, subjectDN, institution);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling VerifyAccountApi#verifyAccount");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to: Sandbox environment - https://sandbox.swift.com/swift-preval-pilot Pilot environment - https://apigtw-test.swiftnet.sipn.swift.com/swift-preval-pilot Production environment - https://apigtw.swiftnet.sipn.swift.com/swift-preval

Class Method HTTP request Description
VerifyAccountApi verifyAccount POST /v1/accounts/verification Verify that a beneficiary account could be able to receive incoming funds.

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

SwiftLAU

  • Type: API key
  • API key parameter name: LAUSignature
  • Location: HTTP header

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

[email protected]

gpi-prevalidation-connector-sdk's People

Contributors

yinchanted avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.