1 回限りの支払いに割引を追加する
クーポンやプロモーションコードで小計を割引して、顧客への請求金額を減らします。
You can use discounts to reduce the amount charged to a customer. Coupons and promotion codes allow you to:
- 購入全体の小計に対して割引を適用する
- 特定の商品に割引を適用する
- パーセントや一定額を使用して請求の合計を減らす
- クーポンに加えて顧客向けのプロモーションコードを作成し、顧客に直接提供する
Create a coupon
Coupons specify a fixed value discount. You can create customer-facing promotion codes that map to a single underlying coupon. This means that the codes FALLPROMO
and SPRINGPROMO
can both point to one 25% off coupon. You can create coupons in the Dashboard or with the API:
クーポンを使用する
To create a session with an applied discount, pass the coupon ID in the coupon
parameter of the discounts array. Checkout Sessions supports up to one coupon or promotion code.
クーポンを設定する
Coupons have the following parameters that you can use:
currency
percent_
またはoff amount_
off max_
redemptions redeem_
(顧客がクーポンを適用できる最終日)by applies_
はクーポンが適用される商品を限定しますto
引き換えの使用を制限する
max_
および redeem_
の値は、すべてのアプリケーションのクーポンに適用されます。たとえば、クーポンを最初の 50 回の使用に制限したり、クーポンを特定の日付までに期限切れにしたりできます。
対象の商品を制限する
Coupon オブジェクトの applies_
ハッシュに商品 ID を追加することで、クーポンを使用した割引の対象商品を限定できます。このクーポンにマッピングされたプロモーションコードも、この対象商品のリストにのみ適用されます。
クーポンを削除する
ダッシュボードまたは API を介してクーポンを削除できます。クーポンを削除すると、そのクーポンは以降の取引や顧客に適用できなくなります。
Create a promotion code
Promotion codes are customer-facing codes created on top of coupons. You can also specify additional restrictions that control when a customer can apply the promotion. You can share these codes with customers who can enter them during checkout to apply a discount.
To create a promotion code, specify an existing coupon
and any restrictions (for example, limiting it to a specific customer
). If you have a specific code to give to your customer (for example, FALL25OFF
), set the code
. If you leave this field blank, we’ll generate a random code
for you.
The code
is case-insensitive and unique across active promotion codes for any customer. For example:
- You can create multiple customer-restricted promotion codes with the same
code
, but you can’t reuse thatcode
for a promotion code redeemable by any customer. - If you create a promotion code that is redeemable by any customer, you can’t create another active promotion code with the same
code
. - You can create a promotion code with
code: NEWUSER
, inactivate it by passingactive: false
, and then create a new promotion code withcode: NEWUSER
.
Promotion codes can be created in the coupons section of the Dashboard or with the API:
プロモーションコードを使用する
サーバーの Checkout セッションで allow_promotion_codes パラメーターを使用して、顧客が引き換えできるプロモーションコードを有効にします。
クライアントで、applyPromotionCode を使用して、顧客が入力するプロモーションコードを適用します。removePromotionCode を使用して、これまで適用されたすべてのプロモーションコードを削除します。
Configure a promotion code
For each promotion code, you can customize eligible customers, redemptions, and other limits.
Limit by customer
To limit a promotion to a particular customer, specify a customer when creating the promotion code. If no customer is specified, any customer can redeem the code.
Limit by first-time order
You can also limit the promotion code to first-time customers with restrictions.first_time_transaction. If the customer
isn’t defined, or if a defined customer
has no prior payments or non-void invoices, it’s considered a first-time transaction.
注
Sessions that don’t create Customers instead create Guest Customers in the Dashboard. Promotion codes limited to first-time customers are still accepted for these Sessions.
Set a minimum amount
With promotion codes, you can set a minimum transaction amount for eligible discount by configuring minimum_amount and minimum_amount_currency. Since promotion code restrictions are checked at redemption time, the minimum transaction amount only applies to the initial payment for a subscription.
Customize expirations
You can set an expiration date on the promotion code using expires_at. If the underlying coupon already has redeem_
set, then the expiration date for the promotion code can’t be later than that of the coupon. If promotion_
isn’t specified, the coupon’s redeem_
automatically populates expires_
.
For example, you might have plans to support a coupon for a year, but you only want it to be redeemable for one week after a customer receives it. You can set coupon[redeem_
to one year from now, and set each promotion_
to one week after it’s created.
Limit redemptions
You can limit the number of redemptions by using max_redemptions, which works similarly to the coupon parameter. If the underlying coupon already has max_
set, then the max_
for the promotion code can’t be greater than that of the coupon.
For example, you might want a seasonal sale coupon to be redeemable by the first 50 customers, but the winter promotion can only use 20 of those redemptions. In this scenario, you can set coupon[max_
and promotion_
.
Inactive promotions
You can set whether a promotion code is currently redeemable by using the active parameter. However, if the underlying coupon for a promotion code becomes invalid, all of its promotion codes become permanently inactive. Similarly, if a promotion code reaches its max_
or expires_
, it becomes permanently inactive. You can’t reactivate these promotion codes.
Delete promotions
You can delete promotions in the Dashboard or the API. Deleting a promotion prevents it from being applied to future transactions or customers.