Unlike payloads initiated on the website, Coinapult API calls carry a 1% fee.The Coinapult API allows programs to send Coinapult payloads in an automated fashion.
Why go through the trouble of writing all of this yourself? Use one of our easy libraries.
Coinapult API methods take POST data as input and return a json encoded object.
Most API methods require Coinapult API credentials (key & secret).* This is to avoid spamming the system with unused Bitcoin addresses. An automated way of generating API credentials will be up soon, but until then, please request them through the contact form.
Authentication is a 2 step process. First, each request must include your API key, so we can match it to your account. Second, each request must include an SHA512 hashed HMAC.
- Make an object (php) or dictionary (python) of the request parameters, sorted alphabetically by key.
- JSON encode the object. (use compact encoding, with no whitespace)
- Use your API secret to generate an SHA512 HMAC of the JSON encoded object.
- Add the HMAC to the request parameters.
That's it. Your request is ready to send.
*The old API with no authentication will be supported until Jan. 1 2013
Coinapult errors are JSON encoded objects with two properties:
|errorcode||A numerical error code.|
|message||An error message.|
If the returned object has a property 'errorcode', it should be considered an error.
Send BTC Payload
Create a payload. Until you send Bitcoin to the returned address, this payload is unfunded, and will not be sent.
|key||Your API key|
|to||The recipient's email address or cell phone number (US and Canada only)|
|from||The sender's email address|
|message||The message to include (optional)|
|uuid||Your order id. Must be unique to your API credentials. (optional)|
|addr||A fresh bitcoin address. Send your coin to it, and the email will go out immediately.|
Get Payload Details
Gets the recovery URL for the payload matching the supplied uuid. Note that the uuid must be supplied by your application at the time the payload is created.
|key||Your API key|
|uuid||Your order id. Must be unique to your API credentials.|
|url||Recovery URL for the payload|