Post-Install Actions และ Onboarding

Post-Install Actions และ Onboarding

การกำหนดค่า Post-Install Action

ใน stripe-app.json:

"post_install_action": {
"type": "external",
"url": "https://app.tajo.io/stripe/onboarding"
}

Onboarding Flow

ขั้นตอนที่ 1: รับ Installation Token

https://app.tajo.io/stripe/onboarding
?account_id=acct_xyz
&install_token=install_tok_abc

ขั้นตอนที่ 2: แลก token กับ access

app.post("/stripe/complete-install", async (req, res) => {
const { install_token } = req.body;
const connection = await stripe.apps.installations.create({
install_token,
});
await db.saveStripeConnection({
accountId: connection.account,
refreshToken: connection.refresh_token,
});
res.redirect("/dashboard?connected=stripe");
});

Best Practices สำหรับ Onboarding

  1. ทำให้สั้น: สูงสุด 3 ขั้นตอนถึง activation
  2. แสดงคุณค่าทันที: แสดง preview ของสิ่งที่พวกเขาจะบรรลุ
  3. ตั้งค่า defaults อัจฉริยะ: กรอก configuration ล่วงหน้าเมื่อเป็นไปได้
  4. แสดงความคืบหน้า: ตัวบ่งชี้ความคืบหน้าที่ชัดเจนตลอดขั้นตอน

ขั้นตอนถัดไป

Subscribe to updates

developer-docs

Drop your email or phone number — we'll send you what matters next.

ผู้ช่วย AI

สวัสดี! ถามฉันเกี่ยวกับเอกสารได้เลย

เริ่มต้นฟรีกับ Brevo