Skip to main content

Overview

Refunds allow you to return funds to customers for orders or subscriptions.

The Refund Object

id
string
required
Unique identifier for the refund
order_id
string
required
ID of the order being refunded
subscription_id
string
Associated subscription ID
customer_id
string
required
ID of the customer
amount
integer
required
Refund amount in cents
currency
string
required
Three-letter ISO currency code
reason
string
Reason for refund
comment
string
Internal comment
succeeded
boolean
required
Whether the refund succeeded
failure_reason
string
Reason for failure (if applicable)
created_at
string
required
Creation timestamp

List Refunds

cURL
curl -X GET "https://api.polar.sh/v1/refunds" \
  -H "Authorization: Bearer polar_pat_..."

Query Parameters

organization_id
string
Filter by organization
order_id
string
Filter by order
subscription_id
string
Filter by subscription
customer_id
string
Filter by customer
external_customer_id
string
Filter by external customer ID
succeeded
boolean
Filter by success status

Create Refund

cURL
curl -X POST "https://api.polar.sh/v1/refunds" \
  -H "Authorization: Bearer polar_pat_..." \
  -H "Content-Type: application/json" \
  -d '{
    "order_id": "order_123",
    "amount": 2999,
    "reason": "requested_by_customer"
  }'

Request Body

order_id
string
required
Order ID to refund
amount
integer
required
Amount to refund in cents
reason
enum
Reason: duplicate, fraudulent, requested_by_customer, or other
comment
string
Internal comment

Response

201
Created
Returns the created refund object

Errors

403
Forbidden
Order is already fully refunded

Examples

Full Refund

curl -X POST "https://api.polar.sh/v1/refunds" \
  -H "Authorization: Bearer polar_pat_..." \
  -H "Content-Type: application/json" \
  -d '{
    "order_id": "order_abc123",
    "amount": 4999,
    "reason": "requested_by_customer",
    "comment": "Customer changed their mind"
  }'

Partial Refund

curl -X POST "https://api.polar.sh/v1/refunds" \
  -H "Authorization: Bearer polar_pat_..." \
  -H "Content-Type: application/json" \
  -d '{
    "order_id": "order_abc123",
    "amount": 1000,
    "reason": "other",
    "comment": "Partial refund for service issue"
  }'

List Customer Refunds

curl -X GET "https://api.polar.sh/v1/refunds?customer_id=cust_123" \
  -H "Authorization: Bearer polar_pat_..."

Build docs developers (and LLMs) love