Blog

Software tips, techniques, and news.

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

youtube-preview

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. Please contact us if you would like help integrating Stripe with your FileMaker application.

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

Download the FileMaker and Stripe Integration File

Please complete the form below to download your FREE FileMaker file.

First Name *
Last Name *
Company
Email *
Phone *
FileMaker Experience *
Agree to Terms *
damien howell headshot.
Damien Howell

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