Skip to main content
POST
/
api
/
v3
/
admin
/
orders
/
{order_id}
/
refunds
Spree Admin SDK
import { createAdminClient } from '@spree/admin-sdk'

const client = createAdminClient({
  baseUrl: 'https://your-store.com',
  secretKey: 'sk_xxx',
})

const refund = await client.orders.refunds.create('or_UkLWZg9DAJ', {
  payment_id: 'pay_UkLWZg9DAJ',
  amount: 5.00,
  refund_reason_id: 'refrsn_UkLWZg9DAJ',
})
{
  "id": "re_UkLWZg9DAJ",
  "transaction_id": "BGS-162d0a7eaeca",
  "amount": "5.0",
  "payment_id": "py_UkLWZg9DAJ",
  "refund_reason_id": "rr_UkLWZg9DAJ",
  "reimbursement_id": null,
  "metadata": {},
  "created_at": "2026-05-21T18:11:21.881Z",
  "updated_at": "2026-05-21T18:11:21.881Z"
}

Documentation Index

Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-spree-api-key
string
header
required

Secret API key for admin access

Authorization
string
header
required

JWT token for admin user authentication

Headers

x-spree-api-key
string
required
Authorization
string
required

Bearer token for admin authentication

Path Parameters

order_id
string
required

Order ID

Body

application/json
payment_id
string
required

Payment ID

amount
number
required
Example:

10

refund_reason_id
string

Refund reason ID

Response

201 - application/json

refund created