Skip to content

Users

This section contains information on how to manage account users, including creating, updating, and deleting users, as well as changing passwords and managing API keys.

Create User

Create a new user account.

Request Method: POST

URL Endpoint: /api/user

NameTypeDefaultDescriptionRequired
usernamestringunique username (must contain alpha and numeric characters)
namestringfirst and last name
phonestringphone number, digits only
emailstringemail address (must be valid email format)
timezonestringtimezone (ex. ETC/UTC)
passwordstringpassword
statusstringstatus (active or disabled)
rolestringdefined role (admin or standard)

Get User by ID

Retrieve the properties of a specific user.

Request Method: GET

URL Endpoint: /api/user/{ user id }

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "b89227ij8m0nuanr1tk0",
    "username": "testmerchant43",
    "name": "test merchant user",
    "phone": "6305555555",
    "email": "info@website.com",
    "timezone": "ETC/UTC",
    "status": "active",
    "role": "admin",
    "account_type": "merchant",
    "account_type_id": "aucio551tlv85l7moe5g",
    "created_at": "2017-11-20T00:26:06.190264Z",
    "updated_at": "2017-11-20T00:26:06.190264Z"
  }
}

Get Current User

Retrieve the properties of the currently authenticated user. This is intended as a helper function, it is recommended to get a specific user by providing the ID if possible.

Request Method: GET

URL Endpoint: /api/user

json
{
  "status": "success",
  "msg": "success",
  "data": {
    "id": "b89227ij8m0nuanr1tk0",
    "username": "testmerchant43",
    "name": "test merchant user",
    "phone": "6305555555",
    "email": "info@website.com",
    "timezone": "ETC/UTC",
    "status": "active",
    "role": "admin",
    "account_type": "merchant",
    "account_type_id": "aucio551tlv85l7moe5g",
    "created_at": "2017-11-20T00:26:06.190264Z",
    "updated_at": "2017-11-20T00:26:06.190264Z"
  }
}

Get All Users

Retrieve the properties of all users for the gateway or partner account associated with the API Key or JWT token provided in the Authorization header.

Request Method: GET

URL Endpoint: /api/users

json
{
  "status": "success",
  "msg": "success",
  "total_count": 3,
  "data": [
    {
      "id": "b89227ij8m0nuanr1tk0",
      "username": "testmerchant43",
      "name": "test merchant user",
      "phone": "6305555555",
      "email": "info@website.com",
      "timezone": "ETC/UTC",
      "status": "active",
      "role": "admin",
      "account_type": "merchant",
      "account_type_id": "aucio551tlv85l7moe5g",
      "created_at": "2017-11-20T00:26:06.190264Z",
      "updated_at": "2017-11-20T00:26:06.190264Z"
    }
  ]
}

Update User

Edit the properties of an existing user account.

Request Method: POST

URL Endpoint: /api/user/{ user id }

NameTypeDefaultDescriptionRequired
namestringfirst and last name
phonestringphone number, digits only
emailstringemail address (must be valid email format)
timezonestringtimezone (ex. ETC/UTC)
statusstringstatus (active or disabled)
rolestringdefined role (admin or standard)
permissionsobject(account defaults)users permissions
permissions.manage_usersbooleanfalse
permissions.manage_api_keysbooleanfalse
permissions.manage_terminalsbooleanfalse
permissions.manage_rule_enginebooleanfalse
permissions.view_settlement_batchesbooleanfalse
permissions.view_billing_reportsbooleanfalse
permissions.process_authorizationbooleanfalse
permissions.process_capturebooleanfalse
permissions.process_salebooleanfalse
permissions.process_voidbooleanfalse
permissions.process_creditbooleanfalse
permissions.process_refundbooleanfalse
permissions.process_verificationbooleanfalse
permissions.allow_dashboard_statsbooleanfalse
permissions.vault_createbooleanfalse
permissions.vault_updatebooleanfalse
permissions.vault_deletebooleanfalse
permissions.access_file_batchbooleanfalse
permissions.view_others_transactionsbooleanfalse
permissions.manage_card_bansbooleanfalse
permissions.restrict_viewing_others_invoicesbooleanfalse
permissions.recurring_status_changebooleanfalse
notifications.merchantobject(account defaults)notification values
notifications.merchant.transaction_receiptsbooleanfalse
notifications.merchant.settlement_reportsbooleanfalse
notifications.merchant.triggered_rulesbooleanfalse
notifications.merchant.security_alertsbooleanfalse
notifications.merchant.invoice_createbooleanfalse
notifications.merchant.transaction_voidbooleanfalse
defaultsobjectdefault settings
defaults.processor_idstringdefault processor
defaults.terminal_idstringdefault terminal_id
defaults.transaction_csv_format_idstringdefault transaction csv export format
defaults.transaction_report_format_idstringdefault transaction report format
defaults.vault_table_format_idstringdefault vault report format
defaults.show_transaction_totalsbooleanreports should show transaction totals

Delete User

Delete a specific user.

Request Method: DELETE

URL Endpoint: /api/user/{ user id }

json
{
  "status": "success",
  "msg": "successfully deleted",
  "data": null
}

Change Password

Change a user's password. Must provide an API Key or JWT token associated with the user as the Authorization header value.

Request Method: POST

URL Endpoint: /api/user/change-password

NameTypeDefaultDescriptionRequired
usernamestringUser's username
current_passwordstringUser's current password
new_passwordstringThe new password to be set on the user's account. Must be 8-64 characters and contain an uppercase character, a number, and a special character.

Api Keys

Create API Key

Create an API key for a user.

Request Method: POST URL Endpoint: /api/user/apikey

NameTypeDefaultDescriptionRequired
typestringapi(private) or public key*
namestringA name for the API key*
ipsarrayList of IPs to restrict
urlsarrayList of URLs to restrict

Get All API Keys

Retrieve all API keys for the gateway or partner account associated with the API Key or JWT token provided in the Authorization header.

Request Method: GET URL Endpoint: /api/user/apikeys

json
{
  "status": "success",
  "msg": "success",
  "total_count": 1,
  "data": [
    {
      "id": "cpfkb7rug2jghjrp79rg",
      "user_id": "testmerchant43",
      "type": "api",
      "name": "Private Key",
      "api_key": "api_2hQIG638fYIq0KiP96k3XDZXrLJ",
      "ips": [],
      "urls": [],
      "created_at": "2024-06-04T16:49:36Z",
      "updated_at": "2024-06-04T16:49:36Z"
    }
  ]
}

Delete API Key

Delete a specific API key.

Request Method: DELETE URL Endpoint: /api/user/apikey/{ api key }

json
{
  "status": "success",
  "msg": "success"
}