Skip to main content
POST
Refund a captured payment

Authorizations

X-Suby-Api-Key
string
header
required

Secret API key. sk_live_… (production) or sk_sandbox_… (sandbox).

Path Parameters

id
string
required
Example:

"pay_abc123"

Body

application/json
amount
integer

Amount to refund, in cents. Omit for a full refund of the remaining amount.

Required range: x >= 1
reason
string

Optional merchant-facing refund reason.

Maximum string length: 500

Response

Refund accepted (status flips to REFUNDED / PARTIALLY_REFUNDED via webhook)

success
boolean
required
Example:

true

data
object
required

Endpoint-specific payload.

message
string