Get security token - OAuth2

To secure our API we use OAuth2 with password flow for all endpoints. Authorization header must always contain a Bearer token obtained using tokenURL.

Obtaining token URL for authorization

📘

POST

https://api.centili.com/auth/realms/api/protocol/openid-connect/token

Parameters

Parameter

Description

Type

client_id

Name of the client

string

grant_type

Name of the flow: 'password' when obtaining a token using username and password, 'refresh_token' when refreshing an existing token

string

username

Your username, required when obtaining tokens via password flow.

string

password

Your password, required when obtaining tokens via password flow.

string

refresh_token

Your refresh token, required when obtaining tokens via refresh token flow.

string

Starting a transaction

📘

POST

https://api.centili.com/auth/transactions/init

Parameters

Parameter

Description

Type

Authorization

Bearer token received when authenticating.

string

Idempotency-Key

Unique key for this request. When repeating the request with the same key, response will either be 409 conflict if the request is currently executing or the same response returned originally, but the request will not be executed twice.

string

Request body

{
  "userIdentifier": {
    "country": "string",
    "imsi": "string",
    "msisdn": "string",
    "operator": "string",
    "identId": "string"
  },
  "price": "string",
  "wap": true,
  "serviceKey": "string",
  "clientData": {
    "clientUserId": "string",
    "pageCustomization": {
      "itemName": "string",
      "designId": "string",
      "language": "string"
    },
    "clientReference": "string",
    "returnURL": "string"
  },
  "params": [
    "string"
  ]
}

Responses

👍

Status 200

Accepted

Example value

{
  "transactionType": "CHARGE",
  "country": "string",
  "action": {
    "simtcha": {
      "imageURL": "string",
      "answers": [
        {
          "answerId": "string",
          "imageUrl": "string"
        }
      ]
    },
    "userInstruction": "string",
    "urlRedirect": "string",
    "type": "MO",
    "shortcode": "string",
    "keyword": "string",
    "urlReturn": "string"
  },
  "clientData": {
    "clientUserId": "string",
    "clientReference": "string"
  },
  "msisdn": "string",
  "transactionId": "string",
  "operator": "string"
}

❗️

Status 400 / 500

{
"code": "string",
"message": "string"
}
Check the table bellow for error details

Status(code)

Error(message)

400

Transaction can not be started - check message for details.

401

Invalid credentials

409

Request with the same idempotency key is currently executing

500

Request can not be processed at current time

501

API endpoint not in use

Release transaction

📘

POST

https://api.centili.com/auth/transactions/{transactionId}/release

Parameters

Parameter

Description

Type

transactionId

Unique value generate on our platform on initiation of the transaction

string

Authorization

Bearer token received when authenticating.

string

Idempotency-Key

Unique key for this request. When repeating the request with the same key, response will either be 409 conflict if the request is currently executing or the same response returned originally, but the request will not be executed twice.

string

👍

Status 200

Transaction released

Example value

{
  "clientData": {
    "clientUserId": "string",
    "clientReference": "string"
  },
  "transactionId": "string"
}

❗️

Status 400/500

{
"code": "string",
"message": "string"
}
Check the table bellow for error details

Status(code)

Error(message)

400

Transaction can not be released

401

Invalid credentials

404

Transaction not found

409

Request with the same idempotency key is currently executing

500

Request can not be processed at current time

501

API endpoint not in use

Submit PIN

📘

POST

https://api.centili.com/auth/transactions/{transactionId}/pin

Parameters

Parameter

Description

Type

transactionId

Unique value generate on our platform on initiation of the transaction

string

Authorization

Bearer token received when authenticating.

string

Idempotency-Key

Unique key for this request. When repeating the request with the same key, response will either be 409 conflict if the request is currently executing or the same response returned originally, but the request will not be executed twice.

string

Request body

{
  "pin": "string"
}

👍

Status 200

PIN correct

Example value

{
  "clientData": {
    "clientUserId": "string",
    "clientReference": "string"
  },
  "transactionId": "string"
}

❗️

Status 400/500

{
"code": "string",
"message": "string"
}
Check the table bellow for error details

Status(code)

Error(message)

400

Invalid PIN sent, request can be retried

401

Invalid credentials

404

Transaction not found

409

Request with the same idempotency key is currently executing

429

Number of attempts over the max retry limit, request can not be retried.

500

Request can not be processed at current time

501

API endpoint not in use

Getting transaction data

📘

GET

https://api.centili.com/auth/transactions/{transactionId}

Parameters

Parameter

Description

Type

transactionId

Unique value generate on our platform on initiation of the transaction

String

Authorization

Bearer token received when authenticating.

Strin

Idempotency-Key

Unique key for this request. When repeating the request with the same key, response will either be 409 conflict if the request is currently executing or the same response returned originally, but the request will not be executed twice.

String

👍

Status 200

Example value

{
  "transactionType": "RENEW",
  "country": "string",
  "item": {
    "amount": "string",
    "price": "string",
    "name": "string",
    "currency": "string"
  },
  "notificationStatus": "DELIVERED",
  "subscriber": "string",
  "timeCharged": "string",
  "transactionStatus": "COMPLETED",
  "clientData": {
    "clientUserId": "string",
    "clientReference": "string"
  },
  "serviceKey": "string",
  "error": "string",
  "transactionId": "string",
  "operator": "string"
}

❗️

Status 400/500

{
"code": "string",
"message": "string"
}

400

Request error

401

Invalid credentials

404

Transaction not found

409

Request with the same idempotency key is currently executing

500

Request can not be processed at current time

501

API endpoint not in use

Updated 2 months ago

Get security token - OAuth2


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.