Sample - Stripe API
POST/v1/application_fees/{fee}/refunds/{id}

Update an application fee refund

Updates metadata on a specific application fee refund without changing other refund properties. Use fee and id to identify the refund, and provide metadata to set, update, or clear metadata entries.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.
  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 parameters · 2 body fields
feestringrequired
The unique identifier of the application fee containing the refund. Maximum 5,000 characters.
idstringrequired
The unique identifier of the application fee refund to update. Maximum 5,000 characters.

Partial application fee refund update; only metadata and response expansion are accepted.

expandarray<string>optional
Specifies which fields in the response should be expanded.
metadataobjectoptional
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`.

2 status codes
200Returns the updated application fee refund with its amount, currency, parent fee identifier, refund identifier, and current metadata.
amountintegerrequired
Amount, in cents (or local equivalent).
balance_transactionstringoptional
Balance transaction that describes the impact on your account balance.
createdintegerrequired
Time at which the object was created. Measured in seconds since the Unix epoch.
currencystringrequired
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
feestringrequired
ID of the application fee that was refunded.
idstringrequired
Unique identifier for the object.
metadataobjectoptional
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.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
Allowed:fee_refund
defaultError response.
errorobjectrequired

Error handling

fee and id must each be no longer than 5,000 characters and must identify the application fee and refund to update. metadata must be a string-keyed value map, or an empty string when you want to clear all metadata; only metadata can be updated.