Hello, Developers!

Billing API

If you're a developer you're in the right place.

RESTish Design

The SnapBill API is designed using REST principles (some, but not all.) The API runs over HTTP, and is located at https://api.snapbill.com/v1.

You can access the entire API using only GET and POST requests. The reason for this is to maintain browsability but it also serves to simplify certain actions and the design.

GET (Discoverability)

GET requests form the discoverable layer of the API. They can be used to retrieve indexes and example forms with controls.

POST (Actions)

All standard requests to the API will be POST requests. These are used to add new clients (POST /v1/client/add), to list existing invoices (POST /v1/invoice/list) and to update (POST /v1/service/{id}/update) or delete (POST /v1/service/{id}/remove).

<?php
$service_url = 'http://api.snapbill.com/v1/example';
$curl = curl_init($service_url);
$curl_post_data = array(
     "client_xid" => 'T:SA',
     "email" => 'email@example.com',
     );
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_post_data);
$curl_response = curl_exec($curl);
curl_close($curl);
 
$xml = new SimpleXMLElement($curl_response);
?>

									

Try out these snippets!
Need help? Jusk ask.


Visit our documentation to learn more and   TRY OUR LIVE DEMO NOW