provider POST /v1/charges/{charge}/refund
@utdk/stripe /v1/charges/{charge}/refund
Create a refund
<p>When you create a new refund, you must specify either a Charge or a PaymentIntent object.</p> <p>This action refunds a previously created charge that’s not refunded yet. Funds are refunded to the credit or debit card that’s originally charged.</p> <p>You can optionally refund only part of a charge. You can repeat this until the entire charge is refunded.</p> <p>After you entirely refund a charge, you can’t refund it again. This method raises an error when it’s called on an already-refunded charge, or when you attempt to refund more money than is left on a charge.</p>
charge path required
The identifier of the charge to refund.
string

Try it

Authentication
Configure credentials for Stripe API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

postchargeschargerefund
POST/v1/charges/{charge}/refund
<p>When you create a new refund, you must specify either a Charge or a PaymentIntent object.</p> <p>This action refunds a previously created charge that’s not refunded yet. Funds are refunded to the credit or debit card that’s originally charged.</p> <p>You can optionally refund only part of a charge. You can repeat this until the entire charge is refunded.</p> <p>After you entirely refund a charge, you can’t refund it again. This method raises an error when it’s called on an already-refunded charge, or when you attempt to refund more money than is left on a charge.</p>

Parameters

required

The identifier of the charge to refund.

Input

A positive integer in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal) representing how much of this charge to refund. Can refund only up to the remaining, unrefunded amount of the charge.

Specifies which fields in the response should be expanded.

For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions.

Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.

The identifier of the PaymentIntent to refund.

String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://docs.stripe.com/radar/lists), and will also help us improve our fraud detection algorithms.

Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge.

Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).<br><br>A transfer can be reversed only by the application that created the charge.

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import stripe from '@utdk/stripe';

await stripe.postchargeschargerefund()