Getting Started
Nexpay API provides RESTful API to access and manage your accounts
RESTful API
Basic information
Service endpoints
Production environment:
Endpoint |
Description |
https://api.globitex.com | Service endpoint for RESTful API calls |
Error messages
In case of error in client request processing, HTTP error code is returned. Additionally, JSON object containing error description can be returned.
Possible values for HTTP error codes:
HTTP status code | HTTP status code name | When returned |
400 | Bad Request | Client request data has errors |
403 | Forbidden | Missing required fields for signature check or problems with message signature |
404 | Not Found | Request is sent to invalid path |
500 | Internal Server Error | Unexpected server error occurred when processing client request |
Data structure for error description in JSON format:
Field | Required | Type | Description |
errors | Yes | array of object | Error message |
Data structure for errors object
Field | Required | Type | Description |
code | Yes | integer | Error code |
message | Yes | string | Error message |
data | No | string | Additional data about error |
Example responses:
Error codes
API method calls can return the following common errors with HTTP error codes:
HTTP error code | JSON Code | Message | Description |
403 | 10 | Missing API key | API key not exists in HTTP request header |
403 | 20 | Missing nonce | Nonce not exists in HTTP request header |
403 | 30 | Missing signature | Signature not exists in HTTP request header |
403 | 40 | Invalid API key | API key not found or have invalid format. |
403 | 50 | Nonce is not monotonous | Received nonce is smaller than in previous requests |
403 | 60 | Nonce is not valid | Too big number or not a number |
403 | 70 | Wrong signature | Specified signature is not correct |
403 | 80 | No permissions | API key has no permissions to call this method |
403 | 90 | API key is not enabled | Client have not enabled API key |
403 | 100 | API key locked | API key is locked due to client action or Nexpay decision |
403 | 110 | Invalid client state | Client account is closed or is not approved |
403 | 120 | Invalid API key state | API key is deleted |
400 | 200 | Mandatory parameter missing | At least one of the method mandatory parameters are missing |
API sample
API samples can be found here: https://github.com/globitex/api-samples
Authentication
RESTful API requires HMAC-SHA512 signatures for each request.
To use this API endpoint you should get your API key and Secret key from the web application Settings page.
Each request should include the following parameters in HTTP header:
Signature generation pseudo-code:
Javascript code (example):
Nexpay methods
RESTful API provides access to Nexpay data with the following methods:
- transfer funds to beneficiary account - /api/1/eurowallet/payments
- return account status information - /api/1/eurowallet/status
- return deposit information - /api/1/eurowallet/deposit-details
- return payment history - /api/1/eurowallet/payments/history
- return payment status - /api/1/eurowallet/payments/status
- get transfer commission amount - /api/1/eurowallet/payments/commission
Create new payment
Transfers funds to beneficiary account; returns a transaction ID or an error.
Request: POST /api/1/eurowallet/payments
Parameters:
The following fields are returned:
Error codes:
Code | Message |
30000 | Request error |
20000 | Invalid request time |
20010 | Beneficiary name too long |
20020 | Beneficiary name too short |
20030 | Reference information for beneficiary too long |
20040 | Invalid transaction signature |
-32600 | Bad request |
Suggested work-flow:
Example request:
Example response:
Signature generation pseudo-code:
Get Account Status
Returns default (single) or all account status information.
Request: GET /api/1/eurowallet/status
Parameters:
The following fields are returned:
Error codes:
Code | Message |
30000 | Request error |
-32600 | Bad request |
Example request:
Example response:
Get Deposit Details
Returns deposit information, such client full name with bank requisites.
Request: GET /api/1/eurowallet/deposit-details
Parameters: no parameters
The following fields are returned:
Error codes:
Code | Message |
30000 | Request error |
-32600 | Bad request |
Example request:
Example response:
Get Payment History
Returns payment history for provided account.
Request: GET /api/1/eurowallet/payments/history
Parameters:
The following fields are returned:
Payment entry structure:
Error codes:
Code | Message |
30000 | Request error |
30010 | Invalid request parameters |
-32600 | Bad request |
Example request:
Example response:
Get Payment Status
Returns payment status information.
Request: GET /api/1/eurowallet/payments/status
Parameters:
The following fields are returned:
Error codes:
Code | Message |
30000 | Request error |
20000 | paymentId or externalPaymentId parameters was not provided |
20010 | Both paymentId and externalPaymentId parameters was provided |
-32600 | Bad request |
Example request:
Example response:
Get Payment Commission Amount
Returns Payment Commission Amount
Request: GET /api/1/eurowallet/payments/commission
Parameters:
The following fields are returned:
Error codes:
Code | Message |
30000 | Request error |
-32600 | Bad request |
Example request:
Example response: