Introduction
API Endpoint https://api.revelon.net/
The Revelon API will provide access to our services and information to our sellers. If you would like to see a particular function added, please click the Contact menu item above. API calls are implemented as standard HTTP POST (application/json) calls to https://api.revelon.net
Api Key Setup
To use this API, you need an API key. The only setup needed is to go to the API Keys page and generate an API key. You will be given a Api key used to authenticate your API calls. Make sure you don't share your Api key with any 3rd parties! as this could lead to losss of funds
Authentication
url: 'https://api.revelon.net',
body: { apiKey: 'Your_Api_Key_Here'}
Authentication is a crucial step to access the Revelon API. Every API call must be authenticated using the user's API key. The API key serves as your unique identifier, and it's used to create an HMAC signature for each API call.
API Response
// Example Return
{
"status": "success",
"result": {
"account_name": "MyAccount",
"email": "example@example.com",
"accountstatus": "active",
"2fa": "on,
"joined_at": "2023-05-02 16:00:00",
}
}
The API will return an array with 2 elements: 'status' (which can either be success or error) and 'result' which will contain( 'txHash', 'invoice_id', 'address' or 'error') and so on depending on the function. The response will always have an 'status' field. If its value is 'success' (case-sensitive) the API call was a success, otherwise if the value is 'error' it will contain an error message. If there is data to return to you, it will be stored as an array in the other elements.
Sample Codes
Below are some example codes to help you easily interact with our API. Feel free to try them out!
Accepting Payments
There are two ways to accept payments using the Revelon API:
- create_invoice
- get_deposit_address
These methods allow you to seamlessly integrate payment acceptance into your application.
Create Invoice
The create_invoice
function enables you to generate an invoice for a specific amount and currency. It returns an invoice ID and an associated payment address.
Deposit Address
The get_deposit_address
function generates you a wallet address for you, any coins received by it are deposited into your Revelon Wallet and you will be notified of the payment.
The buyer can send any amount of coins as many times as they want; if you want to assign a client an address they can use to "top up" any time this is the choice for you.
Infomational Commands
Result example :
{
"status": "success",
"result": {
"account_name": "MyAccount",
"email": "example@example.com",
"accountstatus": "active",
"2fa": "on,
"joined_at": "2023-05-02 16:00:00",
}
}
Get Basic Account Info
http://api.revelon.net/get_account_info
This command allows you to retrieve basic account information.
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
apiKey | String | Your API key. |
Create Invoice
http://api.revelon.net/create_invoice
This command allows you to Create Invoice For Your Buyers, A Invoice ID is generated which which will expire after an hourr,
Payment Receive From The Invoice Will be Sent To Your Revelon Wallet And Your IPN URL will be used to inform Your Server Of The Payment
Result example :
{
status: 'success',
result: {
invoice_id: invoiceID,
}
QUERY PARAMETERS
Field | Type | Description | Required |
---|---|---|---|
apiKey | String | Your API key. | Yes |
businessName | String | Your Business Name | Yes |
redirectUrl | String | This Is the success page where users will be redirected to when they complete payment | Yes |
closeUrl | String | This Is the Error page where users will be redirected to when they cancel payment | Yes |
productName | String | The Name Of Your Product | Yes |
currency | String | This is Your Primary Currency Can Be Fiat Or Crypto | Yes |
payCoin | String | The Coin Which Users will pay with | No |
amount | String | AMOUNT in the specified currency | Yes |
buyersEmail | String | The email address of the buyer | Yes |
notificationURL | String | Your webhook URL to receive notifications when payment is completed by a user | Yes |
Note
Revelon's system expects to receive a status 200 response from your webhook. Please ensure your notification URL responds with a 200 status code.
Also, please note that there is a timeout of 8 seconds. If your webhook notification URL doesn't respond within 8 seconds, our system will fail to inform your notification URL of the payment.
Important: Ensure your webhook URL is responsive and returns a 200 status code within 8 second.
After Your Have Generated The Invoice Id You Can Load .
http://revelon.net/invoice?id={invoice id here}
Get Deposit Address
Result example :
{
"status": "success",
"result": {
"address": "generated_address", // Wallet Address To Make Deposit
}
}
This command allows you to generate crypto accounts for your users it generates a wallet address & payment_auth for the Coin Any Coin sent into the wallet generated for the user will be sent to your Revelon Wallet When The Check Deposit Function is Called.
http://api.revelon.net/get_deposit_address
QUERY PARAMETERS
Field | Type | Description | Required |
---|---|---|---|
apiKey | String | Your API key. | Yes |
coin | String | The coin for which to generate the address. | Yes |
Check Deposit
Success Result example :
{
"status": "success",
"result": {
"amount": "deposited_amount",
"txHash": "transaction_hash"
}
}
Error Result example :
{
"status": "error",
"error": "No Payment Recieved"
}
http://api.revelon.net/check_deposit
This command allows you to Check the deposit of the crypto accounts generated for your users After the deposit is Checked the amount will be sent to Your Revelon Wallet
QUERY PARAMETERS
Field | Type | Description | Required |
---|---|---|---|
apiKey | String | Your API key. | Yes |
coin | String | The coin for which to check the deposit. | Yes |
address | String | The payment address. | Yes |
Get Payment Info
Result example :
{
"status": "success",
"result": {
"coin": "TRX",
"pay_address": "The_Payment_Address",
"pay_amount: "1000",
"invoice_status": "PENDING can also be completed or expired",
"time_out": "0h 30m 54s"
}
}
http://api.revelon.net/get_paymemt_info
This command allows you to check the details of an invoice using the invoice Id
QUERY PARAMETERS
Field | Type | Description | Required |
---|---|---|---|
apiKey | String | Your API key. | Yes |
invoice_id | String | The unique identifier for the invoice. | Yes |
Get Coin Balance
Result example :
{
"status": "success",
"result": {
"balance": "100"
}
}
http://api.revelon.net/balance
This command allows you to retrieve the balance of a certain coin in Your Account
QUERY PARAMETERS
Field | Type | Description | Required |
---|---|---|---|
apiKey | String | Your API key. | Yes |
coin | String | coin to check Your balance | Yes |
Create Transfer
Result example :
{
"status": "success",
"result": {
"coin": "BTC",
"identifier": "email",
"txHash": "Transaction_Hash",
"amount": "100"
}
}
http://api.revelon.net/create_transfer
This command allows you to transfer any coin to a Revelon User Using His/Her Email Or Username
QUERY PARAMETERS
Field | Type | Description | Required |
---|---|---|---|
apiKey | String | Your API key. | Yes |
coin | String | The coin for the transfer. | Yes |
identifier | String | The identifier type ("email" or "username"). | Yes |
amount | String | The amount to send. | Yes |
To | String | The receiver's username or email based on the identifier. | Yes |
Create Withdrawal
http://api.revelon.net/create_withdrawal
This command allows you to transfer Crypto directly to an external wallet address
Result example :
{
"status": "success",
result: {
"txHash": "Transaction_Hash",
"amount": "100"
}
}
QUERY PARAMETERS
Field | Type | Description | Required |
---|---|---|---|
apiKey | String | Your API key. | Yes |
coin | String | The Coin To Transfer | Yes |
amount | String | The amount to send | Yes |
To | String | The Recievers Wallet Address | Yes |