Skip to main content
POST
Create refund

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