FreshBooks

Search


API Calls

Resources

Run your billing through the FreshBooks API!

by Sunir in on March 1, 2010

With our latest changes, it's now possible to run your web application or subscription service billing on FreshBooks through our API!

Now that you can accept credit cards through the FreshBooks API and keep in sync real-time with FreshBooks Webhooks, FreshBooks is a very powerful billing engine that can manage a large number of billing cases.

You can charge your customers once or on a recurring basis. You can rack up charges over a period of time. You can even be instantly notified when a customer pays or when they go in arrears. And you can do all of this on FreshBooks' well-tested and well-loved billing engine that has had over 1.25 million users on it since May, 2004.

To learn how to get started using FreshBooks to run your application's or service's billing, visit http://developers.freshbooks.com/billing for a list of use cases and recommended solutions.

0 comments

Credit cards now accepted through the API

by Sunir in on February 23, 2010

If you're using FreshBooks for subscription billing, your work-flow just got easier. You can now capture credit cards from inside your own application and send them to FreshBooks over the recurring profiles API.

If you are using an auto-bill capable payment gateway, you can automatically charge your clients credit card by supplying the autobill element when calling recurring.create and recurring.update.

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="recurring.create">
  <recurring>
    ...
    <autobill>
      <gateway_name>Authorize.net</gateway_name>  <!-- Case insensitive gateway name from gateway.list -->
        <card>
          <number>4111 1111 1111 1111</number>  <!-- Can include spaces, hyphens and other punctuation marks -->
          <name>John Smith</name>
          <expiration>
             <month>3</month>
             <year>2012</year>
          </expiration>
        </card>
    </autobill>
   ...
  </recurring>
</request>

Additionally, the response generated by the recurring.list and recurring.get methods include an autobill element. If credit card auto-billing is enabled on a recurring profile then a response will be returned in the following format:

Response

<?xml version="1.0" encoding="utf-8"?>
<response xmlns="http://www.freshbooks.com/api/" status="ok">
  <recurrings page="1" per_page="10" pages="5" total="48">
    <recurring>
      <recurring_id>00000000001</recurring_id>
	  ...

          <autobill>
            <gateway_name>Authorize.Net</gateway_name>
             <card>
              <number>************1111</number>
              <name>John Smith</name>
              <expiration>
                <month>03</month>
                <year>2012</year>
              </expiration>
            </card>
          </autobill>

	  ...
	</recurring>
    ...
  </recurrings>
</response>

We've also added a gateway.list method which returns a list of gateways enabled in your FreshBooks account that can process credit card transactions.

This is a big week for FreshBooks API users! This post is 2 of 3 on new goodies we're providing with the latest release. On Tuesday we told you how to keep in sync with FreshBooks Webhooks. Next, we'll explain how to manage your application's or service's billing on the FreshBooks API.

2 comments

Keep in sync with FreshBooks Webhooks

by Paul Osman in on February 23, 2010

Today, we're happy to announce that FreshBooks now makes it extremely easy for your application to stay in sync with FreshBooks with real-time event notifications using using Webhooks. Webhooks are user-configurable HTTP callbacks that you can register for specific types of events that originate in your FreshBooks system. You can read all about it on our Webhooks documentation.

What can you use Webhooks for? One use case is to keep data in sync with FreshBooks add-ons in real time, without the need for constant polling. This is a huge win for our existing and future integration partners and will allow them to offer a more responsive, real-time experience for their users.

We're looking forward to a new class of real-time notification Add-Ons. Send yourself an SMS text message when you get paid, or update Twitter when you track time, send a "Thank You" email to a client when they pay.

They can also be used to extend existing functionality in FreshBooks with applications that you write yourself. For example, when a client accepts an estimate you've sent them, you can have a program use the FreshBooks API to automatically create and send them an invoice based on that estimate. Or a web application that uses FreshBooks to manage its billing can activate a client's account the second the client pays.

This is a big week for FreshBooks API users! This post is 1 of 3 on new goodies we're providing with the latest release. Next, we'll describe how credit cards are now accepted through the API. We'll finish off by describing how to manage your application's or service's billing through the FreshBooks API.

2 comments

« Older Posts