Unsuccessful Subscription Rebills

subscription.charge.failed

FastSpring sends the subscription.charge.failed webhook when a rebill transaction fails. This is likely due to a credit card decline.

When Webhook Expansion is enabled, the webhook includes the complete account and subscription objects. If it is disabled, the webhook only includes the account and subscription IDs.

🚧

Webhooks may be delayed during routine batch processes, such as rebills and subscription deactivations. The webhook immediately enters a queue to be completed as soon as possible, however depending on the size of the queue, it may take some time to complete.

Contents of Event Payload

NameTypeDescription
accountstring
object
FastSpring-generated customer account ID (expansion disabled). If you have enabled webhook expansion, see Account Contents for the full contents of the object.
subscriptionstring
object
Internal subscription ID (expansion disabled). If you have enabled webhook expansion, see Subscription Contents for the full contents of the object.
customReferenceIDstringUse POST /subscriptions to add a value to a subscription instance via the FastSpring API

Examples

Webhook Expansion Disabled

{
  "reason": "EXPIRED_CARD",
  "account": "gB_slATyQBqSpAxA7-1YAg",
  "quote":"QUOT2J52LKCFCHPOYSW6UTRMNZJA"
  "subscription": "nEdzdi5eSoO43fbnXE8DfA"
}

Webhook Expansion Enabled

{
  "reason": "EXPIRED_CARD",
  "account": {
    "id": "gB_slATyQBqSpAxA7-1YAg",
    "account": "gB_slATyQBqSpAxA7-1YAg",
    "contact": {
      "first": "John",
      "last": "Doe",
      "email": "[email protected]",
      "company": null,
      "phone": null
    },
    "language": "en",
    "country": "US",
    "lookup": {
      "global": "VKMqlZ--TIuD44BvXdNkbg"
    },
    "url": "https://yourexamplestore.onfastspring.com/account"
  },
  "quote":"QUOT2J52LKCFCHPOYSW6UTRMNZJA"
  "subscription": {
    "id": "5FR37HFYTOyXUenU75CSrA",
    "subscription": "5FR37HFYTOyXUenU75CSrA",
    "active": true,
    "state": "overdue",
    "changed": 1585937925585,
    "changedValue": 1585937925585,
    "changedInSeconds": 1585937925,
    "changedDisplay": "4/3/20",
    "live": false,
    "currency": "USD",
    "account": "gB_slATyQBqSpAxA7-1YAg",
    "product": "example-subscription-monthly",
    "sku": "SKU1234",
    "display": "Example Subscription - Monthly",
    "quantity": 2,
    "adhoc": false,
    "autoRenew": true,
    "price": 30,
    "priceDisplay": "$30.00",
    "priceInPayoutCurrency": 30,
    "priceInPayoutCurrencyDisplay": "$30.00",
    "discount": 0,
    "discountDisplay": "$0.00",
    "discountInPayoutCurrency": 0,
    "discountInPayoutCurrencyDisplay": "$0.00",
    "subtotal": 60,
    "subtotalDisplay": "$60.00",
    "subtotalInPayoutCurrency": 60,
    "subtotalInPayoutCurrencyDisplay": "$60.00",
    "next": 1589068800000,
    "nextValue": 1589068800000,
    "nextInSeconds": 1589068800,
    "nextDisplay": "5/10/20",
    "end": null,
    "endValue": null,
    "endInSeconds": null,
    "endDisplay": null,
    "canceledDate": null,
    "canceledDateValue": null,
    "canceledDateInSeconds": null,
    "canceledDateDisplay": null,
    "deactivationDate": null,
    "deactivationDateValue": null,
    "deactivationDateInSeconds": null,
    "deactivationDateDisplay": null,
    "sequence": 2,
    "periods": null,
    "remainingPeriods": null,
    "begin": 1585872000000,
    "beginValue": 1585872000000,
    "beginInSeconds": 1585872000,
    "beginDisplay": "4/3/20",
    "intervalUnit": "month",
    "intervalLength": 1,
    "nextChargeCurrency": "USD",
    "nextChargeDate": 1589068800000,
    "nextChargeDateValue": 1589068800000,
    "nextChargeDateInSeconds": 1589068800,
    "nextChargeDateDisplay": "5/10/20",
    "nextChargePreTax": 60,
    "nextChargePreTaxDisplay": "$60.00",
    "nextChargePreTaxInPayoutCurrency": 60,
    "nextChargePreTaxInPayoutCurrencyDisplay": "$60.00",
    "nextChargeTotal": 60,
    "nextChargeTotalDisplay": "$60.00",
    "nextChargeTotalInPayoutCurrency": 60,
    "nextChargeTotalInPayoutCurrencyDisplay": "$60.00",
    "nextNotificationType": "PAYMENT_OVERDUE",
    "nextNotificationDate": 1589673600000,
    "nextNotificationDateValue": 1589673600000,
    "nextNotificationDateInSeconds": 1589673600,
    "nextNotificationDateDisplay": "5/17/20",
    "trialReminder": {
      "intervalUnit": "day",
      "intervalLength": 3
    },
    "paymentReminder": {
      "intervalUnit": "week",
      "intervalLength": 1
    },
    "paymentOverdue": {
      "intervalUnit": "week",
      "intervalLength": 1,
      "total": 1,
      "sent": 0
    },
    "cancellationSetting": {
      "cancellation": "AFTER_LAST_NOTIFICATION",
      "intervalUnit": "week",
      "intervalLength": 1
    },
    "fulfillments": {
      "example-subscription-monthly_license_0": [
        {
          "license": "2Istyc2Vd9LwonSl0mBL",
          "display": "License Key",
          "type": "license"
        }
      ],
      "example-subscription-monthly_file_0": [
        {
          "display": "Example.pdf",
          "size": 224143,
          "file": "https://yourexamplestore.onfastspring.com/account/file/YOU200403-5980-26406F",
          "type": "file"
        }
      ],
      "example-subscription-monthly_license_1": [
        {
          "display": "Example Fulfillment File.pdf",
          "size": 325134,
          "file": "https://yourexamplestore.onfastspring.com/account/file/YOU200403-5980-43396L",
          "type": "file"
        }
      ],
      "instructions": "Thank you for subscribing to Example Subscription Monthly. Please download the installer file using the button or link found on this page. Your license key is also displayed here."
    },
    "instructions": [
      {
        "product": "example-subscription-monthly",
        "type": "regular",
        "periodStartDate": null,
        "periodStartDateValue": null,
        "periodStartDateInSeconds": null,
        "periodStartDateDisplay": null,
        "periodEndDate": null,
        "periodEndDateValue": null,
        "periodEndDateInSeconds": null,
        "periodEndDateDisplay": null,
        "intervalUnit": "month",
        "intervalLength": 1,
        "discountPercent": 0,
        "discountPercentValue": 0,
        "discountPercentDisplay": "0%",
        "discountTotal": 0,
        "discountTotalDisplay": "$0.00",
        "discountTotalInPayoutCurrency": 0,
        "discountTotalInPayoutCurrencyDisplay": "$0.00",
        "unitDiscount": 0,
        "unitDiscountDisplay": "$0.00",
        "unitDiscountInPayoutCurrency": 0,
        "unitDiscountInPayoutCurrencyDisplay": "$0.00",
        "price": 30,
        "priceDisplay": "$30.00",
        "priceInPayoutCurrency": 30,
        "priceInPayoutCurrencyDisplay": "$30.00",
        "priceTotal": 60,
        "priceTotalDisplay": "$60.00",
        "priceTotalInPayoutCurrency": 60,
        "priceTotalInPayoutCurrencyDisplay": "$60.00",
        "unitPrice": 30,
        "unitPriceDisplay": "$30.00",
        "unitPriceInPayoutCurrency": 30,
        "unitPriceInPayoutCurrencyDisplay": "$30.00",
        "total": 60,
        "totalDisplay": "$60.00",
        "totalInPayoutCurrency": 60,
        "totalInPayoutCurrencyDisplay": "$60.00"
      }
    ]
  }
}