Skip to main content
Refund a sale, either fully or partially. Once a sale is refunded, it cannot be reversed through the API.
Refunding a sale will trigger a refund webhook notification if configured.

Endpoint

PUT https://api.gumroad.com/v2/sales/:id/refund

Authentication

Requires either the refund_sales or edit_sales OAuth scope.

Path Parameters

id
string
required
The unique external ID of the sale to refund.

Body Parameters

amount_cents
integer
Amount to refund in cents. If not specified, the entire refundable amount will be refunded.For partial refunds, this must be less than or equal to the remaining refundable amount.Example: 1500 for $15.00

Response

Returns the updated sale object if the refund was successful.
success
boolean
required
Indicates if the refund was successful.
sale
object
required
The updated sale object with refund information.

Example Request

curl -X PUT "https://api.gumroad.com/v2/sales/ABC123XYZ/refund" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Example Response

{
  "success": true,
  "sale": {
    "id": "ABC123XYZ",
    "email": "[email protected]",
    "seller_id": "seller456",
    "created_at": "2024-01-15T10:30:45.000Z",
    "product_id": "prod_abc123",
    "product_name": "My Awesome Product",
    "price": 2999,
    "gumroad_fee": 314,
    "formatted_display_price": "$29.99",
    "refunded": true,
    "partially_refunded": false,
    "amount_refundable_in_currency": "$0.00",
    "order_id": 123456789
  }
}

Error Response

If the sale cannot be refunded:
{
  "success": false,
  "message": "Purchase is already refunded."
}
If the sale is not found:
{
  "success": false,
  "message": "The sale was not found."
}

Error Codes

400
error
Bad RequestCommon reasons:
  • Sale is already fully refunded
  • Refund amount exceeds refundable amount
  • Invalid amount_cents value
  • Sale cannot be refunded (e.g., too old for PayPal refunds)
401
error
Unauthorized - Invalid or missing access token
403
error
Forbidden - Token does not have refund_sales or edit_sales scope
404
error
Not Found - Sale does not exist or does not belong to the authenticated user

Notes

  • Full refunds will set refunded: true and partially_refunded: false
  • Partial refunds will set refunded: false and partially_refunded: true
  • Multiple partial refunds can be issued until the full amount is refunded
  • The amount_cents parameter uses the purchase’s currency, not USD
  • For multi-currency sales, the amount is converted using the original exchange rate
  • Gumroad fees are automatically adjusted based on the refund amount
  • PayPal refunds must be issued within 180 days of the original transaction
  • Refunds trigger webhook notifications to configured endpoints
  • The buyer will receive an automatic refund notification email

Refund Limitations

PayPal Refunds

  • Must be issued within 180 days of the purchase
  • Cannot refund if the time window has expired
  • Check paypal_refund_expired field in the sale object

Subscription Refunds

  • Refunding a subscription charge does not cancel the subscription
  • To cancel the subscription, use the subscription cancellation endpoint

Chargeback Protection

  • Refunded sales are less likely to result in chargebacks
  • Consider refunding disputed purchases to avoid chargeback fees

Build docs developers (and LLMs) love