Get Token

The API will generate a token to use in the other APIs to validate merchant. It also returns payment integration option set for the merchant. The response key is “is_3d”. The possible values of is_3d are: 0, 1, 2 and 4.

0 = Whitelabel 2D only, 1 = Whitelabel 2D or 3D , 2 = Whitelabel 3D only, 4 = Branded payment solution

If token API return 1, merchant website must display a checkbox for user to choose 2D or 3D.

Every token has 2 hour expiry time and it is highly recommended to use same token until it is expired. There is no need to call this API everytime for every request to proceed when a token for a merchant is in scope of its validity period.

The following request and response are example of the API.

Method URL Content-Type
Post /api/token application/json


Type Params Data Type Condition
KEY app_id string Mandatory
KEY app_secret string Mandatory

app_id

app_id is a unique key assigned to the merchant. It must be sent from merchant website.

app_secret

app_secret is a unique and secret key given to the merchant. It must be sent from merchant website.

URL

URL
https://provisioning.sipay.com.tr/ccpayment/api/token


Request

 {
    "app_id":"077faac7dba364b3f058193de9fea2e6",
    "app_secret":"bb18138fbd6fe9a2512e8933e6f37a01"
 }

Success Response

{
    "status_code": 100,
    "status_description": "Successfully Generated token",
    "data": {
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImQxNDQ0ZTFkYTE0NGIyODE1Y2FhNGM4MWZjMGVj
        NTMxZWJkMzllZGE2YjVlMDMyZTZhMTk1YmMzMjg4ZGEyYTU3ZmVjNjg1NGYzZTU4YjU0In0.eyJhdWQiOiI5IiwianRpIjo
        iZDE0NDRlMWRhMTQ0YjI4MTVjYWE0YzgxZmMwZWM1MzFlYmQzOWVkYTZiNWUwMzJlNmExOTViYzMyODhkYTJhNTdmZWM2OD
        U0ZjNlNThiNTQiLCJpYXQiOjE2MTE5MjA3NjEsIm5iZiI6MTYxMTkyMDc2MSwiZXhwIjoxNjExOTI3OTYxLCJzdWIiOiI4N
        iIsInNjb3BlcyI6W119.jdaTux27yOlTMpe2hscpNWJhN0wj2WEizLXRb-iXaA0upS2S2jfwyupE44pKYF8COArBQlCp8Sz8
        TYQ_kuH-5fxwOcH1fHTlW7oCldRAtv1Un3UfZbBnsjPg-zIMzjMQHIzNJPmzAZSwYKKU858zsABPhpEPPm32ePQrchn30D_xl
        Hk-_mjNBghboHyCP5oQgiHK8R2dMe-wtzgvQqQ_ofUNMVdKIoF04UJgWsPSy6W4w-oqw1v-gEsYiHlEPzjEZKQ37bzH5WiuT5
        cki2vBvOigk3c6kshWhQgNYBUhdaaukYo4CMf9mew8SiW-CqfcjsyqwcofSFD-n53mBNzc4BwFy1XCdr92PYMEUTfhyhZ3HAJ
        hmnC8jG0Zz-jGXxDCul46u-cWtTE0QKwUUhq7bMOYO-fu_MBY17oQOLaoiH1vtkHY8F2DhC54iodtBNQHDmfrfvPG7mRIM3Hk
        J2H9jchrtyfE-443kt-tqrID7_Tpeo0T_X2NhVGnVIBmwaKpNdsoc-r22OBATj20Dh3Gv7U-QhaaEEGaV4PEIK3BedGePUncg
        AdEsV-bLxmEFGwSuRa0H5ZccNjsx7dkjIkZFRACZtYQClzeO5swNn6wNa3wGDIduZUlkkLtZdmg8FWpwy9XKr_qlJLS4rMNyqc
        ruLtVKQyVYKTuId392cUTNQQ",
        "is_3d": 1,
        "expires_at": "2021-01-29 16:46:01"
    }
}

Failed Response

{
   "status_code": 2,

   "status_description": "Invalid credentials"
}