Rolepay Money System/API
From Nexus
API Documentation
- The API Documentation is only relevant to version number 2.0.0. Anything older than that will not work on this page.
- This API is a read, write, and update API. In order to use the API you must get an API key from the network you intend on making changes to via the API.
- Want to know what an API is? Look here on Wikipedia.
- To navigate this wiki better, please use the navigation on the right side of the screen.
API Features
- User Information (Gets the users account information)
- Transfer Money (Send money from one person to the other)
- Take Money (Takes money from someone then places into network funds)
- Give Money (Takes money from the Network Funds and gives it to someone)
- Server Information (Gets the server information)
- Send Card (Give someone a card)
- Register User (Registers a user into the network)
- Ban User (Adds a user to the ban list for the network)
- Un-Ban User (Removes a user to the ban list for the network)
How to make an API Call
- Before you can make a call to the API you must have keys which will be given to you from the network owner on the web interface.
- There are two way to make a call to the API. Either through HTTP or llMessageLinked();
- If you are going to use llMessageLinked you must request an API script from the network owner.
- When making a call via HTTP just use a simple GET request to the URLs listed under the functions listed below.
User Information
- This function will get the user's account information.
- The information that can be accessed are as followed.
- User's Name
- Account Balance
- Card Number
- If the user is Banned.
Information required for API call
- action (user_info)
- api_key
- user_uuid
HTTP API Call
http://rolepay.nexus-sl.net/api/action/user_info/api_key/{API_KEY}/user_uuid/{USER_UUID} GET
Message Linked API Call
llMessageLinked(LINK_SET, 0, "user_info^{API_KEY}^{USER_UUID}", NULL_KEY);
Example Response
{ "user" : "shymus Roffo", "info" : { "card_number" : "123 456 789 101", "balance" : "200", "banned" : false } }
Transfer Money
- This function will transfer money from person A to person B.
- This function does not have protection, it is advised that you create it on a separate API key and monitor the amount of calls that are made to that key.
Information required for API call
- action (transfer_money)
- api_key
- to
- from
- am (Amount to send)
- t (Include Taxes, True or False) (Optional)
HTTP API Call
http://rolepay.nexus-sl.net/api/action/transfer_money/api_key/{API_KEY}/to/{TO_UUID}/from/{FROM_UUID}/am/{AMOUNT_TO_SEND} GET
Message Linked API Call
llMessageLinked(LINK_SET, 0, "transfer_money^{API_KEY}^{TO_UUID}^{FROM_UUID}^{AMOUNT_TO_SEND}", NULL_KEY);
Example Response
{ "success" : "lukeman Bade successfully sent money to shymus Roffo" }
Take Money
- This function will take money from the user and place it into general funds.
- This function does not have protection, it is advised that you create it on a separate API key and monitor the amount of calls that are made to that key.
Information required for API call
- action (take_money)
- api_key
- from
- am (Amount to send)
HTTP API Call
http://rolepay.nexus-sl.net/api/action/take_money/api_key/{API_KEY}/from/{FROM_UUID}/am/{AMOUNT_TO_SEND} GET
Message Linked API Call
llMessageLinked(LINK_SET, 0, "take_money^{API_KEY}^{FROM_UUID}^{AMOUNT_TO_SEND}", NULL_KEY);
Example Response
{ "success" : "shymus Roffo successfully sent money to Network Funds" }
Give Money
- This function operates like the Take Money feature, except it takes money from the network funds and gives it to the user.
- This function does not have protection, it is advised that you create it on a separate API key and monitor the amount of calls that are made to that key.
Information required for API call
- action (give_money)
- api_key
- to
- am (Amount to send)
HTTP API Call
http://rolepay.nexus-sl.net/api/action/give_money/api_key/{API_KEY}/to/{TO_UUID}/am/{AMOUNT_TO_SEND} GET
Message Linked API Call
llMessageLinked(LINK_SET, 0, "give_money^{API_KEY}^{TO_UUID}^{AMOUNT_TO_SEND}", NULL_KEY);
Example Response
{ "success" : "Network Funds successfully sent money to shymus Roffo" }
Server Information
- This function will get all the information about the network from the server.
Information required for API call
- action (server_info)
- api_key
HTTP API Call
http://rolepay.nexus-sl.net/api/action/give_money/api_key/{API_KEY}/to/{TO_UUID}/am/{AMOUNT_TO_SEND} GET
Message Linked API Call
llMessageLinked(LINK_SET, 0, "server_info^{API_KEY}", NULL_KEY);
Example Response
{ "network_key": "FFB8A3BF-D30B-A59A-F2F0-8AF6B3BE8AB8", "owner_information": { "owner_name": "shymus Roffo", "owner_uuid": "60f68ce2-0efe-4772-beef-823547416e6d" }, "information": { "transactions": "103", "funds": "49955", "start_ammount": null, "tax": "25", "cards_sent": "2", "users_registered": "2" } }