Get started
API Endpoint https://api2.bitmessa.com/
The Bitmessa API provides programmatic and procedural access to convert BTC and USDT into Naira.
To use this API, you need an API key. Please contact us at [email protected] to get your own API key.
STEP 1: Get Rates
# Here is a curl example
curl \
-X GET https://api2.bitmessa.com/get/rate \
-F 'secretkey=your_api_key'
To get rates you need to make a GET call to the following url :
https://api2.bitmessa.com/get/rate
Result example :
{
"success": true,
"message": "rate fetched",
"code": null,
"result": {
"bitmessa": 1323,
"usdt": 0.998294,
"message": "Max deposit: $19,999. For higher amounts, DM on WhatsApp. Thank you.",
"bot": true,
"site": true,
"ngn": 36576320,
"usd": 40417
},
"result_info": {},
"errors": {}
}
QUERY PARAMETERS
Field | Type | Values |
---|---|---|
secretkey | String | Your API key. |
STEP 2: Request Payment ID
curl \
-X POST https://api2.bitmessa.com/payment \
-F 'secretkey=your_api_key' \
-F 'coin=TRON-USDT'
To get payment ID and crypto address, you need to make a POST call to the following url :
https://api2.bitmessa.com/payment
Result example :
{
"success": true,
"message": "found payment",
"code": 200,
"result": {
"payment": {
"_id": "65a98b4082fafe4091fa9684",
"address": "TFxjVC8X4FFXyM94BxMgf2x8odySZXxKAp",
"user_id": "63afe34d5d9508186fa03e3b",
"gateway": "BITMESSA",
"phone_number": 0000000000000,
"coin": "TRON-USDT",
"coin_amount": 0,
"ngn_rate": 0,
"coin_usdt_rate": 0,
"ngn_amount": 0,
"usd_amount": 0,
"txid": "",
"bank_txid": "",
"block": 0,
"close": false,
"ready": false,
"funded": false,
"imported": true,
"processed": false,
"memepool": false,
"error": false,
"date": 1705610048358,
"confirmation_date": 0,
"index": 1561,
"__v": 0
},
"account": {}
},
"result_info": {}
}
QUERY PARAMETERS
Field | Type | Values |
---|---|---|
secretkey | String | Your API key. |
coin | String | TRON-USDT or BTC |
STEP 3: Request Payment Data
curl \
-X GET https://api2.bitmessa.com/payment/${response.result.payment._id} \
-F 'secretkey=your_api_key'
To get payment data, you need to make a GET call to the following url. Replace ${response.result.payment._id} with the payment _id obtained from Step 2:
https://api2.bitmessa.com/payment/${response.result.payment._id}
Result example :
{
"success": true,
"message": "found payment",
"code": 200,
"result": {
"payment": {
"_id": "65a98b4082fafe4091fa9684",
"address": "TFxjVC8X4FFXyM94BxMgf2x8odySZXxKAp",
"user_id": "63afe34d5d9508186fa03e3b",
"gateway": "BITMESSA",
"phone_number": 0000000000000,
"coin": "TRON-USDT",
"coin_amount": 9,
"ngn_rate": 0,
"coin_usdt_rate": 0,
"ngn_amount": 0,
"usd_amount": 0,
"txid": "5a7fc948f80117896a4a2a2ea915c6466c7ccbf4b55cc1a7ddd9abc491d5eb4a",
"bank_txid": "",
"block": 1705610337000,
"close": false,
"ready": false,
"funded": false,
"imported": true,
"processed": false,
"memepool": true,
"error": false,
"date": 1705610048358,
"confirmation_date": 0,
"index": 1561,
"__v": 0,
"confirmations": 2
},
"account": {}
},
"result_info": {}
}
QUERY PARAMETERS
Field | Type | Values |
---|---|---|
secretkey | String | Your API key. |
STEP 4: Request Accounts
curl \
-X GET https://api2.bitmessa.com/accounts \
-F 'secretkey=your_api_key'
To get a list of user bank accounts, you need to make a GET call to the following url.
https://api2.bitmessa.com/accounts
Result example :
{
"success": true,
"message": "Got all Accounts",
"code": 200,
"result": {
"result": [
{
"_id": "65a99a7483d08157c391719a",
"id": "784d4846-5e28-4eff-9f1b-8a10b2d82dc1",
"name": "Joe Doe",
"currency": "NGN",
"accountName": " Joe Doe",
"accountNumber": "0000000000",
"bankCode": "000004",
"bankName": "UNITED BANK FOR AFRICA",
"freeze": false,
"date": 1705613940141,
"__v": 0
}
]
},
"result_info": {
"info": {
"total_count": 1,
"total": 1,
"pages": 1,
"current": 1,
"accounts": 1
}
}
}
QUERY PARAMETERS
Field | Type | Values |
---|---|---|
secretkey | String | Your API key. |
STEP 5: Request Bank List
curl \
-X GET https://api2.bitmessa.com/banks/get \
-F 'secretkey=your_api_key'
To get bank list, you need to make a GET call to the following url.
https://api2.bitmessa.com/banks/get
Result example :
{
"success": true,
"message": "Banks list",
"code": 200,
"result": {
"banks": [
{
"code": "110072",
"name": "78 FINANCE COMPANY LIMITED"
},
{
"code": "120001",
"name": "9 PAYMENT SOLUTIONS BANK"
},
{
"code": "090629",
"name": "9JAPAY MICROFINANCE BANK"
},
...
]
},
"result_info": {}
}
QUERY PARAMETERS
Field | Type | Values |
---|---|---|
secretkey | String | Your API key. |
STEP 6: Resolve Bank Account
curl \
-X POST https://api2.bitmessa.com/account-resolve \
-F 'secretkey=your_api_key' \
-F 'account_number=0123456789' \
-F 'bank_code=000004'
To resolve user bank account, you need to make a POST call to the following url.
https://api2.bitmessa.com/account-resolve
Result example :
{
"success": true,
"message": "Banks list",
"code": 200,
"result": {
"response": {
"status": true,
"message": "",
"data": {
"accountName": "Joe Doe",
"accountNumber": "0000000000",
"bank": {
"code": "000004",
"name": "UNITED BANK FOR AFRICA"
}
}
}
},
"result_info": {}
}
QUERY PARAMETERS
Field | Type | Values |
---|---|---|
secretkey | String | Your API key. |
acount_number | String | User account number |
bank_code | String | User bank code |
STEP 7: Assign Bank Account
curl \
-X POST https://api2.bitmessa.com/account/assign/${response.result.payment._id} \
-F 'secretkey=your_api_key' \
-F 'account_number=0123456789' \
-F 'bank_code=000004'
To get assign user bank account, you need to make a POST call to the following url. Replace ${response.result.payment._id} with the payment _id obtained from Step 2:
https://api2.bitmessa.com/account/assign/${response.result.payment._id}
Result example :
{
"success": true,
"message": "asssigned bank account",
"code": 200,
"result": {
"payment": {
"_id": "65a98b4082fafe4091fa9684",
"address": "TFxjVC8X4FFXyM94BxMgf2x8odySZXxKAp",
"user_id": "63afe34d5d9508186fa03e3b",
"gateway": "BITMESSA",
"phone_number": 0000000000000,
"coin": "TRON-USDT",
"coin_amount": 9,
"ngn_rate": 0,
"coin_usdt_rate": 0,
"ngn_amount": 0,
"usd_amount": 0,
"txid": "5a7fc948f80117896a4a2a2ea915c6466c7ccbf4b55cc1a7ddd9abc491d5eb4a",
"bank_txid": "",
"block": 1705610337000,
"close": false,
"ready": true,
"funded": false,
"imported": true,
"processed": false,
"memepool": true,
"error": false,
"date": 1705610048358,
"confirmation_date": 0,
"index": 1561,
"__v": 0,
"confirmations": 2,
"bank_name": "Joe Doe",
"bank_number": "16792453844460000000000",
"account": {
"_id": "64174048c3883f93745ee50b",
"id": "16792453844460000000000",
"user_id": "63afe34d5d9508186fa03e3b",
"name": "Joe Doe",
"currency": "NGN",
"accountName": "Joe Doe",
"accountNumber": "0000000000",
"bankCode": "000004",
"bankName": "UNITED BANK FOR AFRICA",
"freeze": false,
"date": 1679245384446,
"__v": 0
}
}
},
"result_info": {}
}
QUERY PARAMETERS
Field | Type | Values |
---|---|---|
secretkey | String | Your API key. |
acount_number | String | User account number |
bank_code | String | User bank code |
STEP 8: Request Final Payment Data
curl \
-X GET https://api2.bitmessa.com/payment/${response.result.payment._id} \
-F 'secretkey=your_api_key'
To get payment data, you need to make a GET call to the following url. Replace ${response.result.payment._id} with the payment _id obtained from Step 2:
https://api2.bitmessa.com/payment/${response.result.payment._id}
Result example :
{
"success": true,
"message": "found payment",
"code": 200,
"result": {
"payment": {
"_id": "65a98b4082fafe4091fa9684",
"address": "TFxjVC8X4FFXyM94BxMgf2x8odySZXxKAp",
"user_id": "63afe34d5d9508186fa03e3b",
"gateway": "BITMESSA",
"phone_number": 0000000000,
"coin": "TRON-USDT",
"coin_amount": 9,
"ngn_rate": 0,
"coin_usdt_rate": 0,
"ngn_amount": 0,
"usd_amount": 0,
"txid": "5a7fc948f80117896a4a2a2ea915c6466c7ccbf4b55cc1a7ddd9abc491d5eb4a",
"bank_txid": "",
"block": 1705610337000,
"close": false,
"ready": true,
"funded": false,
"imported": true,
"processed": false,
"memepool": true,
"error": false,
"date": 1705610048358,
"confirmation_date": 0,
"index": 1561,
"__v": 0,
"confirmations": 2,
"account": {
"_id": "64174048c3883f93745ee50b",
"id": "16792453844460000000000",
"user_id": "63afe34d5d9508186fa03e3b",
"name": "Joe Doe",
"currency": "NGN",
"accountName": "Joe Doe",
"accountNumber": "0000000000",
"bankCode": "000004",
"bankName": "UNITED BANK FOR AFRICA",
"freeze": false,
"date": 1679245384446,
"__v": 0
},
"bank_name": "Joe Doe",
"bank_number": "16792453844460000000000"
},
"account": {
"_id": "64174048c3883f93745ee50b",
"id": "16792453844460000000000",
"user_id": "63afe34d5d9508186fa03e3b",
"name": "Joe Doe",
"currency": "NGN",
"accountName": "Joe Doe",
"accountNumber": "0000000000",
"bankCode": "000004",
"bankName": "UNITED BANK FOR AFRICA",
"freeze": false,
"date": 1679245384446,
"__v": 0
}
},
"result_info": {}
}
QUERY PARAMETERS
Field | Type | Values |
---|---|---|
secretkey | String | Your API key. |
STEP 9: Finalize Payment
curl \
-X GET https://api2.bitmessa.com/payment/finalize/${response.result.payment._id} \
-F 'secretkey=your_api_key' \
-F 'account_number=0123456789' \
-F 'bank_code=000004'
To finalize the payment, you need to make a POST call to the following url. Replace ${response.result.payment._id} with the payment _id obtained from Step 2:
https://api2.bitmessa.com/payment/finalize/${response.result.payment._id}
Result example :
{
"success": true,
"message": "fixed rate for Payment",
"code": 200,
"result": {
"payment": {
"_id": "65a98b4082fafe4091fa9684",
"address": "TFxjVC8X4FFXyM94BxMgf2x8odySZXxKAp",
"user_id": "63afe34d5d9508186fa03e3b",
"gateway": "BITMESSA",
"phone_number": 0000000000,
"coin": "TRON-USDT",
"coin_amount": 9,
"ngn_rate": 1323,
"coin_usdt_rate": 0.998579,
"ngn_amount": 11891,
"usd_amount": 9,
"txid": "5a7fc948f80117896a4a2a2ea915c6466c7ccbf4b55cc1a7ddd9abc491d5eb4a",
"bank_txid": "",
"block": 1705610337000,
"close": true,
"ready": true,
"funded": false,
"imported": true,
"processed": false,
"memepool": true,
"error": false,
"date": 1705610048358,
"confirmation_date": 0,
"index": 1561,
"__v": 0,
"confirmations": 2,
"account": {
"_id": "64174048c3883f93745ee50b",
"id": "16792453844460000000000",
"user_id": "63afe34d5d9508186fa03e3b",
"name": "Joe Doe",
"currency": "NGN",
"accountName": "Joe Doe",
"accountNumber": "0000000000",
"bankCode": "000004",
"bankName": "UNITED BANK FOR AFRICA",
"freeze": false,
"date": 1679245384446,
"__v": 0
},
"bank_name": "Joe Doe",
"bank_number": "16792453844460000000000"
},
"account": {
"_id": "64174048c3883f93745ee50b",
"id": "16792453844460000000000",
"user_id": "63afe34d5d9508186fa03e3b",
"name": "Joe Doe",
"currency": "NGN",
"accountName": "Joe Doe",
"accountNumber": "0000000000",
"bankCode": "000004",
"bankName": "UNITED BANK FOR AFRICA",
"freeze": false,
"date": 1679245384446,
"__v": 0
}
},
"result_info": {}
}
QUERY PARAMETERS
Field | Type | Values |
---|---|---|
secretkey | String | Your API key. |
acount_number | String | User account number |
bank_code | String | User bank code |