Introduction

The TripleA API provides an easy and secure way to begin accepting bitcoin payments.

The TripleA API is organised around HTTP calls. Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. It is fully SSL-secured.

You can use the TripleA API with the Bitcoin Testnet network. The API ID you use with requests determines whether the request is live mode or test mode.

Authentication and base API URL

TripleA API requests do not require authentication. Not to worry, this is a good thing.

Your API ID is linked to a wallet’s master public key.

The URL to reach the API is: https://moneyoverip.io/api/ .

Errors

TripleA uses custom response codes to indicate the success or failure of an API request (return value). A simple result value (ok or notok) is provided with each response.

In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with Stripe’s servers (these are rare).

With most error responses a status message is included which describes the specific error encountered.

0 – OK
101 – Currency is not valid
102 – PUBKey is not valid
103 – Currency is not supported
106 – Currency not supported or date out of range
201 – Wrong or missing argument
301 – Profile not found
302 – Token required
303 – Token invalid
304 – Token expired
305 – No OTP was asked for this profile
306 – Wrong OTP, ask for an OTP again
307 – Wrong OTP
308 – Invalid e-mail address
309 – E-mail address already used
997 – Unknown error
998 – System error
999 – Invalid command

Response data

JSON-encoded response data always includes all relevant and necessary information. No further requests should be needed.

Bitcoin Endpoints

GET Wallets

The TripleA API requires you to have one of these bitcoin wallet types:

  • legacy, the addresses derived from it start with 1...
  • p2sh-segwit, the addresses derived from it start with 3...
  • native segwit, the addresses derived from it start with bc1...

The most common wallet type is legacy.
If you are not sure which wallet type your bitcoin wallet is, you can let us determine it with the wallet detection call.

Returns an array of all wallet supported

Attributes

Wallet object attributes

type
string
The bitcoin wallet type.
legacy, the BIP 32 derivation path is m/0 or m/44’/0’/0’/0, the public key starts with xpub…
p2sh-segwit, the BIP 32 derivation path is m/49’/0’/0’/0, the public key can start with xpub… or ypub…
native segwit, the BIP 32 derivation path is m/84’/0’/0’/0, the public key starts with zpub…
name
string
The name of the wallet. It can be a software, a hardware or a web wallet wallet.
description
string
A small description of the wallet
url
string
The url of the wallet

GET /wallets
curl https://moneyoverip.io/api/wallets
{
  "return": "0",
  "status": "OK",
  "wallets": [
    {
      "type": "legacy",
      "name": "Trezor",
      "description": "Trezor is a hardware wallet providing a high level of security without sacrificing convenience.",
      "url": "https://trezor.io/"
    },
    {
      "url": "https://samouraiwallet.com/",
      "description": "A modern bitcoin wallet hand forged to keep your transactions private and your funds secured.",
      "name": "Samourai",
      "type": "legacy"
    },
    {
      "name": "Exodus",
      "url": "https://www.exodus.io/",
      "description": "Exodus gives you a way to Secure, Manage, and Exchange your blockchain assets in one application",
      "type": "legacy"
    },
    {...},
    {...}
  ]
}

GET Wallet detection

Allows a user to check the type of his wallet.

The call returns the first address derived from the master public key if it is a valid master public key.

Arguments
pubkey
string
Your bitcoin public key. It allows the generation of bitcoin addresses.

GET /wallet_type/:pub
curl https://moneyoverip.io/api/wallet_type/zpub...
{
  "return": "0",
  "status": "OK",
  "addr": "bc1qr9g2tcmw05ls0p5qspkpk47x4jf3gn2deuysae"
}

GET Currencies

Returns the list of supported currencies.

GET /currencies
curl https://moneyoverip.io/api/currencies
{
  "return": "0",
  "status": "OK",
  "resp": [
    "AED",
    "AFN",
    "ALL",
    "AMD",
    {...},
    {...}
  ]
}

POST pubkey

Allows you to post your bitcoin public key.

Returns the API ID and the server public key associated to your pubkey if you pubkey is valid. Otherwise, throws an error.

You can update your preferred local currency, notification email, account name later using this call for example:

Arguments
pub
string
Your bitcoin public key. It allows the generation of bitcoin addresses. If you set it as new_wallet, we generate a wallet for you.
currency
string, optional
Three-letter ISO currency code, in uppercase. Only bitcoin(BTC) is accepted (yet!)
local_currency
string, optional
Three-letter ISO currency code, in lowercase. Must be a supported currency.
info
string, optional
Arbitrary informations
wallet_type
int, optional
The bitcoin wallet type. 1 for legacy, 2 for p2sh-segwit, 3 for native segwit.
If not provided, we will detect it (experimental)
notification_email
email, optional
Default e-mail address to receive updates concerning operations of your bitcoin public key.
return_url
string, optional
Default url to receive updates concerning operations of your bitcoin public key.
account_name
string, optional
The nickname associated to your public key.
account_type
string, optional
The account type of your wallet. Possible values are ‘donation’, ecommerce’ and ‘invoice’.
POST /add_pub
curl https://moneyoverip.io/api/add_pub \
-d '{"pub":"zpub...", "currency":"BTC"}'
{
   "return": "0",
   "status": "OK",
   "api_id": "HA1560418133GBot",
   "server_public_key":"HtP97TXkTUNAtgn7QLGgUG4NBystNqrJX2Ba3TPZL1M="
 }
curl https://moneyoverip.io/api/add_pub \
-d '{"pub":"zpub..." \ 
"notification_email":"marc.dupond@email.com"}'

GET transactions

Allows you to get all transactions of a public key.
Note: this call can be used differently if you are authenticated. Check it here

Returns an array of transaction object.

Arguments
public_key
string
Bitcoin public key
Transaction object attributes
id
integer
Unique identifier associated to your public key
locktime
integer
Earliest time the transaction can be added to the blockchain
value
decimal
Transaction amount in BTC
txid
string
Identification number for the bitcoin transaction
address
string
Bitcoin address involved in the transaction
confirmation
integer
Number of confirmations
blocktime
integer
Time in seconds since epoch (1 Jan 1970)
time
integer
Transaction time in seconds since epoch (1 Jan 1970)
created
timestamp
Database epoch time when the transaction was processed
debit
integer
‘1’ if the transaction is a debit
client_txid
string
Unique identifier of the client for a transaction.
local_currency
string
Three-letter ISO currency code, in lowercase. Must be a supported currency.
rate
float
Exchange rate from BTC to your local currency
rate_datetime
integer
Time when the transaction was initiated
locked_rate_expired
bool
GET /tx/:public_key
{
  "return": "0",
  "status": "OK",
  "tx": [
    {
      "id": 3411,
      "debit": 1,
      "n": 0,
      "locktime": 584407,
      "processed": 1,
      "confirmation": null,
      "value": -5.432e-05,
      "blocktime": null,
      "time": null,
      "vin": "3a792a34f95edac63d6cb661dec2361e825d36b40e32cc1887d8a96e4938f4e2",
      "dbtime": "2019-07-08 01:28:26.546178",
      "txid": "81f56885e498582271e0ebb82423a6170943ee0b1cdac12f331138290e735bda",
      "address": "bc1qy9ua24edcudgrl5almf09tz4nz9gj9etvxhjg9"
    },
    {...},
    {...}
  ]
}

GET exchange

Allows you to get the exchange rate of two given currencies. It is updated every hour.

Returns the amount in the to currency.

Arguments
from
currency
Three-letter ISO currency code, in lowercase. Must be a supported currency.
to
currency
Three-letter ISO currency code, in lowercase. Must be a supported currency.
amount
decimal
Amount of the currency from

GET /exchange/:from/:to/:amount
curl https://moneyoverip.io/api/exchange/BTC/USD/1
{
   "return": "0",
   "status": "OK",
   "amount": 5555.55555555556 
}

GET exchange history

Allows you to get the exchange rate of two currencies at a given date

Returns the amount in the to currency at a given date. Returns an error otherwise

Arguments
from
currency
Three-letter ISO currency code, in lowercase. Must be a supported currency.
to
currency
Three-letter ISO currency code, in lowercase. Must be a supported currency.
date
date, format mm-dd-yyyy
Preferred date for the exchange rate.
GET /exchange_history/:from/:to/:date
curl https://moneyoverip.io/api/exchange_history/BTC/USD/04-03-2019
{
   "return": "0",
   "status": "OK",
   "amount": 3727.27299127579
 }

POST address

Allows you to retrieve an unique bitcoin address derived from the public key

Returns an unique address if a valid bitcoin public key was provided, the local currency given, the exchange rate and the datetime of of the exchange rate. Returns an error otherwise

Arguments
api_id
string
Unique identifier associated to your bitcoin public key
public_key_shared
string, optional
Encrypted client public key.
payload
json, optional
Payload encrypted using public key cryptography.
return_email
string, optional
E-mail to receive update on transactions of you bitcoin address.
expiration
integer, optional
Default 7200 seconds. Time before address is available again if it is not used.
local_currency
string, optional
Three-letter ISO currency code, in lowercase. Must be a supported currency.
client_txid
string, optional
Unique identifier of the client for a transaction.
Payload attributes
api_id
string
TripleA API id.
local_currency
string
Three-letter ISO currency code, in lowercase. Must be a supported currency.
order_amount
string
Order amount in the local currency
POST /set_addr
curl https://moneyoverip.io/api/set_addr -d \
'{"api_id":"HA1560418133GBot"}'
{
  "return": "0",
  "status": "OK",
  "addr": "1GR18W69V9a8WW37JQXdwfHkWLuhnWFG8Y"
  "exchange_rate_datetime": "2019-08-19T02:37:41Z",
  "exchange_rate": 10416.6666666667,
  "local_currency": "USD"
}

GET balance

Allows you to retrieve the balance and the transactions of a given address.

Returns a balance object, a public key cryptography based payload and an array of transaction object if a valid address was provided. Returns an error otherwise.

Arguments
address
string
Bitcoin address involved in the transaction
Balance object attributes
confirmed
decimal
confirmed amount in BTC
unconfirmed
decimal
unconfirmed amount in BTC
tx
array
null if no confirmed transaction. Contains a less detailed output of the Transaction object (locktime, value, txid, blocktime, time)
Transaction object attributes
id
integer
Unique identifier associated to your public key
locktime
integer
Earliest time the transaction can be added to the blockchain
value
decimal
Transaction amount in BTC
txid
string
Identification number for the bitcoin transaction
address
string
Bitcoin address involved in the transaction
confirmation
integer
Number of confirmations
blocktime
integer
Time in seconds since epoch (1 Jan 1970)
time
integer
Transaction time in seconds since epoch (1 Jan 1970)
created
timestamp
Database epoch time when the transaction was processed
debit
integer
‘1’ if the transaction is a debit
client_txid
string
Unique identifier of the client for a transaction.
local_currency
string
Three-letter ISO currency code, in lowercase. Must be a supported currency.
rate
float
Exchange rate from BTC to your local currency
rate_datetime
integer
Time when the transaction was initiated
locked_rate_expired
bool
Payload attributes
api_id
string
TripleA API id
local_currency
string
Three-letter ISO currency code, in lowercase. Must be a supported currency.
order_amount
string
Order amount in the local currency.
exchange_rate
string
Exchange rate from bitcoin to local currency.
exchange_rate_datetime
datetime
Datetime of the exchange rate.
crypto_amount
string
Order amount in bitcoin.
order_status
string
Order status. Can be paid or failed
amount_paid
string
Amount paid in local currency
crypto_amount_paid_conf
string
Amount paid confirmed in bitcoin
crypto_amount_paid_unconf
string
Amount paid unconfirmed in bitcoin
tx_status
string
Status of the transactions associated to the address. confirmed if all the transaction are confirmed, unconfirmed otherwise
tx
array
Contains a less detailed output of the Transaction object (txid, creation datetime of the transaction, conf paid, unconf paid and confirmations)
GET /balance/:address
curl https://moneyoverip.io/api/balance/1GR18W69V9a8WW37JQXdwfHkWLuhnWFG8Y
{
  "return": "0",
  "status": "OK",
  "balance": {
    "confirmed": 0,
    "unconfirmed": 0
  },
  "payload": "r12ecVVTT8/v+5f3jp8cueM4GaI2H5NrPERgolFwAWKXKoFkckxX9uwtHtHEBUKJDyQawHaTrUTjTb263lZ8Qw+HPssXz7rolDFdLZ9KYpWRW+2liJ6oYB9QPnONfBBuDdSbDnSxQJRLk0fWfFJ4lR3UnO9CWXhmF4VE/Qn9STdKLVi1etJRHX6Nh45GyIjQGZBiZgHvYxlSVJheCDonQmyXOwD43eLkg2eWhdvoR4uKCofIcfumlnkzyNvDGCFOddjbr92W1ybHMAqMdyde/ypZuDh7TXeaUkRLechZetq2naEexbNz47v8w32ilFQh0VZsYQJQmR/QfglX07aJK9wgOHZzAb7cUWY5A1+78k0NXSSKawC/I5lfkfs/oj2kfLTxSUgvzscmWzqi/ax5VktorZ0ivPFz7e6uQe8JJvx7s5OoOe7sgp7ItYNzn42rA1Y8HCLIOrMnDf/WTjB5Tf+YL2iOBz/kXDeZsXYsPnWkUc0U1XfBwcVTZceuq5v6Ln98U8yj7Z34+q3GuplYZ07t3EukJr9rCaCFmtqX2053/+8ZrGUzoKuq/cWtzKTIwvrjuKqD1icR7BEK32iLN4OI11mhmRGxMrb20NsGjZdiIPqd+8upIMsdatT1BmFzt14mBDzJvA1+E8uRAEYmVj2Ci/1ljy8=:LjI/XKtJ3pPiEPuqaPrr+A7i/NR7NNHf",
  "tx": [
    {
      "time": 1546385330,
      "value": 0.0790619,
      "blocktime": 1546385330,
      "locktime": 556604,
      "txid": "27f5a2cff88d77d44040c1980091ff6e1e6ff23907b343ccf5e6a7925d2abf19"
    },
    {
      "blocktime": 1546391522,
      "txid": "17216c4d5d875e9ca8dfec26575538041eb4814301496aa766da0502d60099f7",
      "locktime": 556613,
      "time": 1546391522,
      "value": -0.0790619
    }
  ]
}

GET unspent

Allows to get the unspent outputs of a given address

Returns an array of unspent outputs if a valid address was provided. Returns an error otherwise.

Arguments
address
string
Bitcoin address
Unspent object attributes
tx_pos
integer
zero-based index of the output in the transaction’s list of outputs
value
integer
output’s value in minimum coin units (satoshis)
tx_hash
string
output’s transaction hash
height
integer
height of the block the transaction was confirmed in. 0 if the transaction is in the mempool.
GET /unspent/:address
curl https://moneyoverip.io/api/unspent/14XvDyFP7SJkaLAVgwuAactsZiAeebDvps
{
  "return": "0",
  "status": "OK",
  "unspent": [
    {
      "value": 12345,
      "tx_hash": "8d2b7fe352e68daed9e4f646d09f5754771da80a2b0e886262f129ceed50b5ed",
      "tx_pos": 0,
      "height": 577551
    }
  ]
}

GET address info

Allows you to get informations of a given address

Returns informations of an address if a valid address was provided.

Arguments
address
string
Bitcoin address
Address info object attributes
dbtime
timestamp
Database timestamp
info
string
Arbitrary info attached to the address
GET /addr_info/:address
curl https://moneyoverip.io/api/addr_info/14XvDyFP7SJkaLAVgwuAactsZiAeebDvps
{
  "return": "0",
  "status": "OK",
  "info": [
    {
      "info": "address used for my first transaction",
      "dbtime": "2019-03-21 00:23:56.308684"
    },
    {...},
    {...}
  ]
}

POST address info

Allows you to add informations for a given address

Returns a confirmation that the info was succesfully added

Arguments
address
string
Bitcoin address
POST /addr_info
curl https://moneyoverip.io/api/addr_info \
-d '{"addr":"14XvDyFP7SJkaLAVgwuAactsZiAeebDvps","info":"content_info"}'
{
  "return": "0",
  "status": "OK"
}

GET payment form session

Allows you to get informations of a given address

Returns informations of an address if a valid address was provided.

Arguments
form_token
string
When the payment form URL is generated, it already contains a form_token.
Response object properties
crypto_amount
string
String representation of floating point number.
exchange_rate
string
String representation of the floating point value in the local currency which equals 1 cryptocurrency unit.
1 <crypto_currency> = <exchange_rate> <order_currency>
See section POST payment form below for description of all other properties.

GET /payment_form/:form_token
curl https://triplea.io/api/payment_form/FSiSa362738mNk87i23e50q8y7
{
  "return": "0",
  "status": "OK",

  /* Initial payment form data. */
  "crypto_currency":"BTC",
  "exchange_rate":"...",

  /* Form data provided by website to TripleA API. */
  "order_id":"###",
  "order_amount":"1234.98",
  "order_currency":"SGD",
  "user_id":"",
  "user_email":"user@domain.org",
  "payment_cancel_url":"https://...",
  /* Note: payment_complete_url not known until after payment */
  "site_name":"My Online Shop",
  "user_fields":[
    {
      "name":"yourname",
      "display_name":"Your name",
      "required":1,
      "type":"text",
      "value":""
    },
    {
      "name":"delivery_addr",
      "display_name":"Delivery address",
      "required":0,
      "type":"textarea",
      "value":"Line 1<br>Line 2"
    }
  ]
}

POST payment form

Allows an e-commerce site’s backend to request a payment form URL for a given order.

Returns payment form URL that a user can be redirected to, to make Bitcoin payment for a given order.

Arguments
api_id
string
Your TripleA API ID. This identifies which wallet receives payments.
order_id
string
An order ID defined by your e-commerce site.
order_amount
float
The amount to be paid.
order_currency
string
The local currency in which the order amount is expressed.
user_id
string
Optional. If provided, this will be returned with payment updates.
user_email
string
Optional but recommended. If not provided, the e-mail will be required input on the payment form.
payment_cancel_url
string
The URL to redirect the user to if he decides to cancel and leave the payment page.
payment_complete_url
string
The URL to redirect the user to after a successful payment on the payment page.
payment_update_url
string
The URL of a webhook endpoint on your server.
Payment update notifications will be sent by POST request.
See section “Second step” below.
site_name
string
A name to display on the payment page, showing for which merchant the user is about to make a payment.
user_fields
string
An array of field objects.
Field object properties
name
string
For your own internal use.
Format: lowercase letters, numbers, underscore.
display_name
string
Input field name to display to user on payment page.
required
integer
Indicates whether field is required (1) or optional (0).
If a field is optional, “(Optional) ” will be displayed in front of the display name.
type
string
Field types allowed: text, textarea (multi-line input such as address), email.

Note that the user_email field is always present and displayed. Do not add it to the fields, unless you have use for another e-mail address.
value
string
If the value of the field is known (for example, the user’s address was previously saved), you can provide it here for improved user experience.
POST /payment_form
curl https://moneyoverip.io/api/payment_form \
-d '{
  "api_id":"HA11111112222222",
  "order_id":"###",
  "order_amount":"1234.98",
  "order_currency":"SGD",
  "user_id":"",
  "user_email":"user@domain.org",
  "payment_cancel_url":"https://your.site/...",
  "payment_complete_url":"https://your.site/...",
  "payment_update_url":"https://your.site/...",
  "site_name":"My Online Shop",
  "user_fields":[
    {
      "name":"yourname",
      "display_name":"Your name",
      "required":1,
      "type":"text",
      "value":""
    },
    {
      "name":"delivery_addr",
      "display_name":"Delivery address",
      "required":0,
      "type":"textarea",
      "value":"Line 1<br>Line 2"
    }
  ]
}'
{
  "return": "0",
  "status": "OK",
  "payment_page_url":"https://triple-a.io/app/payment_form?form_token=<FORMTOKEN>",
  "auth_response_token":"<RESPONSETOKEN>"
}

GET withdrawal_quote

Allows a merchant (or a partner app on behalf of a merchant) to request a locked exchange rate for funds withdrawal.

Returns a withdrawal ID together and an associated exchanged rate.

The withdrawal ID and exchange rate are valid for 15 minutes. Once expired, the app would need to request a new withdrawal_quote and display the updated amount and/or exchange rate.

GET withdrawal_quote
curl -X GET https://moneyoverip.io/api/withdrawal_quote \
-H "Content-type: application/json" \
-H "Accept: application/json" \
-d '{
  "merchant_api_id": "HA987654321",
  "withdrawal_auth_key": "WDTOKEN987654321",
  "amount": 123.45
}'
// returned data
{
  "exchange_rate": 123.45,
  "crypto_amount": 0.008,
  "merchant_api_id": "HA987654321",
  "withdrawal_id": "WD987654321",
  "result": "0",
  "status": "OK"
}

POST withdrawal

Allows a merchant (or a partner on behalf of a merchant) to confirm a fund withdrawal request (requested using the withdrawal_quote API call).

Returns the status of the withdrawal.

POST withdrawal
curl -X POST https://moneyoverip.io/api/withdrawal \
-H "Content-type: application/json" \
-H "Accept: application/json" \
-d '{
  "withdrawal_auth_key": "WDTOKEN987654321",
  "withdrawal_id": "WD987654321"
}'
// returned data
{
  "withdrawal_status": "pending",
  "result": "0",
  "status": "OK"
}

GET withdrawal

Allows checking the status of a withdrawal request.

Returns the status of the withdrawal.

GET withdrawal
curl -X POST https://moneyoverip.io/api/withdrawal \
-H "Content-type: application/json" \
-H "Accept: application/json" \
-d '{
  "withdrawal_id": "WD987654321"
}'
// returned data
{
  "withdrawal_status": "success",
  "result": "0",
  "status": "OK"
}

TripleA Partners

Following API endpoints are for use by partner platforms and their merchants.

Note that authentication is required and uses a Partner Authentication Key. You can obtain this key from a TripleA account manager.

POST partner_merchant_wallet

Allows a partner to request creation of a TripleA Local Currency wallet for one of their merchants, for a specified local currency.

Returns the created wallet’s merchant API ID, wallet status as well as authentication keys that can be used to update/request merchant wallet information or make withdrawal requests.

A Partner Authentication Key. You can obtain this key from a TripleA account manager.

POST partner_merchant_wallet
curl -X POST https://moneyoverip.io/api/payment_form \
-H "Content-type: application/json" \
-H "Accept: application/json" \
-d '{
  "merchant_name": "...",
  "partner_merchant_id": "merchant_1234",
  "contact": {
    "email": "...",
    "phone": "...",
  },
  "bank_info": {
    
  },
  "partner_auth_key": "PA123456789",
  "local_currency": "USD"
}'
// returned data
{
  "partner_merchant_id": "merchant_1234",
  "merchant_api_id": "HA987654321",
  "merchant_auth_key": "MCTOKEN987654321",
  "withdrawal_auth_key": "WDTOKEN987654321",
  "wallet_status": "pending_kyc",
  "result": "0",
  "status": "OK"
}

GET partner_merchant_wallet

Allows checking the wallet status (whether it is active, or pending KYC).

Returns the merchant wallet’s status.

GET partner_merchant_wallet
curl -X GET https://moneyoverip.io/api/payment_form \
-H "Content-type: application/json" \
-H "Accept: application/json" \
-d '{
  "merchant_api_id": "HA987654321",
  "merchant_auth_key": "MCTOKEN987654321"
}'
// returned data
{
  "partner_merchant_id": "merchant_1234",
  "merchant_api_id": "HA987654321",
  "wallet_status": "active",
  "result": "0",
  "status": "OK"
}

POST partner_merchant_kyc

Allows uploading of one or more KYC documents for a given merchant wallet.

Returns a status indicating if upload was successful.

POST partner_merchant_kyc
curl -X POST https://moneyoverip.io/api/payment_form \
-H "Content-type: application/json" \
-H "Accept: application/json" \
-d '{
  "merchant_auth_key": "MCTOKEN987654321",
  "merchant_api_id": "HA987654321",
  "doc_id": "document1234",
  "description": "...",
  "base64": "data:image/png;base64,...",
  "metadata": {}
}'
// returned data
{
  "merchant_api_id": "HA987654321",
  "doc_id": "document1234",
  "result": "0",
  "status": "OK"
}

TripleA Dashboard

Following API endpoints require authentication and are only used by the TripleA Dashboard.

Dashboard User

Submit, access and modify a profile.

In order to use the TripleA Dashboard, a user can create a profile and fill some informations.
To make things easy, the API uses token based authentication to access and modify your profile’s infos.
Some API calls are only possible through authentication.

POST Send OTP

This call is used to create a profile. Each user needs a unique e-mail address to create an account.

The API uses token based authentication to access and modify the profile’s info. A One-Time Password(OTP) is sent via e-mail in order to get the token.
Reminder: No token based authentication is required to monitor your wallet.

Returns a confirmation that the e-mail was sent. Returns an error otherwise

Arguments
email
string
The e-mail of the account.
firstname
string, optional
The person’s first name. This will be unset if you POST an empty value.
lastname
string, optional
The person’s last name. This will be unset if you POST an empty value.
mobile
string, optional
The person’s mobile phone. This will be unset if you POST an empty value.
country
string, optional
The person’s country. This will be unset if you POST an empty value.
POST /send_otp
curl https://moneyoverip.io/api/send_otp \
-d '{"email":"marc.dupond@email.com"}'
{
  "return": "0",
  "status": "OK"
}

POST check OTP

Allows you to verify your OTP and access your profile.

Returns the token to access and modify data of a given profile

Arguments
email
string
The e-mail of the account.
otp
string
One-Time Password(OTP) sent via e-mail in order to get the token
expiration
int, optional
Expiration time of the session in UNIX time. The default is set at 7200 seconds (2 hours)
POST /check_otp
curl https://moneyoverip.io/api/check_otp
-d '{"email":"marc.dupond@email.com","otp":"123456"}'
     
{
  "return": "0",
  "status": "OK",
  "token": "2d3e55394237a9d3740fe08496dcdcf8"
}

GET profile

Allows you to retrieve your profile’s informations

Returns all informations of an account. Informations are email, mobile, firstname, lastname and country. All informations can be null except email.

Authorization token: Required. Refer to authentication section.

GET /get_profile
curl https://moneyoverip.io/api/get_profile \
-H "Authorization: 2d3e55394237a9d3740fe08496dcdcf8"
{
  "return": "0",
  "status": "OK",
  "firstname": "Marc",
  "country": "SG",
  "lastname": "Dupond",
  "mobile": "12345678",
  "email": "marc.dupond@email.com"
}

POST update profile

Allows you to update and modify information of your profile

Returns a confirmation that the profile was updated. Returns an error otherwise.

Authorization token: Required. Refer to authentication section.

Arguments
firstname
string
The person’s first name.
lastname
string
The person’s last name.
mobile
string
The person’s mobile phone.
country
string
The person’s country.
POST /update_profile
curl https://moneyoverip.io/api/update_profile \
-H "Authorization: 2d3e55394237a9d3740fe08496dcdcf8" \
-d '{"firstname":"Mark"}'
{
  "return": "0",
  "status": "OK"
}

POST Accounts

Allows you to associate public keys to your account.

Returns an array of account object.

Authorization token: Required. Refer to authentication section.

Arguments
pubkeys
array of string, optional
Array of public keys.
Account object attributes
api_id
hash
Unique API ID associated to your public key
account_name
string
Name associated to your public key.
account_type
string
settlement_mode
string
local_currency
string
Three-letter ISO currency code, in lowercase. Must be a supported currency.

POST /get_accounts
curl https://moneyoverip.io/api/get_accounts \
-d '{"pubkeys":["zpub6oRp...","zpub6oXy....]}'
{
  "return": "0",
  "status": "OK",
  "auth_token": "2d3e55394237a9d3740fe08496dcdcf8",
  "accounts": [
    {
      "settlement_mode": "bitcoin-to-bitcoin",
      "account_type": "donations",
      "account_name": "My Super Account",
      "local_currency": "SGD",
      "api_id": "HA1563267689cNlD"
    }
    {...},
    {...}
  ]
}

GET transactions (by API ID)

Allows you to get all transactions for a wallet identified by the given API ID.
Note: this call can be used differently if you are NOT authenticated. Check it here

Returns an array of transaction object.

Authorization token: Required. Refer to authentication section.

Arguments
api_id
string
Unique identifier associated to your public key
Transaction object attributes
id
integer
Unique identifier associated to your public key
locktime
integer
Earliest time the transaction can be added to the blockchain
value
decimal
Transaction amount in BTC
txid
string
Identification number for the bitcoin transaction
address
string
Bitcoin address involved in the transaction
confirmation
integer
Number of confirmations
blocktime
integer
Time in seconds since epoch (1 Jan 1970)
time
integer
Transaction time in seconds since epoch (1 Jan 1970)
created
timestamp
Database epoch time when the transaction was processed
debit
integer
‘1’ if the transaction is a debit
client_txid
string
Unique identifier of the client for a transaction.
local_currency
string
Three-letter ISO currency code, in lowercase. Must be a supported currency.
rate
float
Exchange rate from BTC to your local currency
rate_datetime
integer
Time when the transaction was initiated
locked_rate_expired
bool
GET /tx/:api_id
curl https://moneyoverip.io/api/tx/HA1560418133GBot
{
  "return": "0",
  "status": "OK",
  "auth_token": "2d3e55394237a9d3740fe08436dcdcf5",
  "tx": [
    {
      "id": 3411,
      "debit": 1,
      "n": 0,
      "locktime": 584407,
      "processed": 1,
      "confirmation": null,
      "value": -5.432e-05,
      "blocktime": null,
      "time": null,
      "vin": "3a792a34f95edac63d6cb661dec2361e825d36b40e32cc1887d8a96e4938f4e2",
      "dbtime": "2019-07-08 01:28:26.546178",
      "txid": "81f56885e498582271e0ebb82423a6170943ee0b1cdac12f331138290e735bda",
      "address": "bc1qy9ua24edcudgrl5almf09tz4nz9gj9etvxhjg9"
    },
    {...},
    {...}
  ]
}

POST refund_request

Allows you to request a refund form URL for a given bitcoin payment transaction.

Returns a refund form token, as well as a full URL linking to a refund form.

Authorization token: Required. Refer to authentication section.

POST /refund_request
curl https://moneyoverip.io/api/refund_request \
-d '{
  "auth_token": "2d3e55394237a9d3740fe08436dcdcf5",
  "tx_id": "81f56885e498582271e0ebb82423a6170943ee0b1cdac12f331138290e735bda",
  "refund_amount": "1234.50"
}'
{
  "return": "0",
  "status": "OK",
  "refund": {
    "refund_form_token": "f6we502942pan9d0o93ii08246dcskd8",
    "refund_form_url": "https://triple-a.io/app/refund_form?refund_token=f6we502942pan9d0o93ii08246dcskd8"
  }
}

POST set_refund_addr

Allows you to get all transactions for a wallet identified by the given API ID.
Note: this call can be used differently if you are NOT authenticated. Check it here.

Returns a refund object that contains the status of the refund (either scheduled or processing). If the refund transaction has already been made, a transaction id will be provided as well.

POST /set_refund_addr
curl https://moneyoverip.io/api/set_refund_addr \
-d '{
  "refund_form_token": "2d3e55394237a9d3740fe08436dcdcf5",
  "refund_addr": "bc1qy9ua24edcudgrl5almf09tz4nz9gj9etvxhjg9",
}'
{
  "return": "0",
  "status": "OK",
  "refund": {
    "status": "Scheduled || Processing",
    "tx_id": "" || "81f56885e498582271e0ebb82423a6170943ee0b1cdac12f331138290e735bda"
  }
}