Collapse Menu
Docs Home
Extensibility Options
Contact Support

Gift Purchases

Overview

Gift purchases allow customers to place an order on behalf of someone else and make payment for a product that will be fulfilled to the gift recipient.

This article provides information about the Gift Purchases feature of your FastSpring Store.

 

About Gift Purchases

Gift purchases allow customers to place an order on behalf of someone else and make payment for a product, having the fulfillment(s) sent to the gift recipient.

For gift purchases, there are two separate types of contacts associated with each transaction:

  • The purchaser is the customer who places a gift order via your Storefront and pays for the order. The purchaser supplies the information for both contacts and does not receive any fulfillment information.
  • The recipient is the person for whom the gift is purchased. The recipient does not pay anything or participate in placing the order but receives all applicable fulfillments for all items in the gift order. Just as FastSpring creates a customer account for every unique purchaser, a separate customer account with a separate account ID is created for the recipient of a gift purchase. Having a separate customer account allows recipients to view their fulfillment information via their account management pages.

Important Notes About Gift Purchases

  • Currently, gift purchases are not available for subscriptions; only for standalone/perpetual license products. If a subscription product is selected, the Gift Purchase checkbox is automatically removed from the form, along with the associated Recipient Information fields.
  • When making a gift purchase, customers must pay using an instant payment method such as a credit or debit card, PayPal, or Amazon Pay. FastSpring cannot accept delayed payment methods such as wire transfers and purchase orders for gift purchases.
  • If an order processed as a gift purchase includes more than one product, all products in the order are considered gifts to the specified recipient. It is not currently possible to combine gifts and non-gifts in a single purchase.
  • Gift purchases are not intended for use when purchasing a gift for a recipient located in another country. Gift purchases should only be used to purchase gifts for recipients who are in the same country as the purchaser.
  • The purchaser and recipient email addresses must be different. If a customer attempts to place an order with the same email address for both the purchaser and recipient, the Storefront displays an error message explaining this.

 

Customer Experience

When you enable gift purchases for a Web Storefront or a Popup Storefront, customers have the option to designate a transaction as a gift purchase. They can do this by selecting the Gift Purchase checkbox in the payment form.

When the Gift Purchase checkbox is selected, the form automatically expands to include additional fields. The purchaser must enter the gift recipient's details for product fulfillment in addition to his or her own details and payment information. The purchaser may optionally enter a gift message (maximum 400 characters) for FastSpring to deliver to the recipient along with the fulfillment(s).

 Sales Tax Note

For orders in the United States, the purchaser must enter the recipient's ZIP code because FastSpring calculates the sales tax based on the recipient's location. Gift orders should only be placed when the purchaser and recipient are located in the same country.

 Email Address Note

The recipient's email address must be different than the purchaser's email address entered below.

When the transaction is complete, the purchaser is presented with a completion page showing the order reference and details of the transaction, including amounts. However, no fulfillment information appears on the completion page. Instead, the fulfillment details are emailed automatically to the gift recipient's email address. The gift recipient's fulfillment email message does not contain price information or charge details.

 Tip

For Popup Storefronts, you can control the color of the gift icon shown at the top of the completion page via the Popup Storefront's Settings → Styling → Completion Page - Checkmark Color.

Conversely, the purchaser's receipt email message contains details of the price and payment method but does not include fulfillment details.

When visiting the Account Management page and viewing a gift purchase, the recipient does not see any payment or price details. Only the fulfillment details appear.

Conversely, a purchaser sees payment and transaction details for a gift order, but no fulfillment details appear.

 

Enabling Gift Purchases

You can turn on the Gift Purchases feature for each Storefront where you want to allow gift purchases. On Storefronts where you have not enabled the feature, customers do not see the Gift Purchase checkbox at all.

To enable gift purchases:

  1. In the FastSpring App, select the Storefronts menu, and select the Web Storefronts or Popup Storefronts tab, depending on the type of Storefront where you want to enable gift purchases.
  2. Click the Settings command for the Storefront where you want to enable gift purchases.

  3. Click the Checkout link on the left-hand side of the page.

  4. Select the Enable Gift Purchases checkbox, and then click .


     
  5. Repeat this process for any other Storefronts where you want to enable gift purchases. 

 

Gift Purchases in the FastSpring App

When you access the Activity menu and drill into the details of an order that was processed as a gift purchase, the Customer section of the detail page has separate sections for the purchaser's information and the recipient's information.

 

Email Templates Used for Gift Purchases

When a customer makes a gift purchase, the Default Order Receipt template is not used to generate the purchaser's receipt email message. Instead, the message is generated using the Default Gift Purchaser Receipt. By default, this message is very similar in look, feel, and content to the Default Order Receipt. However, it specifically mentions that the purchase is a gift. It includes the recipient's name and explains that all applicable fulfillment details are being provided to the recipient directly. No fulfillment details are displayed in the message by default.

In addition to this receipt, the recipient receives an email message with fulfillment details for the purchased products, generated using the Default Gift Recipient Fulfillment template. By default, this message is also similar in look, feel, and content to the Default Order Receipt. However, it does not include any price or payment details; only the list of purchased products and the relevant fulfillment details.

For illustrated examples of both messages, please see the Customer Experience section of this article, above.

For more information about customer-facing email messages, please see:

 

Gift Purchases and Store Builder Library

Using the Store Builder Library (SBL), there are three methods by which you can pre-populate the recipient information. Doing so triggers the order to be processed as a gift purchase. If you use the recognizeRecipients() method or the session object, the gift recipient info is pre-filled in the purchase form, but the purchaser can overwrite or change it. If you use a secure payload to authenticate the recipient info, the info is stored as part of the order record but not displayed in the purchase form at all.

 Store Builder Library Version Note

Important: To pass gift purchase data via the Store Builder Library, you must be using the latest version of SBL--at least version 0.7.7. New versions of SBL are backward compatible, so to update, you only need to update the URL targeting the library (e.g., https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.8.3/fastspring-builder.min.js) in your pages that use SBL.

fastspring.builder.recognizeRecipients()

Takes a JSON "recipient" object consisting of optional recipient info fields as in the following example:

Example of the recipient object to be included in an SBL session object
{
	"email": "recipient@fastspring.com",
	"firstName": "firstName",
	"lastName": "lastName",
	"address": {
		"addressLine1": "Address Line 1",
		"city": "City",
		"region": "California",
		"postalCode": "93101",
		"country": "US"
	},
	"memo": "Happy Birthday!"
}

 

The Session Object

The optional recipient object, illustrated below, can be included in your Store Builder Library session object. You can then push your session using fastspring.builder.push().

Example of the recipient object to be included in an SBL session object
{
	"recipient": {
		"email": "recipient@fastspring.com",
		"firstName": "firstName",
		"lastName": "lastName",
		"address": {
			"addressLine1": "Address Line 1",
			"city": "City",
			"region": "California",
			"postalCode": "93101",
			"country": "US"
		},
		"memo": "Happy Anniversary!"
	}
}

 

Secure Payloads

If you use server-side encryption to encrypt your Store Builder Library payload, you can pass the optional recipient object as part of the payload. Doing so authenticates the recipient information, meaning that the recipient information fields are pre-populated and not shown in the resulting purchase form.

Example of the recipient object in a secure payload
{
	"recipient": {
		"email": "recipient@fastspring.com",
		"firstName": "firstName",
		"lastName": "lastName",
		"address": {
			"addressLine1": "Address Line 1",
			"city": "City",
			"region": "California",
			"postalCode": "93101",
			"country": "US"
		},
		"memo": "Happy Birthday!"
	}
}

 

Possible Error Responses

The following error messages may be returned when attempting to push the recipient object or calling recognizeRecipients().

Possible Error Responses
400 recipient-and-purchaser-country-must-match               // the purchaser's country must match the recipient's country; multiple countries are not supported
400 memo-exceeded-limit                                      // the optional "memo" field value must not exceed 400 characters

 Email Address Note

Although the purchaser and recipient email addresses must differ, the library does not validate this upon pushing the recipient object or calling recognizeRecipients(). Instead, if you push the same email address for both, customers see a user-friendly error message in the Storefront explaining the issue and must change one of the addresses.

 

Gift Purchases in Webhooks and API Responses

When the gift purchases feature was released, a new array named recipients was added to the payload of order-related webhook events such as order.completedThe recipients array was also added to API responses when calling GET /orders. This new array is always present, for both gift and non-gift purchases. If the order in question is a gift purchase, the party identified in the recipient object (inside the recipients array) will be different than the contents of the customer object.

Identifying Gift Purchases

If you need to distinguish between gift and non-gift purchases, consider the following:

Since the gift purchase feature requires that the purchaser's email address must be different than the recipient's, you can compare customer.email with recipients[0].recipient.email. If the two are different, the order is a gift purchase. If they are the same, the order is not a gift purchase.

 

Example of the recipients array in webhook events and API responses
   "recipients":[  
      {  
         "recipient":{  
            "first":"Leeroy",
            "last":"Jenkins",
            "email":"ne1@all.com",
            "company":null,
            "phone":null,
            "memo":"Merry Christmas, Leeroy!",
            "account":"pY_wvH1IRYm8dnET4FRHxQ",
            "address":{  
               "city":"Lincoln",
               "regionCode":"NE",
               "regionDisplay":"Nebraska",
               "region":"Nebraska",
               "postalCode":"68508",
               "country":"US",
               "display":"Lincoln, Nebraska, 68508, US"
            }
         }
      }
   ]

 Webhook Expansion Note

If webhook expansion is enabled, events that include the order object will have the entire account object inside the recipients array rather than just the recipient's account ID.

Try FastSpring

Get a free account and see why FastSpring is the ecommerce partner of choice for software providers around the world. Try our full-service ecommerce solution today to unlock revenue growth for your online company.