Skip to main content
POST
/
payments
/
{paymentId}
/
refund
Issue a refund
curl --request POST \
  --url https://api.recurr.dev/v1/payments/{paymentId}/refund \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": 123
}'
{
  "id": "ref_01HQX...",
  "payment_id": "<string>",
  "amount": 123,
  "currency": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "reason": "<string>"
}

Authorizations

Authorization
string
header
required

Your Recurr secret API key as a Bearer token: Authorization: Bearer rk_live_….

Keys are environment-scoped — rk_live_ operates on live data, rk_test_ on isolated test data (see Test mode). Create, scope, and rotate keys in your dashboard (Settings → API keys, developer role). Secret keys are server-side only — never ship them in an app binary or client JavaScript.

Headers

Idempotency-Key
string

Idempotency key for safe retries on write operations. Pass a unique key per logical request; Recurr returns the original response for duplicate keys within a 24-hour window.

Maximum string length: 255

Path Parameters

paymentId
string
required

Body

application/json
amount
integer | null

Refund amount in smallest currency unit. Null = full refund.

reason
enum<string>
Available options:
customer_request,
goodwill,
duplicate,
fraudulent,
other

Response

201 - application/json

Refund created

id
string
required
Example:

"ref_01HQX..."

payment_id
string
required
amount
integer
required
currency
string
required
status
enum<string>
required
Available options:
pending,
succeeded,
failed
created_at
string<date-time>
required
reason
string