Software tips, techniques, and news.

By Damien Howell  Posted on  October 5th, 2016  in  Free Downloads, FileMaker

FileMaker and Stripe Integration

Imagine a company called Larry's Landscapers. It's a landscaping company that uses FileMaker in variety of ways as part of its day to day operations and has a group of customers for which it maintains lawns and driveways on an as needed basis. Wouldn't it be great if Larry could provide these customers with the same sort of payment convenience that we've all become used to when paying recurring bills? That is, give them the ability to provide payment information just once and then reuse that information, in an easy and secure way, for any and all future payments? Well, Larry, or any business for that matter, can do just that by integrating the Stripe payment platform with their FileMaker solution.

Watch on Youtube: FileMaker and Stripe Integration

Creating a Stripe account

First, you'll need a basic Stripe account. They are free, can be created with just an email address and by default are set up for testing.

FileMaker And Stripe Account Creation

Once you have an account, the only piece of information you will need for testing is your Test Secret Key. It can be found in the API Keys tab of your Account Settings via the Stripe dashboard. This key will be passed to Stripe as a means of account authentication.

FIleMaker And Stripe API Keys

Processing a test payment

Processing a payment via Stripe requires multiple steps and both steps entail POST requests, which are accomplish via the Insert from URL script step.

Creating a customer

Step one is a request for a customer object and is made with the following parameters:

  • stripe customer url
  • payment source, e.g. if a credit card, then you will need to create a token record first, then user source.
  • customer name
  • stripe account test secret key

An example of the POST function call would look like this:

Insert from URL ( $response ; "https://api.stripe.com/v1/customers" ; "-X POST" & " -u " & $SecretKey & " -d description=\"" & $customerName & "\"" & " -d source=" & $cardToken )

The parameters passed in this example represent the standard minimal amount of customer information for a credit card. Additional information, like the cardholder's address, can also be passed along as part of the customer request. You can refer to Stripe's API documentation for more details.

A successful customer request results in Stripe creating a customer and returning a customer object, which, like all objects returned by Stripe, is in JSON format.

A customer is Stripe's secure way of allowing users to create a reusable means by which to charge the same payment source multiple times. It's secure because all the customer data is stored on their servers. (Servers which have been audited by a PCI-certified auditor and are certified to PCI Service Provider Level 1.) It's easy because, once a customer is created, all that's needed for processing a payment is the id of the customer object because this id now represents the customer and all their information.

FileMaker And Stripe Customer ID

Processing a payment

Step two processes the payment by requesting a charge object and is made with the following parameters:

  • stripe charge url
  • charge amount as total amount of the smallest unit of the charge currency, e.g. if USD, then 1 cent
  • currency of the charge, e.g. if USD, then "usd"
  • customer object ID
  • stripe account test secret key

An example of the POST function call would look like this:

Insert from URL ( $response ; "https://api.stripe.com/v1/charges" ; "-X POST" & " -u " & $SecretKey & " -d amount=" & $amount & "¤cy=" & $currency & "&customer=" & $customerID )

As with the request for a customer object, the parameters passed in this example represent the standard minimal amount of charge information. Additional information, like a description of the charge or an email address to send a receipt to, can also be passed along. As before, you can refer to Stripe's API documentation for more details.

A successful charge request results in Stripe returning a charge object. It contains various details about the charge, like if the charge itself was successful, the type of charge it was and how it was verified.

Failed requests and error objects

Stripe has extensive error handling and will return an error object whenever a requests fails.

FileMaker And Stripe Error Object

Going live

Moving beyond testing and processing real payments with Stripe requires the activation of your Stripe account via an account application. Then, once live, you just use your Live Secret Key in place of your Test Secret Key.

Conclusion

Integrating a FileMaker solution and Stripe is both straightforward and simple, and the result is an efficient and secure way for any business to process a wide variety of payments.

Did you know we are an authorized reseller for FileMaker Licensing?
Contact us to discuss upgrading your FileMaker software.

Download
Download the FileMaker and Stripe Integration File
Please complete the form below to download your FREE FileMaker file.
FileMaker Experience *
Terms of Use *
OPT-IN: I agree that I am downloading a completely free FileMaker application file with no strings attached. This file is unlocked, and I may use it for my business or organization as I see fit. Because I am downloading a free file, I agree that I should receive occasional marketing. I understand that I can OPT-OUT of these emails at anytime.
Damien Howell thumbnail
Damien Howell

Damien is an experienced FileMaker developer who is thoughtful and calm in manner with a logical, objective approach.

FileMaker 18 Certified Developer
FileMaker 17 Certified Developer
FileMaker 16 Certified Developer
FileMaker 15 Certified Developer
FileMaker 14 Certified Developer
FileMaker 13 Certified Developer
FileMaker 12 Certified Developer
FileMaker 11 Certified Developer
"We were actually able to add more features than we thought would be possible within our budget. We always experienced a ‘can do’ attitude and DB Services was incredibly patient and easy to work with."
Courtney Hartman
Art Director
"The new FileMaker custom website interface is very user-friendly and easy to follow for our clients. In addition, it is much faster than the old Instant Web Publishing (IWP) interface. Thank you and all the others who have helped us out at DB Services. I am very grateful for the excellent service you provide us. Its nice to know we can call you for help if we have an issue."
Wayne Capek
President
"We needed a solution that would simplify the administration of our responsibilities under our contract with the State of Indiana. We have seen a dramatic increase across the state in the number of potential foster and adoptive parents that have begun the preparation and training process. This increase has resulted in a significant opportunity for children available for adoption. That’s a big win for everyone! And it’s all because we can refer potential parents to the proper state contacts efficiently and quickly."
Chris Morrison
Executive Director
"Thank you for all of your expertise and valuable help. I am so grateful to have found DB Services."
Linda Findlay
Owner
"Thank you for our new database system. We transitioned from a carbon copy paper based system to a digital database. The software has saved us time and money. We used to archive all our jobs in cabinets, now we can look up a job in seconds from anywhere. The software allows us to easily email estimates to our customers in pdf format. In a year there was a return on investment just from eliminating the purchasing of our carbon forms."
Todd Cartmel
Owner
"The new system allows us to create and track jobs for customers along with inventory, something we had been doing with separate word and spreadsheet files. Because it’s now so intuitive, new staff members are able to begin using the database immediately without our usual training session and ‘cheat sheets’ for getting around within the file."
Tom Andrews
President