Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 4 Next »

This section will guide you through the essential steps to integrate your third-party platform with our APIs. By following these steps, you will be able to register as a Third Party Provider (TPP), generate necessary tokens, and establish secure communication with our services.

Register as a Third Party Provider (TPP)

To begin integrating with Leatherback, you need to register as a Third Party Provider (TPP). This registration process involves making an API call to our registration endpoint.

API Endpoint: /api/v1/tpp/register

Method: POST

Request Headers:

  • Content-Type: application/json

Request Body:

{
  "organizationName": "Your Organization Name",
  "contactEmail": "contact@example.com",
  "redirectUri": "https://your-redirect-uri.com/callback"
}

Sample Request:

curl -X POST "https://api.leatherback.com/api/v1/tpp/register" \
-H "Content-Type: application/json" \
-d '{
  "organizationName": "Your Organization Name",
  "contactEmail": "contact@example.com",
  "redirectUri": "https://your-redirect-uri.com/callback"
}'

Response:

{
  "tppId": "unique-tpp-id",
  "status": "registered"
}

Generate a Client Token

Once registered as a TPP, the next step is to generate a client token. This token is necessary for authenticating subsequent API calls.

API Endpoint: /api/v1/auth/generate-client-token

Method: POST

Request Headers:

  • Content-Type: application/json

Request Body:

{
  "tppId": "your-unique-tpp-id",
  "clientSecret": "your-client-secret"
}

Sample Request:

curl -X POST "https://api.leatherback.com/api/v1/auth/generate-client-token" \
-H "Content-Type: application/json" \
-d '{
  "tppId": "your-unique-tpp-id",
  "clientSecret": "your-client-secret"
}'

Response:

{
  "clientToken": "generated-client-token",
  "expiresIn": 3600
}

Create Client Consent

After generating a client token, the next step is to create client consent. This step involves generating a consentId in our systems so we can tie consent requests to you as a TPP.

In this tutorial, you create a consent for any of the following available permissions:

Permissions

Dependencies

ReadAccountsBasic

None

API Endpoint: /api/v1/consent/create

Method: POST

Request Headers:

  • Content-Type: application/json

  • Authorization: Bearer {clientToken}

Request Body:

{
    "Data": {
        "Permissions": [
            "ReadAccountsBasic",
            "ReadAccountsDetail"
        ],
        "ExpirationDateTime": "2020-12-02T00:00:00+00:00",
        "TransactionFromDateTime": "2020-09-03T00:00:00+00:00",
        "TransactionToDateTime": "2020-12-03T00:00:00+00:00"
    },
    "Risk": {}
}

Create JWT URL Parameters Token

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.