Skip to content

Create a Refund

POST
/v1/refunds
curl --request POST \
--url https://api.parasta.io/v1/refunds \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "payment_id": "pi_abc123", "metadata": { "reason": "customer_requested" } }'

Creates a full refund for a succeeded Payment. v1 does not support partial refunds.

Media type application/json
object
payment_id
required
string
metadata
object
key
additional properties
string
Example
{
"payment_id": "pi_abc123",
"metadata": {
"reason": "customer_requested"
}
}

Created

Media type application/json
object
id
required
string
payment_id
required
string
amount
required

Always equal to the original payment amount in v1 (full refund only)

integer format: int64
currency
required
string
status
required
string
Allowed values: pending succeeded failed
tx_hash
string | null
created
string format: date-time
Example
{
"id": "re_abc123",
"status": "pending"
}

Object not found

Media type application/json
object
error
required
object
type
required
string
Allowed values: authentication_error permission_error invalid_request_error not_found_error rate_limit_error idempotency_error payment_error network_error api_error
code
required
string
message
required
string
param
string
request_id
string
Example
{
"error": {
"type": "authentication_error"
}
}