Stripe Payments & SaaS Billing Systems · บทเรียน

คูปอง ส่วนลด และรหัสส่งเสริมการขาย

เพิ่มอัตราการเปลี่ยนเป็นลูกค้าและการรักษาลูกค้าด้วยคูปอง Stripe รหัสส่งเสริมการขายสำหรับลูกค้า และส่วนลดที่ใช้กับการสมัครสมาชิกและใบแจ้งหนี้

บทเรียน 4 จาก 413 ขั้นตอน

คูปอง ส่วนลด และรหัสส่งเสริมการขาย เป็นบทเรียน Stripe Payments & SaaS Billing Systems ฟรีบน CoddyKit นี่คือบทเรียนที่ 4 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน Stripe Payments & SaaS Billing Systems และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส Stripe Payments & SaaS Billing Systems มีบทเรียนทั้งหมด 4 บทเรียน

บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ

Why Discounts Matter

Discounts drive sign-ups, win-back, and loyalty. Stripe has first-class support for coupons and promotion codes on subscriptions.

Coupons vs Promotion Codes

A coupon defines the discount logic. A promotion code is a customer-facing string that points to a coupon.

  • Coupon: 20% off
  • Promo code: SAVE20

Percentage vs Amount Off

A coupon discounts either a percentage or a fixed amount in a currency.

const coupon = { percent_off: 20 };
const price = 5000;
const discounted = price * (1 - coupon.percent_off / 100);
console.log(discounted);

Duration of a Coupon

Coupons have a duration: once (one invoice), repeating (a set number of months), or forever.

Creating a Coupon

You create coupons in the dashboard or via API.

const coupon = await stripe.coupons.create({
  percent_off: 25,
  duration: 'repeating',
  duration_in_months: 3
});

Adding a Promotion Code

Wrap a coupon in a promo code so customers can type it at checkout.

const promo = await stripe.promotionCodes.create({
  coupon: coupon.id,
  code: 'SAVE25'
});

Restrictions on Promo Codes

Promotion codes can be limited: first-time customers only, a minimum order amount, a max redemption count, or an expiry date.

Applying at Checkout

Enable the promo code field in Checkout so customers can self-apply codes without code changes.

const session = await stripe.checkout.sessions.create({
  mode: 'subscription',
  allow_promotion_codes: true,
  line_items: [{ price: 'price_123', quantity: 1 }]
});

Applying to an Existing Subscription

You can attach a discount to a running subscription, useful for retention offers when someone tries to cancel.

await stripe.subscriptions.update('sub_123', {
  discounts: [{ coupon: 'coupon_abc' }]
});

Discounts and Proration

Discounts interact with proration when plans change mid-cycle. Always test the resulting invoice preview to confirm the final charge.

Tracking Redemptions

Monitor how often each promo code is used and its impact on conversion, so you can retire underperforming offers.

Quick Check

What is the difference between a coupon and a promotion code?

Recap

You learned to offer discounts in Stripe:

  • Coupons define the discount; promo codes expose it to customers
  • Percentage or amount off, with once/repeating/forever duration
  • Restrictions like first-time-only and expiry
  • Apply at checkout or to existing subscriptions for retention
เริ่มต้นได้ฟรี

เรียนรู้ Stripe Payments & SaaS Billing Systems ด้วย AI tutor — ฟรี

เขียนและเรียกใช้โค้ดจริงในเบราว์เซอร์ของคุณ รับความช่วยเหลือทันทีจาก AI tutor 24/7 และเรียนรู้ต่อจากที่คุณหยุดบนเว็บหรือในแอป

คอร์ส
12
บทเรียน
48

คำถามที่พบบ่อย

บทเรียน “คูปอง ส่วนลด และรหัสส่งเสริมการขาย” ฟรีหรือไม่

ใช่ — ข้อความเต็มของ “คูปอง ส่วนลด และรหัสส่งเสริมการขาย” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส Stripe Payments & SaaS Billing Systems ให้อัปเกรดเป็น CoddyKit PRO คอร์ส Stripe Payments & SaaS Billing Systems มีบทเรียนทั้งหมด 4 บทเรียน

คุณจะเรียนรู้อะไรในบทเรียน “คูปอง ส่วนลด และรหัสส่งเสริมการขาย”

เพิ่มอัตราการเปลี่ยนเป็นลูกค้าและการรักษาลูกค้าด้วยคูปอง Stripe รหัสส่งเสริมการขายสำหรับลูกค้า และส่วนลดที่ใช้กับการสมัครสมาชิกและใบแจ้งหนี้ คุณปฏิบัติ Stripe Payments & SaaS Billing Systems ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน

คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน Stripe Payments & SaaS Billing Systems หรือไม่

ไม่จำเป็นต้องมีประสบการณ์มาก่อน Stripe Payments & SaaS Billing Systems บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 4 จากทั้งหมด 4 บทเรียน

บทเรียน “คูปอง ส่วนลด และรหัสส่งเสริมการขาย” ใช้เวลานานแค่ไหน

บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย

ฉันเขียนและรันโค้ดในบทเรียน Stripe Payments & SaaS Billing Systems นี้ได้ไหม

ได้ บทเรียน Stripe Payments & SaaS Billing Systems ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ

บทเรียนทั้งหมดในหลักสูตรนี้

  1. การจัดการช่วงทดลองใช้และการอัปเกรดแผน
  2. การนำการคำนวณตามสัดส่วนและการเรียกเก็บเงินตามการใช้งานมาใช้
  3. การจัดการวงจรชีวิตและเหตุการณ์ของการสมัครสมาชิก
  4. คูปอง ส่วนลด และรหัสส่งเสริมการขาย
← กลับไปที่ Stripe Payments & SaaS Billing Systems