tbi bank – Integration specifications

  1. Integration workflow:
    Integration is performed via APIm:
    – Authorize
    – RegisterApplication
    – ApplicationStatusNotification
    1.1. Integration diagram
    1.2 AuthorizeUAT environment:
    POST https://tbi-apim.azure-api.net/ftosgr/api/v1/User/authorize
    Host: tbi-apim.azure-api.net
    Headers:
    Content-Type: application/json
    Ocp-Apim-Subscription-Key: *************************
    Ocp-Apim-Trace: true
    Request example:
    {
    “username”:”username”,
    “password”:”*******”
    }
    Response example:
    {
    “token”: “x52xfx3b-dba1-49d5-8b50-bd191f412xx4”
    }Usage example:
    curlJqueryAuthorize Request

    1.3. RegisterApplication

    UAT environment:
    POST https://tbi-apim.azure-api.net/ftosgr/api/v1/Application
    Host: tbi-apim.azure-api.net

    Headers:
    Content-Type: application/json
    Ocp-Apim-Subscription-Key: ***************************
    Ocp-Apim-Trace: true
    AuthorizationToken: ff70ac71-fc25-4027-a3cb-d7afa380a422
    (Authorization token can be retrieved from response of Authorize method)

    Request example:
    {
    “firstname”: “TestName”,
    “lastname”: “testLastName”,
    “surname”: “testSurname”,
    “pin”: “012345678”,
    “origin”: “POS_Online”,
    “resellercode”: “p1”,
    “email”: “mail@mail.com”,
    “phone”: “6900000000”,
    “billingaddress”: {
    “country”: “”,
    “county”: “ΑΘΗΝΑΙΩΝ”,
    “city”: “ΑΘΗΝΑ”,
    “streetname”: “street”,
    “streetno”: “2”,
    “buildingno”: “232”,
    “entranceno”: “B”,
    “floorno”: “3”,
    “apartmentno”: “22”,
    “postalcode”: “1000”
    },
    “deliveryaddress”: {
    “country”: “GR”,
    “county”: “ΑΘΗΝΑΙΩΝ”,
    “city”: “ΑΘΗΝΑ”,
    “streetname”: “street”,
    “streetno”: “2”,
    “buildingno”: “232”,
    “entranceno”: “B”,
    “floorno”: “3”,
    “apartmentno”: “22”,
    “postalcode”: “10431”
    },
    “orderid”: “AA12918291289”,
    “bankingproductcode”: “POS1”,
    “promo”: “”,
    “installments”: “8”,
    “ordertotal”: “1500.00”,
    “installmentamount”: “100”,
    “items”: [
    {
    “name”: “iPhone 12 Pro”,
    “description”: “iPhone 12 Pro 512GB Gold”,
    “qty”: “1”,
    “price”: “1500.00”,
    “sku”: “iphone12pro512gbgold”,
    “category”: “MobilePhone”,
    “imagelink”: “https://www.apple.com/v/iphone-12-
    pro/f/images/overview/hero/hero_static__k8unjy3rn32a_large.jpg”
    }
    ],
    “siteurl”: “https://www.merchant.com”,
    “statusurl”: https://www.wheretoreceiveapplication.com/status,
    “additionalValues”: {
    “subMerchantLegalEntity”: “Entity name here”,
    “subMerchantBrand”: “Brand here”,
    “subMerchantWebsite”: “https://www.merchant.com”,
    “subMerchantMccCode”: “5499”,
    “subMerchantMccDescription”: “Convienient Stores”
    }
    }
    Response example:
    {
    “CreditApplicationId”: “a3d80e51-d61f-4b93-9cbc-67040ed6da8c”,
    “OrderId”: “AA12918291289”,
    “Url”: “https://host.westeurope.cloudapp.azure.com/B2C_Proxy/POS_Online?sessionId=8a68321
    8-c89d-447f-ba66-8dede71e6221″,
    “Origin”: “POS_Online”,
    “ErrorCode”: null,
    “ErrorMessage”: null
    }

    NOTE:
    For the field Origin are applicable the below values:
    – “POS_Online “ in case of the POS online standard products
    – “BNPL” in case of the BNPL products

    Usage example:
    curl

    Jquery



    1.4. Notifications statuses:
    a) Pos

    The endpoint where tbi’s Back end will send the status of the application to the Merchants “statusurl”
    property when a new application is submitted (see API “Application” )

    UAT environment
    Request URL
    https://tbi-apim.azure-api.net/ftosgr/api/applicationstatus

    HTTP request
    POST https://tbi-apim.azure-api.net/ftosgr/api/applicationstatus HTTP/1.1

    Host: tbi-apim.azure-api.net
    Content-Type: application/json
    Ocp-Apim-Subscription-Key: ••••••••••••••••••••••••••••••••
    Ocp-Apim-Trace: true

    {
    “CreditApplicationId”: “23e7e754-e69e-4321-93ae-78a72f0b6727”,
    “StatusUrl”: https://calc.tbibank.gr/function/status.php,
    “OrderId”: “1463”,
    “Status”: 2,
    “Message”: “2”,
    “ResellerCode”: “130001205_3”,
    “System”: “”
    }

    Response HTTP/1.1 200 OK
    {“status”:”OK”}
    Request to merchant.
    API management, having received a request, sends the same request to the merchant without any
    changes to the address from the “StatusUrl” field. The body of request is exactly the same, with no
    changes.

    {
    “CreditApplicationId”: “23e7e754-e69e-4321-93ae-78a72f0b6727”,
    “StatusUrl”: https://calc.tbibank.gr/function/status.php,
    “OrderId”: “1463”,
    “Status”: 2,
    “Message”: “2”,
    “ResellerCode”: “130001205_3”,
    “System”: “”
    }

    b) Bankly

    1.5. Full return:
    POST https://tbi-apim.azure-api.net/ftosgr/api/v1/Application/return HTTP/1.1
    Host: tbi-apim.azure-api.net
    Content-Type: application/json
    AuthorizationToken: ******************
    Ocp-Apim-Subscription-Key: ********************
    Ocp-Apim-Trace: true
    {“creditApplicationId”:”3fa85f64-5717-4562-b3fc-2c963f66afa6″,”orderId”:”order id
    here”,”resellerCode”:”code here”,”amount”:910.59}
    HTTP/1.1 200 OK
    api-supported-versions: 1.0
    content-type: application/json; charset=utf-8
    date: Wed, 03 Aug 2022 09:49:25 GMT
    ocp-apim-apiid: ftos-greece
    ocp-apim-operationid: 62ea439a61f0848452aea5f6
    ocp-apim-subscriptionid: master
    ocp-apim-trace-location:
    https://apimgmtstid3lcsfdhczuwak.blob.core.windows.net/apiinspectorcontainer/I-i29bfMIRMHcduW2zgLA2-710?sv=2019-07-
    07&sr=b&sig=F8jLHj5tbEnVk0NGWkFdzvTjIzuPu7%2FskwQAkcdJg%2BM%3D&se=2022-08-
    04T09%3A49%3A25Z&sp=r&traceId=4b18576e36d242488559957a1893a34a
    request-context: appId=cid-v1:a03dab33-a837-493b-a0e2-233cd981e876
    transfer-encoding: chunked
    vary: Origin
    x-powered-by: ASP.NET{
    “isSuccess”: false,
    “creditApplicationId”: null,
    “orderId”: null,
    “error”: {
    “code”: “500”,
    “message”: “Business validation error: Loan could not be found!”
    }
    }

    1.6. Checking goods availability:
    When the request sent to [statusUrl] contains the Order Confirmation status ID, the merchant
    must respond:
    – with http status 200 (OK) when goods are available
    – with any of the 4xx or 5xx statuses when the goods are no longer available
    Send status example:
    POST [statusUrl]Content-Type: application/json
    Body:
    {
    “creditApplicationId”: “3fa85f64-5717-4562-b3fc-2c963f66afa6”,
    “statusUrl”: “status url here”,
    “orderId”: “order id here”,
    “status”: “7”,
    “message”: “message”,
    “resellerCode”: “reseller code here”,
    “system”: “”
    }

    PROD environment: to be provided after set up on API’m

    RegisterApplicationRequest



  2. Customer journey: All designs are responsive to screen resolution.
    Please find below our designs for the process (it is currently in progress development):



Κατεβάστε το εγχειρίδιο του API