# Refunds and Partial Refunds — Stripe Payments

Source: https://www.skillbyai.com/en/stripe-payments/o-refunds

> Returning money to the customer.

## How refunds work

A **Refund** returns all or part of a successful payment to the original payment method. Create it against the PaymentIntent (or Charge); omit `amount` for a full refund or pass a smaller amount for a **partial refund**, and you can issue several partial refunds up to the original total. Refunds to cards typically take several business days to appear on the customer's statement, and the original processing fees are generally not returned, so check the pricing docs for your country. A refund can itself fail (for example if the card was closed), so listen for refund-related events such as `charge.refunded` and `refund.failed` where relevant. To release an uncaptured authorisation, cancel the PaymentIntent instead.

## Money in, money back, money out

After a payment succeeds, money may be refunded, disputed, paid out to your bank or split with other businesses.

![Three ideas: refunds, disputes and evidence, and balances, payouts and Connect.](assets/figures/stripe-payments/section-6-map.svg) — Figure 6.1 — Payment, balance, payout and connected accounts.

## Full and partial refunds

Server-side Node.js.

```javascript
// full refund
await stripe.refunds.create({ payment_intent: 'pi_...' });

// partial refund of 10.00 with a reason and your own reference
await stripe.refunds.create(
  {
    payment_intent: 'pi_...',
    amount: 1000,
    reason: 'requested_by_customer',
    metadata: { orderId: 'ord_123', returnId: 'ret_9' },
  },
  { idempotencyKey: 'refund-ret_9' },
);

// release an authorisation that was never captured
await stripe.paymentIntents.cancel('pi_...');

```

## Refund rather than wait for a dispute

If a customer is clearly unhappy, a prompt refund is usually cheaper than a dispute, which carries a fee and harms your dispute rate.

**Quiz:** How do you issue a partial refund?

- [ ] Delete the PaymentIntent
- [ ] Cancel the Customer
- [x] Create a Refund with an amount smaller than the original payment
- [ ] Edit the Price to a lower amount

*Answer:* Create a Refund with an amount smaller than the original payment. The amount parameter controls how much is returned.
