Creating Subscriptions from Opportunities
Creating Subscriptions from Opportunities
You can generate Subscriptions from Opportunities and automatically push them to Stripe. In order to set the fields on the Opportunity and the Opportunity Product layouts, use the settings on the "Blackthorn | Payments Admin" tab, "Stripe Features" left-hand tab, then the "Deploy Stripe Billing" button.
Set up the Opportunity
- Create an Opportunity or go to an existing one.
- Add Opportunity Line Items.
- Set the
Customer
lookup. - Add additional optional field values as needed:
- Set the
Payment Method
lookup field. If not set, the default will be used. - Set the
Billing Method
field. If left blank, Charge Automatically will be used - Set the
Trial End (Billing Start Date)
field. If left blank, Subscription uses the Price default or starts immediately. - If
Billing Method
field set to "Send Invoice", set theDays Until Due
field. - Set the
Stripe Coupon
field to apply any discounts. - Set the
Memo
field so it is included in invoice PDFs, invoice emails, and the Hosted Invoice Page. - Set the
Trial Period Days
field to defined the number of trial period days before the customer is charged for the first time. BothTrial End
andTrial Period Days
fields if left blank, Subscription uses the Stripe Price default or starts immediately. - Set the
Default Tax
field so tax rates will apply to any subscription item that does not have tax_rates set. - Set the
Billing Cycle Anchor (First Invoice)
field to determine the date of the first full invoice, and, for plans with Month or Year intervals, the day of the month for subsequent invoices. Proration Behavior
: Determines how to handle prorations when the billing cycle changes (e.g., when switching plans, resetting billing_cycle_anchor=now, or starting a trial), or if an item’s quantity changes.
Breaking Change
We no longer set the value of the
Proration Behavior
field on Subscriptions to “Create Prorations” to prevent Coupons from being applied multiple times to the same Subscription.
- Save the record.
Opportunity Products
- Navigate to the "Products" related list on the "Opportunity" record
- Create an Opportunity Product
- In order to make an Opportunity Line Item a Subscription Item in the generated Subscription:
- Set the related
Price
on theOpportunity Line Item
lookup field. The Stripe Price must be related to the selected Product. - Set the
Product Type
picklist to Plan.
- Set the related
- In order to add an Opportunity Line item to the Subscription Customer's first invoice as a one-time item:
- Set the
Product Type
picklist to One-Time.
- Set the
Push to Stripe
- Check the
Push to Stripe
checkbox and save, or automate an Opportunity Stage to trigger this checkbox with a Workflow, Process Builder, or other.
Create Subscription Button
On Payments packages v5.1 and above users can add the 'Create Subscription' button to their page layout and use that button to push data to Stripe and create a new Subscription.
- If successful, the
Subscription
field will be populated, which is a lookup to the generated Subscription. - Stripe will create an invoice for the Subscription. After webhooks process (depending on your org's webhook event processing frequency) a "Stripe Invoice" record will be created in the org and listed on the Subscription's Invoice related list.
Note: An Invoice that is created for a Subscription pushed from Opportunity
, will have the Opportunity
lookup updated on it. If the Opportunity is selected as a Transaction's parent object, then related Transaction records also populate the Opportunity
lookup derived from the Invoice
Opportunity validations when generating subscriptions
Validation when | Error Message |
---|---|
No customer defined on opportunity |
|
No payment method is added to the customer and trying to set the billing method to charge automatically or leaving it blank |
|
Billing method = Send Invoice and Days until Due field is left blank |
|
Billing method = Send invoice but customer email is blank |
|
Trial End < NOW |
|
Trying to push a price with no Price ID populated |
|
Product associated with the price does not match opportunity product |
|
Creating subscriptions from opportunities without adding the line items |
|
Product’s PG doesn’t match with customer’s PG |
|
Price is Inactive |
|
Product Type set to Plan, but no price added |
|
Product Type set to Do Not Include and no other items with Product Type set to Plan have been added. |
|
Updated 2 months ago