This article applies to Contextual Commerce. (Looking for Classic Commerce documentation?)
In some cases, you may want to pass additional information to the order, to be returned once the order has been processed. For those cases FastSpring offers the way to pass "tags" (information on the order level) and "attributes" (information on the product level).
For custom order tags, the sum of the number of characters supplied for the Key and the Value must not exceed approximately 4,000 characters.
For product attributes, the sum of the number of characters supplied for the Key and the Value must not exceed approximately 400,000 characters.
- To pass tracking information and capture it when the order is placed
- To perform A/B testing to determine the more effective discount or related offer strategies
- To pass vendor-generated variables such as invoice IDs and more
Tags are not retained in the customer account; they are stored as part of the order information and can be obtained via webhooks and /orders endpoint.
Tags can be passed using any of these methods:
|Store Builder Library||Using a secure payload||Passing Sensitive Data with Secure Requests|
|FastSpring API||Passed to /sessions or /orders endpoints in the corresponding scopes|
|FastSpring API||Added to or updated on an existing order record||/orders|
While Tags can be passed and captured on the order level, "attributes" can be passed and captured on the product level. This is useful if you would like to silently pass additional information about the product while preparing the order on your website by using the Store Builder Library or the FastSpring API. The customer will not see these attributes.
Here is an example of the items array that must appear on the product level of the secure payload: