Sync Stripe coupons
Learn how to sync Stripe coupons between Salesforce and Stripe.
The Stripe Billing Connector for Salesforce CPQ enables you to add configurable, stackable coupons to your Stripe subscriptions and subscription items synced from Salesforce. For example, you can offer your customers a one-off discount of 10% off or 50 USD off for the first 3 months of their subscription.
Assign permission sets![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
For coupons to work properly, you must assign the Salesforce user who adds and syncs orders to the Stripe Connector Coupon User permission set. To add a user to the permission set, they must have a Salesforce CPQ licence.
Add a coupon to a Salesforce order or order item![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
The connector exposes the following custom Salesforce objects that you can use together to add discounts to your Stripe subscriptions:
Salesforce object | Description |
---|---|
Quote Stripe Coupon | A Salesforce object representing a Stripe coupon. The Quote Stripe Coupon has a one-to-one field mapping with the Stripe Coupon. |
Quote Stripe Coupon Association | A Salesforce junction object used to correlate a Quote Stripe Coupon to a Quote . |
Quote Line Stripe Coupon Association | A Salesforce junction object used to correlate a Quote Stripe Coupon to a Quote Line . |
When a Salesforce order activates, the connector:
- Identifies any
Quote Stripe Coupon
objects corresponding to the Salesforce order or order line - Serialises the
Quote Stripe Coupon
onto the corresponding Salesforce order or order line - Creates (or re-uses where possible) a Stripe coupon for each Salesforce coupon
- Applies the coupons to the corresponding subscription or subscription item created in Stripe
Re-use Stripe coupons![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
The connector reuses existing Stripe coupons if multiple orders or order items reuse the corresponding Salesforce coupon. Modifying the original Salesforce coupon creates a new Stripe coupon.
Custom mappings for coupons![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
Similar to other native Salesforce objects, you can use the data mapper to map the Quote Stripe Coupon
. By default, the Quote Stripe Coupon
is a one-to-one field mapping to the Stripe Coupon
. You can also add custom metadata to the Quote Stripe Coupon
.
Custom Apex triggers![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
The connector uses custom Apex triggers to serialise the Quote_
on the Salesforce order after update
. If you have custom workflows that modify the Quote_
, make sure the trigger occurs before update
to avoid race conditions between the workflows.
Multi-currency support![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
If you enabled multi-currency and you specify an amount off for the coupon, the connector maps the CurrencyIsoCode
on the Quote Stripe Coupon
to the equivalent Stripe currency during Stripe coupon creation.