Getting Started

Submitting A Payment Request

Don't worry, this will be easy.

Start by creating a JSON object that contains a few pieces of information.

{ "amount": 100, "address": "TRTLv1pacKFJk9QgSmzk2LJWn14JGmTKzReFLz1RgY3K9Ryn7783RDT2TretzfYdck5GMCGzXTuwKfePWQYViNs4avKpnUbrwfQ", "callback": "https://mycoolwebapp.com/process" }

You'll need to supply the amount you want to receive in atomic units. As TurtleCoin™ uses two decimals places, 1.00 TRTL becomes 100 atomic units.

Note: Make sure that you supply the TurtleCoin™ address of a wallet you own to make sure that you receive the funds.

Send The Request To TurtlePay™

Post that request to https://api.turtlepay.io/v1/new using your favorite programming language. We will create a fresh and shiny new wallet (dedicated view and spend keys) just for your request.

Process the Response

You'll receive back a response such as this if everything went according to plan.

{ "sendToAddress": "TRTLuzbkEepSJdmqkMJ11APWaazS8aat2Vmobbve6GA1D8FfMr7PAZZMJv7TozUXaw5y7DN2n626P54J465fhDmFatRSnp61Vkv", "atomicAmount": 100, "amount": 1, "userDefined": {}, "startHeight": 1109310, "endHeight": 1109370, "confirmations": 60, "qrCode": "https://chart.googleapis.com/chart?cht=qr&chs=256x256&chl=turtlecoin://TRTLuzbkEepSJdmqkMJ11APWaazS8aat2Vmobbve6GA1D8FfMr7PAZZMJv7TozUXaw5y7DN2n626P54J465fhDmFatRSnp61Vkv?amount=100" }

Display the sendToAddress to the user and prompt them to make payment to that address in the proper amount as requested.

Note: Payment requests are only valid for approximately 30 minutes (exactly 60 blocks). So it's important that if your user doesn't complete a payment that a new request is completed if they attempt to pay you again.

Relax, We'll Do The Hard Part

Sit back and relax. We'll do the hard parts and wait for the user to send the funds in.

Once we receive the funds, or if something goes wrong, we'll send a message to the callback URL you specified. As soon as your user's payment has enough block confirmations we will immediately forward the funds to the address you specified in your request and send a message to the callback URL you provided with the transaction hash containing your funds (minus the network transaction fee of 0.10 TRTL).

The documentation regarding the information supplied in the callbacks is available in the Public API Interface documentation.

Show Your Support!

Powered by TurtlePay™


Adding a Powered by TurtlePay™ badge to your site is an excellent way to show support for the project and let people know your TurtleCoin™ payments use TurtlePay™. Copy the following code in to your site to add a quick and easy badge.


<a href="https://turtlepay.io"> <img src="https://badge.turtlepay.io/" alt="Powered by TurtlePay" /> </a>

Looking For More?

Check out our GitHub Organization or check out the API documentation