Refund
الاسترداد (Refund)
GLS-000144
Definition
Returning money to a customer for a payment they made — either in full or partially.
إعادة المال إلى عميل مقابل دفع قام به — كاملًا أو جزئيًا.
Why It Matters
Every marketplace needs a refund flow. A customer who can't get a refund for a failed service will dispute the charge — which is worse for the platform.
كل سوق يحتاج تدفق استرداد. العميل الذي لا يستطيع استرداد أموال مقابل خدمة فاشلة سيعترض على التحصيل — وهو أسوأ للمنصة.
Full Definition
Example Usage
“An order is canceled 10 minutes after placement. The backend calls stripe.refunds.create({ payment_intent: pi_xxx }) to automatically refund the customer.”
“يُلغى طلب بعد 10 دقائق من تقديمه. الخادم يستدعي stripe.refunds.create({ payment_intent: pi_xxx }) لاسترداد أموال العميل تلقائيًا.”
AI Builder Tips
Avoid these mistakes when using Refund:
Not testing refunds in Stripe test mode before going live
Not handling the charge.refunded webhook to update your database when Stripe processes the refund
Sign in to unlock guided AI explanations from AI Teacher.
Generate a Prompt
Copy this prompt and use it directly with any AI model — no setup needed.
Help me build a project using Refund. Explain: 1. What is Refund and why it matters 2. The core architecture and required tools 3. Step-by-step implementation plan 4. Common mistakes to avoid: Not testing refunds in Stripe test mode before going live, Not handling the charge.refunded webhook to update your database when Stripe processes the refund 5. Best practices and production tips