Webhook Expansion

Overview of Webhook Expansion, and the contents that return when you enable it.

By default, webhook events only include the ID of the event type. This can be an Account ID, Subscription ID, Product or Item ID, or an Order ID.

When you enable Webhook Expansion, it fully expands the following objects:

  • account
  • order
  • product or item
  • subscription

All account, order, product, and subscription information will return in your webhook. This way, you do not need to subscribe to as many webhook events or fill in the information with API calls.

Enable Webhook Expansion

  1. In the FastSpring App, navigate to Developer Tools > Webhooks > Configuration.
  2. Create a new webhook, or select Edit Webhook Details on an existing webhook.
  3. Select the Enable Webhook Expansion checkbox.
  4. Save your changes.

Account Contents

The account object returns the following information about your customer.

NameTypeDescription
accountobjectHouses details of the customer account.
    idstringFastSpring-generated customer account ID.
    accountstringFastSpring-generated customer account ID.
    contactobjectCustomer's contact details.
        firststringCustomer's first name.
        laststringCustomer's last name.
        email        stringCustomer's email address.
        companystringCustomer's associated company name.
        phonestringCustomer's phone number.
    languagestring2 character ISO code of the language associated with the customer's account.
    countrystring2 character ISO code of the country associated with the customer's account.
    lookupobjectContains lookup IDs for the customer account.
        globalstringExternal customer account ID, generated by FastSpring.
        customstringCustom account ID specified via the /accounts endpoint of the [FastSpring API].
    urlstringURL of the Store's default account management page.

Order Contents

The order object returns the following information about the associated order session.

NameTypeDescription
orderobjectOrder information.
    orderstringInternal order ID. (backward compatibility)
    idstringInternal order ID.
    referencestringCustomer-facing order reference.
    buyerReferencestringPurchase order number.
    completedbooleanTrue for completed orders. Otherwise, false.
    changedintegerDate of the most recent update, in milliseconds.
    changedValueintegerDate of the most recent update, in milliseconds. (backward compatibility)
    changedInSecondsintegerDate of the most recent update, in seconds.
    changedDisplaystringDate of the most recent update to the order. This is formatted for display based on the language in which the order was processed.
    languagestring2 character ISO code of the order language.
    livebooleanTrue indicates a live order. False indicates a test order.
    currencystring3 character ISO code of the order currency.
    payoutCurrencystring3 character ISO code of your disbursement currency.
    invoiceUrlstringURL of the associated invoice.
    accountstringFastSpring-generated customer account ID.
    totalnumberOrder total in the transaction's currency.
    totalDisplaystringOrder total, formatted for display in the transaction's currency.
    totalInPayoutCurrencynumberOrder total in your disbursement currency.
    totalInPayoutCurrencyDisplaystringOrder total formatted to display in your disbursement currency.
    taxnumberTax amount
    taxDisplaystringTax amount, formatted for display in the transaction's currency.
    taxInPayoutCurrencynumberTax amount in the currency of your FastSpring disbursements.
    taxInPayoutCurrencyDisplaystringTax amount, formatted for display in the currency of your FastSpring disbursements.
    subtotalnumberOrder subtotal in the transaction's currency.
    subtotalDisplaystringOrder subtotal, formatted for display in the transaction's currency.
    subtotalInPayoutCurrencynumberOrder subtotal in the currency of your FastSpring disbursements.
    subtotalInPayoutCurrencyDisplaystringOrder subtotal, formatted to display in the currency of your FastSpring disbursements.
    discountnumberTotal amount of all discounts associated with the order. This displays in the currency associated with the subscription instance.
    discountDisplaystringTotal amount of all discounts associated with the order, formatted for display in the associated currency.
    discountInPayoutCurrencynumberTotal amount of all discounts associated with the order, in your disbursement currency.
    discountInPayoutCurrencyDisplaystringTotal amount of all discounts associated with the order, formatted for display in your FastSpring disbursements currency.
    discountWithTaxnumberDiscount amount, including tax.
    discountWithTaxDisplaystringDiscount amount including tax, formatted for display in the transaction's currency
    discountWithTaxInPayoutCurrencynumberDiscount amount including tax, in the currency of your FastSpring disbursements.
    discountWithTaxInPayoutCurrencyDisplay        stringDiscount amount including tax, formatted for display in the currency of your FastSpring disbursements.
    billDescriptorstringDescription information sent to the payment account for display on the customer's statement.
    paymentobjectPayment method information.
        typestringPayment method used for the order: paypal, amazon, creditcard, test, bank, alipay, purchase-order, free.
        creditcardstringType of credit or debit card used for the order: visa, mastercard, amex, discover, jcb, carteblanche, dinersclub, unionpay.
        cardEndingstringLast four digits of the card number used for the order.
        bankstringType of bank transfer used to pay for the order: wire, brazilwire, ideal, giropay, sofort, ecard, sepa, alipay
    customerobjectCustomer information.
        firststringCustomer's first name.
        laststringCustomer's last name.
        emailstringCustomer's email address.
        companystringCustomer's company name.
        phonestringCustomer's telephone number.
    addressobjectAddress information associated with the order.
       citystringCity
        addressLine1stringFirst line of the address. This is applicable when you enable Force physical address collection for all orders on your storefront.
        addressLine2stringSecond line of the address. This is applicable when you enable Force physical address collection for all orders on your storefront.
        regionCodestring2 character ISO code of the US state.
        regionDisplaystringState or region, formatted for display.
        regionstringState or region. (backward compatibility)
        postalCodestringPostal code.
        countrystringCountry.
        displaystringString of address information formatted for display.
    recipientsarrayCustomer and gift recipient information. This differs from customer and address information on gift purchases.
    recipientobjectRecipient information.
        firststringRecipient's first name.
        laststringRecipient's last name.
        emailstringRecipient's email address.
        companystringRecipient's associated company.
        phonestringRecipient's phone number.
        accountstringRecipient's FastSpring-generated customer account ID.
        addressobjectObject containing recipient address information
            citystringRecipient's city
            regionCodestring2 character ISO code of the recipient's state.
            regionDisplaystringRecipient's state or region, formatted for display.
            regionstringRecipient's state or region.
            postalCodestringRecipient's postal code.
            countrystringRecipient's country.
            displaystringString of address information formatted for display.
    notesarrayInternal order notes. You can add notes within the app.

Product Contents

The product object returns the following information regarding the items within the order session.

NameTypeDescription
product objectThis object displays product information associated with the order.
    productstringProduct ID and path.
    parentstringID of the parent product. This only applies to variations.
    displayobjectCustomer-facing display name. This may include additional strings for each language.
    descriptionobjectContents of the product's Summary, Long Description, and Call to Action fields.
        summaryobjectContents of the product's Summary field. This may include additional strings for each language.
        actionobjectContents of the product's Call to Action field. This may include additional strings for each language.
        fullobjectContents of the product's Long Description field. This may include additional strings for each language.
    imagestringURL of the image file.
    skustringSKU ID of the product.
    fulfillmentsobjectAssociated fulfillment information.
        instructionsobjectContents of the product's Post Order Instructions field. This may include additional strings for each language.
               objectFulfillment information. This object is repeated for each configured product.
            fulfillmentstringFulfillment action name.
            namestringDescription of the fulfillment action type. This includes the file name for the file downloads.
            applicabilitystringSettings from the Fulfillment Applicability field in the current fulfillment action. ALWAYS, BASE, REBILL ONLY, CONFIGURATION, NON_REBILL_ONLY
            displaystringDisplays the name of the download if the fulfillment action is a Remote URL Download.
            urlstringDisplays the download URL if the fulfillment action is a Remote URL Download.
            sizenumberDisplays the byte size of the download URL if the fulfillment action is a Remote URL Download.
            behaviorstringSetting of the download's Download Version Behavior field: PREFER_EXPLICIT or CURRENT.
            previousarrayPrevious version of the download file, if you have updated it.
                displaystringName of the previous version of the download file.
                sizeintegerSize of the previous version of the download file.
                typestringFile type of the previous download file.
                modifiedintegerDate of the most recent modification of this download file, in milliseconds.
    formatstringProduct format: digital, physical, or digital-and-physical
    attributesobjectProduct-level attributes. This may contain multiple strings consisting of key value pairs.
    pricingobjectProduct pricing information.
        trialintegerNumber of free trial days, if applicable.
        renewstringRenewal date.
        intervalstringSubscription rebill frequency.
        intervalLengthintegerNumber of intervals between rebills.
        intervalCountintegerTotal number of expected rebills.
        quantityBehaviorstringBehavior of the quantity field: allow, lock, or hide.
        quantityDefaultintegerDefault quantity for the product.
        priceobjectProduct price. This may contain multiple pairings for each currency.
        quantityDiscountsobjectAmount or percentage of the product-level discount.

When Use Volume Discounts is selected, this indicates the thresholds and corresponding amounts or percentages.
        dateLimitsEnabledbooleanIndicate whether beginning and end dates have been configured.
        dateLimitsobjectIf date limits are enabled, this indicates the beginning and end date and time for the discount to be applied on an initial transaction.
            startstringFirst date to which the discount will apply.
            endstringFinal date to which the discount will apply.
        discountReasonobjectCustomer-facing description of the discount. This may contain additional strings for each language.
        discountDurationintegerNumber of subscription billings (including the initial transaction) to which the discount will apply.
        reminderNotificationobjectPayment reminder notifications configured for the subscription.
            enabledbooleanTrue indicates payment reminders are enabled.
False indicates payment reminders are disabled.
            intervalstringFrequency of payment reminder notifications.
            intervalLengthintegerNumber of intervals prior to the rebill date that FastSpring sends the
        overdueNotificationobjectDetails of the payment overdue notification configured for the product.
            enabledbooleanIndicates whether payment overdue notifications are enabled for the subscription.
            intervalstringFrequency of payment overdue notifications.
            intervalLengthintegerNumber of intervals following a declined rebill that FastSpring sends the first overdue payment notification.
            amountintegerTotal number of payment overdue notifications that FastSpring will send.
        cancellationobjectCancellation settings applied when a rebill fails.
            intervalstringInterval unit that controls when the subscription will cancel after a failed billing.
            intervalLength        integerNumber of cancelation intervals following a declined rebill. This can follow the last payment overdue notification if the the notifications are enabled.

Item Contents

The items array returns the following information regarding the items within the order session. This array may be used in place of the Products object above.

NameTypeDescription
items arrayOne object for each item in the associated order.
    productstringProduct ID.
    quantityintegerProduct quantity.
    displaystringCustomer-facing display name.
    skustringSKU ID of the product.
    subtotalnumberProduct subtotal, in the transaction's currency.
    subtotalDisplaystringProduct subtotal, formatted for display in the transaction's currency.
    subtotalInPayoutCurrencynumberProduct subtotal, in your disbursement currency.
    subtotalInPayoutCurrencyDisplaystringProduct subtotal, formatted to display in your disbursement currency.
    attributesobjectProduct-level attributes for the associated product.
    discountnumberDiscount amount applied to the product.
    discountDisplaystringDiscount amount applied to the product, formatted to display in the transaction's currency.
    discountInPayoutCurrencynumberDiscount amount applied to the product, in your disbursement currency.
    discountInPayoutCurrencyDisplay    stringDiscount amount applied to the product, formatted to display in your disbursement currency.
    subscriptionstring
object
Subscription ID associated with the order. See Subscriptions below for full contents when webhook expansion is enabled.

Subscription Contents

The subscriptions object returns the following information regarding each subscription in the order session.

NameTypeDescription
subscriptionsobjectSubscription information associated with the ID.
    idstringSubscription ID.
    subscriptionstringSubscription ID.
    activebooleanActivation status.
    statestringCurrent status of the subscription: "active", "overdue", "canceled", "deactivated", "trial"
    changedintegerDate of the most recent change, in milliseconds.
    changedValueintegerDate of the most recent change, in milliseconds. (backward compatibility)
    changedInSecondsintegerDate of the most recent change, in seconds.
    chagedDisplaystringDate of the most recent update to the order. This is formatted for display based on the language in which the order was processed.
    livebooleanTrue indicates a live order. False indicates a test order.
    currencystring3 character ISO code of the order currency.
    accountstringFastSpring customer account ID.
subscriptions.productstringID of the subscription
    displaystringCustomer-facing display name.
    quantityintegerQuantity of the subscription.
    adhocboolean"True" for managed subscriptions. "False" for standard subscriptions.
    autoRenewboolean"True" for automatic subscriptions. "False" for manual renewal subscriptions.
    pricenumberAmount of each subscription rebill.
    priceDisplaystringSubscription rebill amount, formatted for display in the customer's currency.
    priceInPayoutCurrencynumberSubscription price, in your FastSpring disbursement currency.
    priceInPayoutCurrencyDisplaystringSubscription price, formatted for display in your FastSpring disbursement currency.
    discountnumberTotal discounted amount.
    discountDisplaystringTotal discounted amount in the subscription. This is formatted for display in the customer's currency.
    discountInPayoutCurrencynumberTotal discounted amount in the subscription.
    discountInPayoutCurrencyDisplay   stringTotal discounted amount in the subscription. This is formatted for display in your disbursement currency.
    subtotalnumberSubscription subtotal. This does not include tax.
    subtotalDisplaystringSubscription subtotal formatted to display in your disbursement currency.
    subtotalInPayoutCurrencynumberSubscription subtotal, in your disbursement currency.
    subtotalInPayoutCurrencyDisplaystringSubscription subtotal formatted to display in your disbursement currency.
    attributesobjectProduct-level attributes associated with the subscription.
    nextintegerDate of the next rebill, in milliseconds.
    nextValueintegerDate of the next rebill. (backward compatibility)
    nextInSecondsintegerDate of the next rebill, in seconds
    nextDisplaystringDate of the next rebill. This is formatted to display based on the language selected for the original subscription order.
    endintegerExpected end date of the subscription, in milliseconds. This applies to subscriptions with a pre-defined number of charges.
    endValueintegerExpected end date of the subscription, in milliseconds. This applies to subscriptions with a pre-defined number of charges.(backward compatibility)
    endInSecondsintegerExpected end date of the subscription (if any), in seconds. This applies to subscriptions with a pre-defined number of charges.
    endDisplaystringExpected end date of the subscription (if any). This is formatted to display based on the language selected for the original subscription order.
    canceledDateintegerSubscription cancelation date, in milliseconds.
    canceledDateValueintegerSubscription cancelation date, in milliseconds. (backward compatibility)
    canceledDateInSecondsintegerSubscription cancelation date, in seconds.
    canceledDateDisplaystringSubscription cancelation date. This is formatted to display in the customer's language.
    deactivationDateintegerSubscription deactivation date, in milliseconds. Null if the subscription is deactivated immediately.
    deactivationDateValueintegerSubscription deactivation date, in milliseconds. Null if the subscription is deactivated immediately. (backward compatibility)
    deactivationDateInSecondsintegerSubscription deactivation date, in seconds. Null if the subscription is deactivated immediately.
    deactivationDateDisplayintegerSubscription deactivation date. This is formatted to display based on the language selected in the order. Null if the subscription is deactivated immediately.
    sequenceintegerSequence number of the current billing period.
    periodsintegerExpected total number of rebills. This applies to subscriptions with a pre-defined number of charges.
    remainingPeriodsintegerNumber of rebills remaining.
    beginintegerDate that the subscription instance was created, in seconds.
    beginValueintegerDate that the subscription instance was created, in milliseconds. (backward compatibility)
    beginInSecondsintegerDate that the subscription instance was created, in seconds.
    beginDisplaystringDate that the subscription began. This is formatted to display based on the language of the order.
    intervalUnitstringUnit of time that defines the subscription charge interval: "adhoc", "day", "week", "month", "year".
    intervalLengthstringNumber of intervalUnits per billing period.
    nextChargeCurrencystring3 character ISO code of the currency to be used for the next rebill.
    nextChargeDatestringDate of the next rebill, in milliseconds. (backward compatibility)
    nextChargeDateDisplaystringDate of the next rebill, formatted for display based on the language selected for the order.
    nextChargeTotalnumberNext rebill amount.
    nextChargeTotalDisplaystringNext rebill amount, formatted for display based on the nextChargeCurrency.
    nextChargeTotalInPayoutCurrencynumberNext rebill amount, in the currency of your FastSpring disbursements.
    nextChargeTotalInPayoutCurrencyDisplay   stringNext rebill amount, formatted for display in the currency of your FastSpring disbursements.
    nextNotificationTypestringType of notification that is next. "TRIAL_REMINDER", "PAYMENT_REMINDER", "PAYMENT_OVERDUE"
    nextNotificationDateintegerDate of the next reminder notification, in milliseconds.
    nextNotificationDateValueintegerDate of the next reminder notification, in milliseconds. (backward compatibility)
    nextNotificationDateInSecondsintegerDate of the next reminder notification, in seconds.
    nextNotificationDateDisplaystringDate of the next reminder email, formatted for display based on the language of the original order.
    trialReminderobjectDefines when customers will receive trial reminder notifications.
        intervalUnitintegerUnit of time used to define when customers will receive trial reminder notifications: "day", "week", "month", "year".
        intervalLengthintegerNumber of interval units prior to the first subscription charge that
    paymentReminderobjectTiming of the customer-facing reminder email message sent before each rebill.
        intervalUnitstringUnit of time used to define when customers will receive trial reminder notifications: "day", "week", "month", "year".
        intervalLengthintegerNumber of intervalUnitsPrior to each scheduled rebill that FastSpring sends the payment reminder.
    paymentOverdueobjectTiming of customer-facing payment overdue notification when a rebill fails.
        intervalUnitstringUnit of time used to define when customers will receive payment overdue notifications in reference to the failed rebill.
        intervalLengthintegerNumber of interval units following the failed rebill that FastSpring sends the first overdue payment notification.
        totalintegerTotal number of payment overdue notifications to be sent.
        sentintegerNumber of payment overdue notifications that have been sent to date.
    cancellationSettingobjectTiming of automatic subscription cancellation after a failed rebill.
        cancellationstringEvent used to determine the timing of automatic subscription cancellation, as configured for the subscription: AFTER_LAST_NOTIFICATION or AFTER_PAYMENT_FAILURE
        intervalUnitstringUnit of time used to determine when a subscription will be canceled as a result of a failed rebill.
        intervalLengthintegerNumber of interval units following the event trigger that the subscription will be canceled due to a failed subscription billing.
    discountsarrayCoupon applied to the subscription, if any.
        totalDiscountValuenumberTotal discount amount that will apply. This is only present
        discountPathstringID of the coupon applied to the subscription.
        discountDurationintegerTotal number of billings to which the coupon applies.
        percentValuestringDiscount percent applied to the subscription.
        discountValuestringDiscount amount per billing period.
    instructionsarrayRebill instructions.
        typestringType of instructions. May have more than one instruction object, when applicable.
        periodStartDateintegerDate of the beginning of the instruction period, in milliseconds.
        periodStartDateValueintegerDate of the beginning of the instruction period, in milliseconds. (backward compatibility)
        periodStartDateInSecondsintegerDate of the beginning of the instruction period, in seconds.
            periodStartDateDisplaystringDate of the beginning of the instruction period, formatted for display based on the order language.
        periodEndDateintegerDate of the end of the instruction period, in milliseconds.
        periodEndDateValueintegerDate of the end of the instruction period, in milliseconds. (backward compatibility)
        periodEndDateInSecondsintegerDate of the end of the instruction period, in seconds.
        periodEndDateDisplaystringDate of the end of the instruction period, formatted for display based on the order language.
        discountDurationUnitstringAppears when instructions type is "discounted" or "trial"; unit of time used in conjunction with DurationLength to determine the total discount duration.
        discountDurationLengthintegerAppears when instructions type is "discounted" or "trial"; number of discountDurationUnits in the total discount period.
        .discountPercentintegerDiscount percent for the current instruction period.
        discountPercentValueintegerDiscount percent for the current instruction period. (backward compatibility)
        discountPercentDisplaystringDiscount percent for the current instruction period, formatted for display.
        unitDiscountnumberDiscount percent for the current instruction period, in the customer's currency.
        unitDiscountDisplaystringDiscount amount per unit for the current instruction period, formatted for display in the customer's currency.
        unitDiscountInPayoutCurrencynumberDiscount amount per unit for the current instruction period, in your disbursement currency.
        unitDiscountInPayoutCurrencyDisplaystringDiscount amount per unit for the current instruction period, formatted for display in your disbursement currency.
        discountTotalnumberTotal discount amount for the current instruction period, in the customer's currency.
        discountTotalDisplaystringTotal discount amount for the current instruction period, formatted for display in the customer's currency.
        discountTotalInPayoutCurrencynumberTotal discount amount for the current instruction period, in your disbursement currency.
        discountTotalInPayoutCurrencyDisplaystringTotal discount amount for the current instruction period, formatted to display in your disbursement currency.
        pricenumberProduct list price, prior to discounts.
        priceDisplaystringProduct list price, prior to discounts. This is formatted to display in the customer's currency.
        priceInPayoutCurrencynumberProduct list price, prior to discounts, in your disbursement currency.
        priceInPayoutCurrencyDisplaystringProduct list price, prior to discounts. This is formatted to display in your disbursement currency.
        priceTotalnumberTotal price of the current instruction period.
        priceTotalDisplaystringTotal price of the current instruction period. This is formatted to display in the customer's currency.
        priceTotalInPayoutCurrencynumberTotal price of the current instruction period. This is formatted to display in your disbursement currency.
        priceTotalInPayoutCurrencyDisplaystringTotal price of the current instruction period. This is formatted to display in your disbursement currency.
        unitPricenumberUnit price of the instruction period, after the discount is applied.
        unitPriceDisplaystringUnit price of the current instruction period, after the discount is applied. This is formatted to display in the customer's currency.
        unitPriceInPayoutCurrencynumberUnit price of the current instruction period, after the discount is applied. This is formatted to display in the your disbursement currency.
        unitPriceInPayoutCurrencyDisplaystringUnit price of the current instruction period, after the discount is applied. This is formatted to display in the your disbursement currency.
        customReferenceIDstringUse POST /subscriptions to add a value to a subscription instance via the FastSpring API