Appearance
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
| Name | Type | Default | Description | Required |
|---|---|---|---|---|
| username | string | unique username (must contain alpha and numeric characters) | ||
| name | string | first and last name | ||
| phone | string | phone number, digits only | ||
| string | email address (must be valid email format) | |||
| timezone | string | timezone (ex. ETC/UTC) | ||
| password | string | password | ||
| status | string | status (active or disabled) | ||
| role | string | defined 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 }
| Name | Type | Default | Description | Required |
|---|---|---|---|---|
| name | string | first and last name | ||
| phone | string | phone number, digits only | ||
| string | email address (must be valid email format) | |||
| timezone | string | timezone (ex. ETC/UTC) | ||
| status | string | status (active or disabled) | ||
| role | string | defined role (admin or standard) | ||
| permissions | object | (account defaults) | users permissions | |
| permissions.manage_users | boolean | false | ||
| permissions.manage_api_keys | boolean | false | ||
| permissions.manage_terminals | boolean | false | ||
| permissions.manage_rule_engine | boolean | false | ||
| permissions.view_settlement_batches | boolean | false | ||
| permissions.view_billing_reports | boolean | false | ||
| permissions.process_authorization | boolean | false | ||
| permissions.process_capture | boolean | false | ||
| permissions.process_sale | boolean | false | ||
| permissions.process_void | boolean | false | ||
| permissions.process_credit | boolean | false | ||
| permissions.process_refund | boolean | false | ||
| permissions.process_verification | boolean | false | ||
| permissions.allow_dashboard_stats | boolean | false | ||
| permissions.vault_create | boolean | false | ||
| permissions.vault_update | boolean | false | ||
| permissions.vault_delete | boolean | false | ||
| permissions.access_file_batch | boolean | false | ||
| permissions.view_others_transactions | boolean | false | ||
| permissions.manage_card_bans | boolean | false | ||
| permissions.restrict_viewing_others_invoices | boolean | false | ||
| permissions.recurring_status_change | boolean | false | ||
| notifications.merchant | object | (account defaults) | notification values | |
| notifications.merchant.transaction_receipts | boolean | false | ||
| notifications.merchant.settlement_reports | boolean | false | ||
| notifications.merchant.triggered_rules | boolean | false | ||
| notifications.merchant.security_alerts | boolean | false | ||
| notifications.merchant.invoice_create | boolean | false | ||
| notifications.merchant.transaction_void | boolean | false | ||
| defaults | object | default settings | ||
| defaults.processor_id | string | default processor | ||
| defaults.terminal_id | string | default terminal_id | ||
| defaults.transaction_csv_format_id | string | default transaction csv export format | ||
| defaults.transaction_report_format_id | string | default transaction report format | ||
| defaults.vault_table_format_id | string | default vault report format | ||
| defaults.show_transaction_totals | boolean | reports 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
| Name | Type | Default | Description | Required |
|---|---|---|---|---|
| username | string | User's username | ||
| current_password | string | User's current password | ||
| new_password | string | The 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:
POSTURL Endpoint:/api/user/apikey
| Name | Type | Default | Description | Required |
|---|---|---|---|---|
| type | string | api(private) or public key | * | |
| name | string | A name for the API key | * | |
| ips | array | List of IPs to restrict | ||
| urls | array | List 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:
GETURL 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:
DELETEURL Endpoint:/api/user/apikey/{ api key }
json
{
"status": "success",
"msg": "success"
}