Recurring Billing with the QuickBooks Payments API

How you can use the QuickBooks Payments API for recurring billing!

I want to start off by saying the API itself does not provide the ability to charge a credit card on a regular schedule. However, as a developer you can create a wallet for a customer, store the tokenized credit card in said wallet, and retrieve it to charge it monthly. Once you know how to store and retrieve cards from the wallet, the sky is the limit to any features you want to add on. So let’s get into the details, because that’s where the devil is.

  1. Create your app and add payments as a data source.
  2. Create a token from a credit card using the create token API call. See example below.

11-6-2015 3-30-47 PM

3. Store the card by token in the wallet using the Card API Call. Make sure you have the customer id to which a card should be stored. The Customer ID can be any ID you want that identifies the customer to you. For example, if they were a customer in your QuickBooks Company file, you could put the Customer ID as an easy reference.


11-6-2015 3-33-02 PM

4. Now you can retrieve the card by card id or you can retrieve all cards for that user ID. Once you have the card back, you can create a new charge.


11-6-2015 3-34-46 PM

That’s pretty much it. Easy right?

Happy coding!






3 responses to “Recurring Billing with the QuickBooks Payments API”

  1. Ryan Avatar

    According to the documentation, “This is a one time token with 15 minute long life span.” (https://developer.intuit.com/docs/api/payments/tokens). The documentation also notes that “A given token can only be used for one charges transaction. You must create a new token prior to each charges transaction.”

    Can anyone confirm how to charge a card on a recurring basis since the token expires after 15 minutes and can only be used for one charge?

    1. Brian Avatar

      Is there any update regarding this? With recurring billing, since the refresh_token expires after 100 days, does this require the user to continuously authenticate through the intuit OAuth 2.0 workflow?

      1. Bret Avatar

        Still waiting for any update on this? A recurring billing solution will require the ability to charge cards that a customer has already saved previously. Seems like this should be able to be done without going through full PCI-certification if our App server never handles the credit card data (offloads all of the card data security and actual charging to Quickbooks).

Leave a Reply

Your email address will not be published. Required fields are marked *