Skip to content

Token Bank Integration API (1.0.6)

This API is for banks integrating with Token

Overview
Languages
Servers
https://docs.token.io

accounts

Accounts Service - Implemented by bank to support access to account information.

Operations

transfers

Transfers Service - Implemented by bank to support payment initiation.

Operations

Create transfer

Request

Creates a transaction for a given transfer request.

Security
BasicAuth or Bearer
Headers
token-consent-idstring

The Consent/Token indentifier

token-tpp-idstring

The TPP indentifier

token-account-holder-idstring

The account holder indentifier

Bodyapplication/jsonrequired

The transfer request.

transferIdstringrequired

The Token transfer identifier.

transactionAmountobject(Money)required

Represents a monetary value.

transactionAmount.​currencystring= 3 charactersrequired

ISO4217 - 3 letter currency code such as "USD" or "EUR".

transactionAmount.​valuestringrequired

Double amount in the string format.

sourceobject(BankAccount)required

Represents Token account identifier.

Example: {"account":{"custom":{"bankId":"test","payload":"0123456789"}}}
source.​accountCustom (object) or Iban (object) or Domestic (object)required

The bank account identifier.

Example: {"custom":{"bankId":"test","payload":"0123456789"}}
One of:

Represents an account identifier in bank-custom format.

source.​account.​bankIdstringrequired

the Token bank identifier.

source.​account.​payloadstringrequired

the bank-custom account identifier.

destinationsArray of objects(TransferDestinations)
descriptionstring

Optional transfer description.

tokenRefIdstring

Reference id of the token, set by the initiator.

tokenInitiatorIdstring

Id of the member requesting token creation.

transferRefIdstring

Transfer reference id.

metadataobject(TransferMetadata)

Represents additional metadata related to a transfer.

curl -i -X POST \
  https://docs.token.io/transfers \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -H 'token-account-holder-id: string' \
  -H 'token-consent-id: string' \
  -H 'token-tpp-id: string' \
  -d '{
    "transferId": "string",
    "transactionAmount": {
      "currency": "str",
      "value": "string"
    },
    "source": {
      "account": {
        "custom": {
          "bankId": "test",
          "payload": "0123456789"
        }
      }
    },
    "destinations": [
      {
        "destinations": [
          {
            "scheme": {
              "iban": "string",
              "bic": "string"
            }
          }
        ],
        "customerData": {
          "legalNames": [
            "string"
          ],
          "address": {
            "houseNumber": "string",
            "houseName": "string",
            "flats": "string",
            "conscriptionNumber": "string",
            "street": "string",
            "place": "string",
            "postCode": "string",
            "city": "string",
            "country": "st",
            "full": "string",
            "hamlet": "string",
            "suburb": "string",
            "subdistrict": "string",
            "district": "string",
            "province": "string",
            "state": "st"
          }
        }
      }
    ],
    "description": "string",
    "tokenRefId": "string",
    "tokenInitiatorId": "string",
    "transferRefId": "string",
    "metadata": {
      "purposeOfPayment": "OTHER",
      "paymentContext": "OTHER_CONTEXT",
      "merchantCategoryCode": "string",
      "merchantCustomerId": null,
      "deliveryAddress": {
        "houseNumber": "string",
        "houseName": "string",
        "flats": "string",
        "conscriptionNumber": "string",
        "street": "string",
        "place": "string",
        "postCode": "string",
        "city": "string",
        "country": "st",
        "full": "string",
        "hamlet": "string",
        "suburb": "string",
        "subdistrict": "string",
        "district": "string",
        "province": "string",
        "state": "st"
      }
    }
  }'

Responses

The transaction.

Bodyapplication/json
transactionIdstringrequired

The transaction id as recorded by the bank.

statusstring(TransactionStatus)required

The transaction status.

Enum"PROCESSING""SUCCESS""FAILURE_INSUFFICIENT_FUNDS""FAILURE_INVALID_CURRENCY""FAILURE_PERMISSION_DENIED""FAILURE_INVALID_AMOUNT""FAILURE_EXPIRED""FAILURE_UNSUPPORTED_DESTINATION""FAILURE_GENERIC""INITIATED"
statusDescriptionstringrequired

Human-readable status description.

sourceobject(TransferEndpoint)

Money transfer source or destination account

Response
application/json
{ "transactionId": "string", "status": "PROCESSING", "statusDescription": "string", "source": { "account": { … }, "customerData": { … } } }

Get transfer status for given transfer

Request

Retrieves the status of a given transfer by its unique ID.

Security
BasicAuth or Bearer
Path
transferIdstringrequired

The transfer ID.

Headers
token-consent-idstring

The Consent/Token indentifier

curl -i -X GET \
  'https://docs.token.io/transfers/{transferId}/status' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'token-consent-id: string'

Responses

The transfer status.

Bodyapplication/json
string(TransactionStatus)

The transaction status.

Enum"PROCESSING""SUCCESS""FAILURE_INSUFFICIENT_FUNDS""FAILURE_INVALID_CURRENCY""FAILURE_PERMISSION_DENIED""FAILURE_INVALID_AMOUNT""FAILURE_EXPIRED""FAILURE_UNSUPPORTED_DESTINATION""FAILURE_GENERIC""INITIATED"
Response
application/json
"PROCESSING"

health

Health Check Endpoints.

Operations