SHKeeper API (2.1.47)

Download OpenAPI specification:Download

Introduction

SHKeeper - is an open-source, self-hosted cryptocurrency payment processor. It uniquely serves as both a gateway and a merchant, enabling you to accept payments in various cryptocurrencies without fees and intermediaries.

Authentication

You can authenticate either via Basic Auth or an API key depending from endpoint requirement. You can generate or view an API key in the SHKeeper UI under Wallets -> Manage -> API key, the API key is the same for each wallet. Basic HTTP credentials it's your SHKeeper UI user and password. For metrics endpoints using separate user and password specified in METRICS_USERNAME, METRICS_PASSWORD environment variables, with default values shkeeper,shkeeper. You can see the required authentication on the API docs at the top of each endpoint under AUTHORIZATIONS.

API_Key

SHKeeper supports user authentication and authorization through an API Key generated by the user. Send the API Key as a header value to Authorization with the format: X-Shkeeper-Api-Key {API Key}.

Security Scheme Type: API Key
Header parameter name: X-Shkeeper-Api-Key

Basic

SHKeeper supports authenticating and authorizing users through the Basic HTTP authentication scheme. Send the user and password encoded in base64 with the format Basic {base64(username:password)}. Using this authentication is required for payout-related endpoints, and for metrics, but another credentials. Metric credentials can be set by environment variables: METRICS_USERNAME, METRICS_PASSWORD. The default username:password is shkeeper:shkeeper.

Security Scheme Type: HTTP
HTTP Authorization Scheme: Basic

Available crypto

Crypto currency operations

Get cryptocurrencies

Get a list of cryptocurrencies available for operation from SHKeeper (these are the ones that are online and not disabled in the admin panel).

Responses

Response Schema: application/json
crypto
Array of strings (Crypto)

Array of available crypto(deprecated)

Array of objects (CryptoObj)

Array of available crypto

status
string

Status of obtaining available crypto currencies

Request samples

curl --location --request GET 'https://demo.shkeeper.io/api/v1/crypto'

Response samples

Content type
application/json
{
  • "crypto": [
    ],
  • "crypto_list": [
    ],
  • "status": "success"
}

Invoices

Invoices operations

Create/Update SHKeeper invoice

Authorizations:
API_Key
path Parameters
crypto_name
required
string
Enum: "BTC" "LTC" "DOGE" "XMR" … 16 more
Example: ETH-USDC

An identifier for cryptocurrency. Check Get cryptocurrencies to get all available list.

Request Body schema: application/json
required
external_id
required
string

A unique order_id or invoice_id from your store.

fiat
required
string
Value: "USD"

Currency code in ISO 4217 format for conversion. Currently, only USD is supported.

amount
required
string

The amount for which the invoice should be created in SHKeeper.

callback_url
required
string

The URL to which SHKeeper will send notifications in the event of transactions related to the created invoices.

Responses

Response Schema: application/json
amount
string

Amount in cryptocurrency with added SHKeeper fee

display_name
string

cryptocurrency display name

exchange_rate
string

cryptocurrency to fiat exchange rate for the moment of invoice generated

id
string

SHKeeper invoice id

recalculate_after
string

Time to hold exchange rate for the client, if 0 - no recalculate when recived payment

status
string

Creating SHKeeper invoice status

wallet
string

Generated address for chosen cryptocurrency assigned to SHKeeper invoice

Callbacks

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "amount": "7.8",
  • "display_name": "ERC20 USDT",
  • "exchange_rate": "1",
  • "id": 61,
  • "recalculate_after": 0,
  • "status": "success",
  • "wallet": "0x6f2Fc9D7205B7D9037dDE45B5f9e12B18EA07e27"
}

Callback payload samples

Callback
POST: Recieved payment transaction
Content type
application/json
{
  • "external_id": "107",
  • "crypto": "ETH-USDT",
  • "addr": "0x6f2Fc9D7205B7D9037dDE45B5f9e12B18EA07e27",
  • "fiat": "USD",
  • "balance_fiat": "7.8",
  • "balance_crypto": "7.8",
  • "paid": true,
  • "status": "PAID",
  • "transactions": [
    ],
  • "fee_percent": "2",
  • "fee_fixed": "0",
  • "fee_policy": "PERCENT_FEE",
  • "overpaid_fiat": "0.00"
}

Get SHKeeper invoice information

Get detailed information about status of created invoice in SHKeeper by external_id

Authorizations:
API_Key
path Parameters
external_id
required
string
Example: 233822

An identifier order_id or invoice_id from your store.

Responses

Response Schema: application/json
Array of objects (Invoice)

Array of found invoices

status
string

Status of request

Request samples

curl --location --request GET 'https://demo.shkeeper.io/api/v1/invoices/233822' \
--header 'X-Shkeeper-Api-Key: fs9GYTyNdkjPHX36'

Response samples

Content type
application/json
{
  • "invoices": [
    ],
  • "status": "success"
}

Payouts

Payouts operations

Create payout task

Authorizations:
Basic
path Parameters
crypto_name
required
string
Enum: "BTC" "LTC" "DOGE" "XMR" … 16 more
Example: ETH-USDC

An identifier for cryptocurrency. Check Get cryptocurrencies to get all available list.

Request Body schema: application/json
required
amount
required
string

Payout amount

destination
required
string

For XRP, the destination address must be provided in the X-address format. The X-address format replaces the use of a separate destination tag when sending funds to a multi-user wallet on the XRP ledger, such as those of exchanges and custodial services.

fee
required
string

Transaction fee. fee must always be specified, even for cryptocurrencies with automatically determined fees. For BTC, it is specified in sat/vByte; for LTC and DOGE, it is in sat/Byte. For XMR, an integer (1-4) is passed to set the transaction priority: 1 - Unimportant, 2 - Normal, 3 - Elevated, 4 - Priority. For other cryptocurrencies, any value can be passed, the optimal fee is calculated and set automatically, and this field is ignored.

Responses

Response Schema: application/json
task_id
string

Payout task ID

Request samples

Content type
application/json
{
  • "amount": 107,
  • "destination": "0xBD26e3512ce84F315e90E3FE75907bfbB5bD0c44",
  • "fee": "10"
}

Response samples

Content type
application/json
{
  • "task_id": "b2a01bb0-8abe-403b-a3fa-8124c84bcf23"
}

Create multipayout task

Multipayout is not supported for the following cryptocurrencies: XMR, BTC, LTC, and DOGE. For these, you need to use the Payout method.

Authorizations:
Basic
path Parameters
crypto_name
required
string
Enum: "BTC" "LTC" "DOGE" "XMR" … 16 more
Example: ETH-USDC

An identifier for cryptocurrency. Check Get cryptocurrencies to get all available list.

Request Body schema: application/json
required
Array
amount
required
string

Payout amount

dest
required
string

Payout destination

dest_tag
string

Useful for XRP payout, for providing dest in a plain format, otherwise you should convert it to X-address format manually

Responses

Response Schema: application/json
task_id
string

Multipayout task ID

Request samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "task_id": "b2a01bb0-8abe-403b-a3fa-8124c84bcf23"
}

Get task status

Get status of payout task

Authorizations:
Basic
path Parameters
crypto_name
required
string
Enum: "BTC" "LTC" "DOGE" "XMR" … 16 more
Example: ETH-USDC

An identifier for cryptocurrency. Check Get cryptocurrencies to get all available list.

task_id
required
string <uuid>
Example: 7028c45b-0c88-483e-b703-dd455a361b2e

Payout task ID

Responses

Response Schema: application/json
Array of objects (PayoutResultObj)

Payout amount

status
string
Enum: "PENDING" "FAILURE" "SUCCESS"

Task status

Request samples

curl --location --request GET 'https://demo.shkeeper.io/api/v1/ETH-USDT/task/8c618c4a-39fc-4c7a-b4f8-1661ea47fec6' \
--user admin:admin

Response samples

Content type
application/json
{
  • "result": [
    ],
  • "status": "SUCCESS"
}

Wallet encription

Wallet operations

Decrypt Wallets

Authorizations:
API_Key
Request Body schema: application/x-www-form-urlencoded
required
key
required
string

Decryption key that was set on the first run of SHKeeper on demand

Responses

Response Schema: application/json
status
string

Decrypt wallets status

Request samples

Content type
application/x-www-form-urlencoded
key=sikfl5llLFt5is50dsfk4yvldti0034jfmmeJm

Response samples

Content type
application/json
Example
{
  • "status": "success"
}

Useful endpoints

Other operations

Get SHKeeper generated addresses

Get all generated cryptocurrency addresses for specified cryptocurrency

Authorizations:
API_Key
path Parameters
crypto_name
required
string
Enum: "BTC" "LTC" "DOGE" "XMR" … 16 more
Example: ETH-USDC

An identifier for cryptocurrency. Check Get cryptocurrencies to get all available list.

Responses

Response Schema: application/json
addresses
Array of strings

Array of cryptocurrency addresses

status
string

Status of request

Request samples

curl --location --request GET 'https://demo.shkeeper.io/api/v1/ETH-USDC/addresses' \
--header 'X-Shkeeper-Api-Key: fs9GYTyNdkjPHX36'

Response samples

Content type
application/json
{
  • "addresses": [
    ],
  • "status": "success"
}

Get transaction for SHKeeper generated cryptocurrency address

Get all transactions related to specified cryptocurrency address

Authorizations:
API_Key
path Parameters
crypto_name
required
string
Enum: "BTC" "LTC" "DOGE" "XMR" … 16 more
Example: ETH-USDC

An identifier for cryptocurrency. Check Get cryptocurrencies to get all available list.

addr
required
string
Example: 0xE77895BAda700d663f033510f73f1E988CF55756

Cryptocurrency address

Responses

Response Schema: application/json
Array of objects (Transaction)

Array of found transactions

status
string

Status of request

Request samples

curl --location --request GET 'https://demo.shkeeper.io/api/v1/ETH-USDC/addresses' \
--header 'X-Shkeeper-Api-Key: fs9GYTyNdkjPHX36'

Response samples

Content type
application/json
{
  • "transactions": [
    ],
  • "status": "success"
}

Get payment info

Get payment info by transaction and external ID

Authorizations:
API_Key
path Parameters
txid
required
string
Example: 0xdaae319a0bee00f362f40ae725932c25a9b33bd33f3346ec22464361a56fcd1d

Cryptocurrency payment transaction ID

external_id
required
string
Example: 233822

An identifier order_id or invoice_id from your store.

Responses

Response Schema: application/json
object

Transaction information

status
string

Status of request

Request samples

curl --location --request GET 'https://demo.shkeeper.io/api/v1/tx-info/0xdaae319a0bee00f362f40ae725932c25a9b33bd33f3346ec22464361a56fcd1d/233822' \
--header 'X-Shkeeper-Api-Key: fs9GYTyNdkjPHX36'

Response samples

Content type
application/json
{
  • "info": {
    },
  • "status": "success"
}

Metrics

Metrics operations

Get metrics

Get SHKeeper metrics for wallets status

Authorizations:
Basic

Responses

Response Schema: text/plain
string

Request samples

curl --location --request GET 'https://demo.shkeeper.io/metrics' \
--user shkeeper:shkeeper

Response samples

Content type
text/plain
# HELP geth_last_release_info Version of the latest release from https://github.com/bnb-chain/bsc/releases
# TYPE geth_last_release_info gauge
geth_last_release_info{name="v1.4.12",published_at="2024-07-24T04:18:53Z",tag_name="v1.4.12",version="1.4.12"} 1.0
# HELP geth_fullnode_version_info Current geth version in use
# TYPE geth_fullnode_version_info gauge
geth_fullnode_version_info{version="1.4.11"} 1.0
# HELP bnb_fullnode_status Connection status to bnb fullnode
# TYPE bnb_fullnode_status gauge
bnb_fullnode_status 1.0
# HELP bnb_fullnode_last_block Last block loaded to the fullnode
# TYPE bnb_fullnode_last_block gauge
bnb_fullnode_last_block 4.2715492e+07
# HELP bnb_wallet_last_block Last checked block
# TYPE bnb_wallet_last_block gauge
bnb_wallet_last_block 4.271549e+07
# HELP bnb_fullnode_last_block_timestamp Last block timestamp loaded to the fullnode
# TYPE bnb_fullnode_last_block_timestamp gauge
bnb_fullnode_last_block_timestamp 1.722866516e+09
# HELP bnb_wallet_last_block_timestamp Last checked block timestamp
# TYPE bnb_wallet_last_block_timestamp gauge
bnb_wallet_last_block_timestamp 1.72286651e+09
# HELP bnb_shkeeper_status Connection status to bnb_shkeeper
# TYPE bnb_shkeeper_status gauge
bnb_shkeeper_status 1.0
# HELP geth_last_release_info Version of the latest release from https://github.com/ethereum/go-ethereum/releases
# TYPE geth_last_release_info gauge
geth_last_release_info{name="Bothros (v1.14.5)",published_at="2024-06-06T13:41:53Z",tag_name="v1.14.5",version="1.14.5"}
1.0
# HELP prysm_last_release_info Version of the latest release from https://github.com/prysmaticlabs/prysm/releases
# TYPE prysm_last_release_info gauge
prysm_last_release_info{name="v5.0.4",published_at="2024-06-21T16:13:40Z",tag_name="v5.0.4",version="5.0.4"} 1.0
# HELP geth_fullnode_version_info Current geth version in use
# TYPE geth_fullnode_version_info gauge
geth_fullnode_version_info{version="1.14.6"} 1.0
# HELP prysm_fullnode_version_info Current prysm version in use
# TYPE prysm_fullnode_version_info gauge
prysm_fullnode_version_info 1.0
# HELP ethereum_fullnode_status Connection status to ethereum fullnode
# TYPE ethereum_fullnode_status gauge
ethereum_fullnode_status 1.0
# HELP ethereum_fullnode_last_block Last block loaded to the fullnode
# TYPE ethereum_fullnode_last_block gauge
ethereum_fullnode_last_block 6.442062e+06
# HELP ethereum_wallet_last_block Last checked block
# TYPE ethereum_wallet_last_block gauge
ethereum_wallet_last_block 6.44206e+06
# HELP ethereum_fullnode_last_block_timestamp Last block timestamp loaded to the fullnode
# TYPE ethereum_fullnode_last_block_timestamp gauge
ethereum_fullnode_last_block_timestamp 1.722866508e+09
# HELP ethereum_wallet_last_block_timestamp Last checked block timestamp
# TYPE ethereum_wallet_last_block_timestamp gauge
ethereum_wallet_last_block_timestamp 1.722866484e+09
# HELP ethereum_shkeeper_status Connection status to ethereum_shkeeper
# TYPE ethereum_shkeeper_status gauge
ethereum_shkeeper_status 1.0
# HELP xrp_shkeeper_status Connection status to xrp_shkeeper
# TYPE xrp_shkeeper_status gauge
xrp_shkeeper_status 0.0