refundPayment¶
Request a full or partial refund for a completed payment.
Request¶
Headers¶
| Header | Required | Description |
|---|---|---|
token |
Yes | Your API Key |
Content-Type |
Yes | application/json |
Body Parameters¶
| Field | Type | Required | Description |
|---|---|---|---|
pay_id |
integer | Yes | The linktopay_id of the payment to refund |
refund_amount |
number | Yes | Amount to refund in EUR |
isFullRefund |
boolean | No | Set to true for full refund (still requires refund_amount) |
refund_amount is required
The refund_amount field is always required — even for full refunds. Set it to the full payment amount when doing a complete refund.
Response¶
Success (ResponseCode: 1)¶
{
"ResponseCode": 1,
"ResponseMsg": "Refund request has been sent successfully, You will get update within 5-10 days",
"Result": "True",
"ServerTime": "CEST"
}
Error (ResponseCode: 0)¶
{
"ResponseCode": 0,
"ResponseMsg": "Please enter refund_amount",
"Result": "False",
"ServerTime": "CEST"
}
| ResponseMsg | Cause |
|---|---|
Please enter pay_id |
Missing pay_id field |
Please enter refund_amount |
Missing refund_amount field |
Invalid link ID |
Link not found or belongs to another user |
Link is cancelled |
Cannot refund a cancelled (unpaid) link |
Refund already requested |
A refund was already submitted for this link |
Refund blocked by dispute |
An active dispute prevents refunding |
Invalid refund amount |
Amount exceeds original payment or is ≤ 0 |
Examples¶
Process¶
- You submit the refund request via API
- The request enters a pending state for admin review
- A SecPaid admin approves or rejects the refund
- If approved, the refund is processed to the customer's original payment method
Not instant
Refunds are not processed immediately. They require admin approval. The API call creates a refund request, not an immediate refund.
Notes¶
- Only one refund request per payment link is allowed
- Refund amount cannot exceed the original payment amount
- No webhook notification is sent when refunds are processed
- Refunds go back to the customer's original payment method
- See Refunds concept for the full lifecycle