Creating new orders for customers with payment information on file

Last modified February 10, 2016

This article describes how to use the Server API to place an order if the account already has payment details stored in the FastSpring customer account.

Contact support@fastspring.com if you want authorization to be able to process charges to a customer account outside the normal process in which a customer places an order. If you have been authorized to make such charges, the general procedure to implement it is as follows:

  1. After the first order is placed by the customer an internal FastSpring account is created and payment details are saved. Obtain the account ID using the Server webhook account.created or order.created. This webhook will be generated for each order, no matter how the order was initiated -- by the JavaScript API, an ordinary web storefront, or any other way.
  2. Store the account ID that was returned.
  3. Later, when you want to process an order against that account without customer input, compose a JSON array on your server that contains the items in the order.
  4. Make a request to the /orders endpoint using the order payload and customer account ID. 
  • If the payment information is valid, the order is automatically completed. 
  • If the payment information is not valid or is unavailable, you will receive an error. You must handle the error by communicating with the customer and asking them to update their account information using the "Manage Your Account" link that was provided by email when they placed the initial order.