API DOCUMENTATION

Overview

Funexpay API offers a range of tools for merchants to manage cryptocurrency payments and transactions. This API enables you to access your Funexpay account, manage your wallet, process payments, and handle conversions efficiently. All API interactions are executed through HTTP POST requests.


Base URL

All API requests should be sent to: https://funexpay.com/api/v1

Setup and Authentication

API Setup

To use the Funexpay API, you need to generate an API key. This is done through your Funexpay dashboard:

1. Navigate to the API Keys page.

2. Generate a new API key, which will provide you with both a Public Key and a Private Key.

3. Ensure that you do not share your Private Key with any third parties.

4. Click 'Edit Permissions' in the dashboard to enable specific API commands.

Authentication

Funexpay uses a SHA-512 HMAC signature for secure API authentication. This signature is generated using your Private Key and the raw POST data. The server will compare this HMAC signature with the one it generates, and if they don't match, the API request is rejected.

Authentication Headers

Header Name Description
HMAC SHA-512 HMAC signature of the POST data.
timestamp Current timestamp (Unix format)

HMAC Example

If your API Secret Key is "test" and your Public Key is "your_api_public_key", a get_basic_info request would look like this:

POST Data:

key=your_api_public_key&timestamp=current_timestamp

Generated HMAC:

f3b251f309ebb45087bde45187e71f56e995b9d6301d7c01dd7e1f269591249a5cc92c6933b2baf89aa7a576fd99f99a792824775377d2bbaf5932748b00d283

General API Information

Response Format

API responses are in JSON format and will always include a status field:

  • status: "true" if the call was successful, "false" if not.
  • msg: A message describing the result of the API call.
  • info: An optional array containing additional data if applicable.

Main API Fields

These fields are required for every API request:

Field Description Required?
key Your API Public Key Yes
timestamp Current timestamp (Unix format) Yes

API Endpoints

1. Get Basic Account Information

Retrieve general account information.

Method Name: v1/get_basic_info

POST Fields:

  • key: Your API Public Key (Yes)
  • timestamp: Current timestamp (Yes)

Response

              

{ "status": true, "msg": "OK", "info": { "username": "test", "emailId": "[email protected]", "merchantId": "12345678", "gender": "male", "currency": "USD", "timezone": "UTC" } }

2. Check Coin Balances

Retrieve the current cryptocurrency balances.

Method Name: v1/balances

POST Fields:

  • key: Your API Public Key (Yes)
  • timestamp: Current timestamp (Yes)

Response:

          

{ "status": true, "msg": "OK", "info": { "FUNEX": "150.00000000", "BTC": "0.09999997", "ETH": "99.00200436", "BNB": "0.00000000", "LTC": "100.00000000", "USDT": "150.00000000", "TRX": "100.00000000", "DASH": "0.00000000", "DOGE": "0.00000000", "USDC": "0.00000000", "TUSD": "0.00000000", "JST": "0.00000000", "SHIB": "0.00000000", "UNI": "0.00000000", "MANA": "0.00000000", "AAVE": "0.00000000", "BAT": "0.00000000", "BUSD": "0.00000000" } }

3. Create a Payment

Create a new fixed-price payment transaction.

Method Name: v1/create_transaction

POST Fields: (in addition to the Main Fields described in the Overview)

Field Description Required?
amount Payment amount in the specified currency. Yes
currency Currency for the payment (e.g., USD, EUR). Yes
order_id Unique order identifier. Yes
buyer_name (Optional) Buyer's name for your reference. No
buyer_email Buyer's email to send notifications (no spam or mailing list). Yes
ipn_url (Optional) URL for IPN callbacks. No
transaction_success_url (Optional) URL to redirect upon successful payment. No
transaction_cancel_url (Optional) URL to redirect to if the payment is cancelled. No

Response:

        

{ "status": true, "msg": "OK", "info": { "uuid": "894b637e-2b2e-4f6c-b005-88064d126a19", "order_id": "123456", "amount": "299.00", "payment_amount_usd": "299.00", "currency": "USD", "checkout_url": "https://funexpay.com/pay/894b637e-2b2e-4f6c-b005-88064d126a19", "created_at": 1730877181, "expired_at": 1730880781 } }

4. Get Payment Information

Retrieve details of a specific payment.

Method Name: v1/get_tx_info

POST Fields: (in addition to the Main Fields described in the Overview)

Field Description Required?
uuid The payment ID to query. Yes
order_id The unique order ID associated with payment. Yes

Response:

        

{ "status": true, "msg": "OK", "info": { "status": "Confirmed", // Waiting for Payment, Waiting for Confirmation, Confirmed, Partially Paid, Cancelled "uuid": "e380c526-11bf-48bf-a51e-5e08dff3df59", "order_id": "123456", "amount": "299.00", "payment_amount": "299.00", "payment_amount_usd": "299.00", "merchant_amount": "293.02000000", "commission": "5.98000000", "network": "TRC20", "currency": "USD", "payer_currency": "USDT", "payer_amount": "299.00000000", "payer_amount_exchange_rate": "1.000000", "checkout_url": "https://funexpay.com/pay/e380c526-11bf-48bf-a51e-5e08dff3df59", "created_at": 1730970763, "expired_at": 1730974363, "tx_info": [ { "status": "Confirmed", // Pending, Confirmed, Cancelled "txid": "a48cc528a6c9da6ead0cf6ec02feadfb2c7fcd21afd271676165fb4b9b752ad8", "from": "THESRF9s9o5PY4wPijP7BfP8K7xi5LfFu1", "to": "TYK6YYUoog34oHS2KN26WjcUhf1fMbVezr", "amount": "200.00000000", "created_at": 1730971042, "updated_at": 1730971042 }, { "status": "Confirmed", "txid": "b58cc528a6c9da6ead0cf6ec02feadfb2c7fcd21afd271676165fb4b9b752ad8", "from": "THESRF9s9o5PY4wPijP7BfP8K7xi5LfFu1", "to": "TYK6YYUoog34oHS2KN26WjcUhf1fMbVezr", "amount": "99.00000000", "created_at": 1730971042, "updated_at": 1730971042 } ] } }

5. Create a Withdrawal

Initiate a withdrawal from your wallet.

Method Name: v1/create_withdrawal

POST Fields: (in addition to the Main Fields described in the Overview)

Field Description Required?
amount Amount to withdraw in specified currency. Yes
currency Cryptocurrency to withdraw (e.g., BTC, ETH). Yes
network Cryptocurrency network (e.g., TRON, ETHERIUM). Yes
withdrawal_address Address to send funds to. Yes
memo (Optional) Memo for the transaction. No
ipn_url (Optional) URL for IPN callbacks. No

Response:

        

{ "status": true, "msg": "Withdrawal created successfully. We will processed within 24 hours.", "info": "3d7d6a89-88e4-42be-a8eb-c8d5ca5b6c36" }

6. Cancel a Withdrawal

Cancel a pending withdrawal request.

Method Name: v1/cancel_withdrawal

POST Fields: (in addition to the Main Fields described in the Overview)

Field Description Required?
tx_id Withdrawal ID (must be in "Awaiting email confirmation" status). Yes

Response:

        

{ "status": true, "msg": "Withdrawal successfully cancelled.", "info": "04f42922-4193-482e-8931-d7faed9e54cb" }

7. Get Withdrawal Information

Retrieve details of a specific withdrawal.

Method Name: v1/get_withdrawal_info

POST Fields: (in addition to the Main Fields described in the Overview)

Field Description Required?
tx_id Withdrawal ID to query. Yes

Response:

        

{ "status": true, "msg": "OK", "info": { "status": "In-process", // In-process, Confirmed, Cancelled "hash": "-", "tx_id": "3d7d6a89-88e4-42be-a8eb-c8d5ca5b6c36", "withdrawal_address": "TDshSyXxxxxxxxxxxxxxx9ftJ1N317ho79w", "amount": "101.54654", "fees": "0", "currency": "USDT", "network": "TRC20", "memo": "api withdrawal", "cancel_reason": "test test", "created_at": 1731153767, "updated_at": 1731153767 } }

For any additional API needs or questions, please reach out through the Contact section of the Funexpay website.