Skip to main content
POST
/
refunds
Create refund
curl --request POST \
  --url https://api.piriod.com/refunds/ \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'x-simple-workspace: <x-simple-workspace>' \
  --data '
{
  "payment": 123,
  "amount": 123,
  "reason": "duplicate",
  "receipt": "<string>",
  "note": "<string>",
  "metadata": {}
}
'
{
  "payment": 123,
  "amount": 123,
  "reason": "duplicate",
  "receipt": "<string>",
  "id": "<string>",
  "balance": 123,
  "note": "<string>",
  "status": "failed",
  "metadata": {},
  "created": "2023-11-07T05:31:56Z",
  "updated": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://piriod-d406ac55.mintlify.app/llms.txt

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

Authorizations

Authorization
string
header
required

Use header Authorization: Token <api_token>. API tokens are obtained from the Piriod dashboard.

Headers

x-simple-workspace
string
required

Workspace (account) identifier. Required for every request.

x-piriod-test-mode
boolean
default:false

Whether to operate against test-mode data. Defaults to false.

Body

application/json
payment
integer
required

Payment ID being refunded.

amount
number
required
reason
enum<string>
required
Available options:
duplicate,
fraudulent,
requested_by_customer
receipt
string
required
Maximum string length: 256
note
string | null
Maximum string length: 64
metadata
object

Response

Refund created.

payment
integer
required

Payment ID being refunded.

amount
number
required
reason
enum<string>
required
Available options:
duplicate,
fraudulent,
requested_by_customer
receipt
string
required
Maximum string length: 256
id
string
read-only
balance
number
read-only

Remaining refundable balance after this refund.

note
string | null
Maximum string length: 64
status
enum<string>
read-only
Available options:
failed,
succeeded
metadata
object
created
string<date-time>
read-only
updated
string<date-time>
read-only