Skip to content

Session & Lock

Lock a user account.

POST /v1/auth/admin/lock

Auth: API key (VantagePayAdminClient).

Request body

FieldTypeRequiredDescription
usernamestringYesThe username of the account to lock (required).
lockedUntilstring?NoThe UTC date and time until which the account should remain locked. null means locked indefinitely.
reasonstring?NoThe reason for locking the account, stored for audit purposes.
json
{
  "username": "string",
  "lockedUntil": "string",
  "reason": "string"
}

Responses

StatusDescription
200The user was locked successfully.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
json
{
  "success": true
}

Code samples

WARNING

The JavaScript SDK does not cover admin APIs - use the .NET SDK.

csharp
await adminClient.Authentication.LockUserAsync("partner.user", DateTimeOffset.UtcNow.AddHours(1), reason: "Suspicious activity");

Unlock a user account.

POST /v1/auth/admin/unlock

Auth: API key (VantagePayAdminClient).

Request body

FieldTypeRequiredDescription
usernamestringYesThe username of the account to unlock (required).
json
{
  "username": "string"
}

Responses

StatusDescription
200The user was unlocked successfully.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
json
{
  "success": true
}

Code samples

WARNING

The JavaScript SDK does not cover admin APIs - use the .NET SDK.

csharp
await adminClient.Authentication.UnlockUserAsync("partner.user");

Logout a user account.

POST /v1/auth/admin/logout

Auth: API key (VantagePayAdminClient).

Request body

FieldTypeRequiredDescription
usernamestringYesThe username of the account to log out (required).
json
{
  "username": "string"
}

Responses

StatusDescription
200The user was logged out successfully.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
json
{
  "success": true
}

Code samples

WARNING

The JavaScript SDK does not cover admin APIs - use the .NET SDK.

csharp
await adminClient.Authentication.LogoutUserAsync("partner.user");

Administrator reset of a user's password.

POST /v1/auth/admin/password/reset

Sample

json
POST v1/user/password/reset
{
  "username": "{{$randomUserName}}",
  "password": "{{$randomPassword}}"
}

Auth: API key (VantagePayAdminClient).

Request body

FieldTypeRequiredDescription
usernamestringYesThe username (required).
passwordstringYesThe password (required).
isLockedOutbooleanNotrue if the user account is currently locked out.
reasonForLockoutstring?NoThe reason the user account was locked out, if applicable.
json
{
  "username": "string",
  "password": "string",
  "isLockedOut": true,
  "reasonForLockout": "string"
}

Responses

StatusDescription
200The request was successful and the password was reset.
400The request failed validation, the error object will contain further information.
401The authorization information provided is not valid, authentication is required to access this resource.
403The authorization header does not contain the correct type or you do not have access to this resource.
404The request was successful but does not return any results.
422The request payload is invalid, the error object will contain further information.
429Too many requests are being sent concurrently or rate limiting has taken effect.
500An unexpected error occurred, the error object will contain further information.

Response body

FieldTypeRequiredDescription
successbooleanNoGets a value indicating whether the operation was successful.
json
{
  "success": true
}

Code samples

WARNING

The JavaScript SDK does not cover admin APIs - use the .NET SDK.

csharp
var userReference = await adminClient.Authentication.ResetPasswordAsync("partner.user", "NewStrongPassword123!");

Payments for Africa