Token

This method will generate a bearer token to proceed with other web api methods. The parameters included to basic identifiers of a merchant which should be provided to specific merchant upon registration.

Method URL Content-Type
POST Test: https://provisioning.sipay.com.tr /ccpayment/api/token application/json
POST Production: https://app.sipay.com.tr /ccpayment/api/token application/json


Parameters Values Condition
app_id string Mandatory
app_secret string Mandatory


Authorization

Authorization is a header key which defines verification that the connection attempt is allowed. The method should be “Bearer”

Request

{
    "app_id":"c3d81ae3cc3011ef10dcefa31a458d65",
    "app_secret":"217071ea9f3f2e9b695d8f0039024e64"
 }

Fail Response

{
    "status_code": 30,
    "status_description": "Invalid credentials"
}

Success Response

Successful
{
    "status_code": 100,
    "status_description": "Successfully Generated token",
    "data": {
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxMyIsImp0aSI6ImNhZWZkNGU0Y2RhMWYxNzkxOTQxZmQ0Y2Q
        5YmUxZTRjYmZjMDRmZTUzZDdlMDhjOGViMjU1ZGYxNzdmYWYwYWRhNzlkYTQ0Y2MxODM5OTgyIiwiaWF0IjoxNjMzMTcyMDEyLjE3NTEs
        Im5iZiI6MTYzMzE3MjAxMi4xNzUxLCJleHAiOjE2MzMxNzkyMDguOTk4Nywic3ViIjoiNiIsInNjb3BlcyI6W119.cLapdbGNhi9T7F_dCFG
        s7Nw9ADXzIEEXf6jF6AGbPbLs4ArJ7cm4nnei8OcU7KoTGgdx9RUbtoZN3f3jypq4bUaZD5UgekmIjqlYBAtGsNCuBhf5YOjoc0rQCd2DUePEInc
        AQLfb0pcHuKvnV3D6MdeQRqqRWMcMKrUHH5wKpK4KO8Ylpq88_QcbNo1y9KRgNbPQESTdPq2NM8s9bNyeE0rcpLouDr2GnIhT8KXWT0ynbkWyBtA
        Ha-9k8j9E96NTQyaLqzb_CFMoTmrvwNorkF1Hv_lHHpe2NLOzNFd_qVHnMIriiEgmh4hcemBXB1_PGfPcbmIX3-8VmgTPZ2sITWTawJ38A_XEJS
        U8dysaepycE1oSOTEKsVJ088onU28R-QCnbrtqBs6qMZ9O4H-hKJ4TVhg3HfZDwYkMs9XWQilDRZSsqWVIkMFScsjtFcZGLLlinBaCXl2W3d-EnK0
        rlzLS1M1GvmgvcbZZkzeuqWZ4hY3PUb8FN4YezWt655Gacn9b3CrQqGNwJdE1WPPwLknFY5ZF-Gyc4NKuAWZLyaB9Hlw7G31rbvNf1Dj7rJrskscI
        1wVWmiY6FGcsGth-5Rwp4Oxv6a8ofji2eQWi10CYtt--qoJGLnotz_OQbYvo_LYW6EnSVH52n55FHali6trkYHKaYJs29Yx0iDSg",
        "is_3d": 2,
        "expires_at": "2021-10-02 15:53:28"
    }
}