Acquirer‎ > ‎

Authentication and Binding Api

SimplyTapp Administrator API Commands v2.3

 

Admin API’s are used for complete control of the system.  The Admin API’s can be used to create new users, wallets, and individual cards.  The database structure is represented like this:

 

Card is a child of Wallet is a child of User

 

admin api only responds to requests from the designated admin.ip address in the web.properties file on the server.

 

 

Using AdminApi

 

CreateUser (create user)

URL

AdminApi

Data Type

POST

Input Var

DATA={JSON DATA}

Input JSON params

“command”:”CreateUser”

“email”:”email@domain.com

“pass”:”password123”

Output JSON response

“status”:”value”

 

value = 0 – success

value = 1 – user exists already

value = 2 – invalid email

value = 3 – invalid password

value = 4 – insert error

 

 

create a new user in the system from mac command line example:

curl 'https://www.simplytapp.com/accounts/AdminApi' -d 'DATA={"command":"CreateUser","email":"email@domain.com","pass":"password123"}'

 

 

UpdateUser

URL

AdminApi

Data Type

POST

Input Var

DATA={JSON DATA}

Input JSON params

“command”:”UpdateUser”

“email”:”email@domain.com

“pass”:”password123”

“new_email”:”new@email.com

“new_pass”:”new_password123”

“remove”:”anything”

Output JSON response

“status”:”value”

 

value = 0 – success

value = 1 – user exists already

value = 2 – invalid email

value = 3 – invalid password

value = 4 – update err

value = 5 – authentication err

 

 

Update user info in the system from mac command line example:

curl 'https://www.simplytapp.com/accounts/AdminApi' -d 'DATA={"command":"UpdateUser","email":"doug@simplytapp.com","pass":"test1","new_pass":"yeager1"}'

 

 

CreateAppToken  (create wallet)

URL

AdminApi

Data Type

POST

Input Var

DATA={JSON DATA}

Input JSON params

“command”:”CreateAppToken”

“email”:”email@domain.com

“pass”:”password123”

“consumer_key”:”the_consumer_key”

“consumer_secret”:”the_consumer_secret”

Output JSON response

“access_token”:”the_access_token”

“token_secret”:”the_token_secret”

“status”:”value”

 

value = 0 – success

value = 1 – no user

value = 2 – no mobile app

value = 3 – error creating token

*The “consumer key” and “consumer secret” are defined for individual mobile applications that have registered within the system.

 

create a new wallet for a user from the mac command line:

curl 'https://www.simplytapp.com/accounts/AdminApi' -d 'DATA={"command":"CreateAppToken","email":"dougapi3@simplytapp.com","pass":"yeager1","consumer_key":"mh1NGKrkkaUKHLit56Zkqe5YqKYSJ3arbPggL5dY","consumer_secret":"O6nOuI3K1KDhJt0H3dBDQxLmfXyBKkkqsc3WjHt4"}'

 

DeleteCard (delete card)

URL

AdminApi

Data Type

POST

Input Var

DATA={JSON DATA}

Input JSON params

“command”:”DeleteCard”

“access_token”:”the_access_token”

“token_secret”:”the_token_secret”

Output JSON response

 “status”:”value”

 

value = 0 – success

value = 2 – bad access token/secret

* The input “access token” and “token secret” is the token that relates to the card that should  be deleted. 

 

Delete a card:

curl 'https://www.simplytapp.com/accounts/AdminApi' -d 'DATA={"command":"DeleteCard","access_token":"z7FhdQjoc1oa7Wwuri181Ja8D0epMj2pMAYUFYZW","token_secret":"vhlVU1PIhkVb1T7WYsdXiqwCTjbirKchaMGe9csw"}'

 

UnregisterApp (unregister wallet)

URL

AdminApi

Data Type

POST

Input Var

DATA={JSON DATA}

Input JSON params

“command”:”UnregisterApp”

“access_token”:”the_access_token”

“token_secret”:”the_token_secret”

Output JSON response

 “status”:”value”

 

value = 0 – success

value = 2 – bad access token/secret

* The input “access token” and “token secret” is the token that relates to the wallet that should  be unregistered. 

 

Unregister a user wallet:

curl 'https://www.simplytapp.com/accounts/AdminApi' -d 'DATA={"command":"UnregisterApp","access_token":"z7FhdQjoc1oa7Wwuri181Ja8D0epMj2pMAYUFYZW","token_secret":"vhlVU1PIhkVb1T7WYsdXiqwCTjbirKchaMGe9csw"}'

 

CreateCardToken  (create a new card access token and secret from wallet access_token and wallet token_secret)

URL

AdminApi

Data Type

POST

Input Var

DATA={JSON DATA}

Input JSON params

“command”:”CreateCardToken”

“access_token”:”the_Create_Card_access_token”

“token_secret”:”the_Create_Card_token_secret”

“consumer_key”:”the_consumer_key”

“consumer_secret”:”the_consumer_secret”

“card_brand”:”the_card_brand_id”

Output JSON response

“access_token”:”the_access_token”

“token_secret”:”the_token_secret”

"card_id":"the_card_id_used_by_mobile_app"

“status”:”value”

 

value = 0 – success

value = 1 – no card brand or bad consumer credentials or bad access token data

value = 2 – bad access token/secret

value = 3 - card creation error

*The “consumer key” and “consumer secret” are defined for individual issuer entities that have registered within the system.  The input “access token” and “token secret” the particular wallet access_token and token_secret.  The “card brand” is the id of the card brand from within an issuing entity.  A “card brand” is a child of an issuer entity.

 

create a new card inside a user wallet:

curl 'https://www.simplytapp.com/accounts/AdminApi' -d 'DATA={"command":"CreateCardToken","access_token":"Rq7VMd939frGoQlaNDA5GZxHozFUWpN4wj4ay3Ec","token_secret":"HY15c0kH60RQk46EEcyAJKn5S2JKK4c0s1KDsD4o","consumer_key":"U9ctJErMjRUUGrk5enAaIi5aiBzbKEN5uCFEvJRa","consumer_secret":"f992st490DQ4BIjwERo0Upg8yRK17Yt48LYV9slm","card_brand":"177"}'

 


The following 2 API calls are optional calls that allow separating the previous call (CreateCardToken) into 2 separate calls.

CreateCardAccessToken  (get a new token from only a wallet owner credential)

URL

AdminApi

Data Type

POST

Input Var

DATA={JSON DATA}

Input JSON params

“command”:”CreateCardAccessToken”

“access_token”:”the_access_token”

“token_secret”:”the_token_secret”

Output JSON response

“access_token”:”the_access_token for creating the new card”

 “status”:”value”

 

value = 0 – success

value = 1 – no card brand or bad consumer credentials or bad access token data

value = 2 – bad access token/secret

value = 3 - card creation error

*The input “access token” and “token secret” is the token that relates to the wallet that should have the card added to it. 

 

create a new card inside a user wallet:

curl 'https://www.simplytapp.com/accounts/AdminApi' -d 'DATA={"command":"CreateCardAccessToken","access_token":"Rq7VMd939frGoQlaNDA5GZxHozFUWpN4wj4ay3Ec","token_secret":"HY15c0kH60RQk46EEcyAJKn5S2JKK4c0s1KDsD4o”}'

 

CreateCardTokenSecret  (get a new card token secret from the CreateCardAccessToken access_token)

URL

AdminApi

Data Type

POST

Input Var

DATA={JSON DATA}

Input JSON params

“command”:”CreateCardTokenSecret”

“access_token”:”the_access_token for the card”

“consumer_key”:”the_consumer_key”

“consumer_secret”:”the_consumer_secret”

“card_brand”:”the_card_brand_id”

Output JSON response

 “token_secret”:”the_token_secret for creating the card”

"card_id":"the_card_id_used_by_mobile_app"

“status”:”value”

 

value = 0 – success

value = 1 – no card brand or bad consumer credentials or bad access token data

value = 2 – bad access token/secret

value = 3 - card creation error

*The “consumer key” and “consumer secret” are defined for individual issuer entities that have registered within the system.  The input “access token” is the token that relates to the card that is being added.  The “card brand” is the id of the card brand from within an issuing entity.  A “card brand” is a child of an issuer entity.

 

create a new card inside a user wallet:

curl 'https://www.simplytapp.com/accounts/AdminApi' -d 'DATA={"command":"CreateCardTokenSecret","access_token":"Rq7VMd939frGoQlaNDA5GZxHozFUWpN4wj4ay3Ec”,”consumer_key":"U9ctJErMjRUUGrk5enAaIi5aiBzbKEN5uCFEvJRa","consumer_secret":"f992st490DQ4BIjwERo0Upg8yRK17Yt48LYV9slm","card_brand":"177"}'

 

 

 

Access Token Usage:

After an access token and token secret have been obtained for an individual card, the card can be accessed through STBridge.jar utility.  This utility allows you to input both the consumer credentials and the token credentials to gain a terminal shell into the card.  At that point gpjNG shell commands can be used to provision or communicate to the virtual card.  Docs for using gpjNG are here:

http://wiki.simplytapp.com/utilities-resources/gpjng-tutorial