Refunds
Create and manage refunds for payments.
Create Refund
POST https://api.invoiless.com/v1/payments/:id/refunds
Create a refund for a payment.
Example:
{
"amount": 50.00,
"method": "BankTransfer",
"reason": "CustomerRequest",
"refundedAt": "2024-01-20",
"notes": "Refund processed per customer request"
}
Path Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| id | string | Payment id | Yes |
Header Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| scope-id | string | Scope id | No |
Body Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| number | string | Refund number (max 20 characters) | No |
| amount | number | Refund amount (must be positive, max 2 decimal places). If not provided, the full payment amount will be refunded | No |
| method | string | Refund method, possible values are Cash, Cheque, Card, BankTransfer, or Other | No |
| reason | string | Refund reason, possible values are Duplicate, CustomerRequest, Cancelled, BillingError, Fraudulent, or Other | Yes |
| refundedAt | date | Refund date | No, default is current date |
| notes | string | Refund notes (max 500 characters) | No |
| sendNotification | bool | Send refund notification email to customer | No, default is false |
Get Refund
GET https://api.invoiless.com/v1/refunds/:id
Retrieve a specific refund by ID.
Path Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| id | string | Refund id | Yes |
Get Refunds
GET https://api.invoiless.com/v1/payments/:id/refunds
Retrieve all refunds for a specific payment.
Path Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| id | string | Payment id | Yes |
Update Refund
PUT https://api.invoiless.com/v1/refunds/:id
PATCH https://api.invoiless.com/v1/refunds/:id
Update an existing refund. See PUT vs PATCH for details on the differences.
Path Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| id | string | Refund id | Yes |
Body Parameters
Accepts the same parameters as Create Refund.
Delete Refund
DELETE https://api.invoiless.com/v1/refunds/:id
Permanently delete a refund.
Path Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| id | string | Refund id | Yes |