PayFacto API - v2.0 - GET /refunds
PayFacto API - v2.0 - GET /refunds
Returns a paginated list of refunds sorted from most recent to oldest.
π
Authentication β HTTP Basic Auth
All v2.0 endpoints use HTTP Basic Authentication. Set Authorization: Basic base64(username:password). Contact PayFacto for credentials.
π
Content-Type
All request bodies require Content-Type: application/json.
π
Idempotency
Include Idempotency-Key header (max 64 chars) on POST requests. 200 = duplicate; 201 = newly created.
π΅
Amounts
All monetary amounts are positive integers in cents. $12.99 = 1299.
GET https://uat.ca.api.payfacto.cloud/payments/v1/refunds
βΉοΈ
All parameters are query string parameters. No request body required.
Query parameters
| Parameter | Type / Constraint | Description |
|---|
| terminalId | string (UUID) Β· optional | Restrict to a terminal. |
| authCode | string max 6 Β· optional | Filter by auth code. |
| idempotencyKey | string max 64 Β· optional | Filter by idempotency key. Overrides other filters. |
| invoiceNumber | string max 25 Β· optional | Filter by invoice number. |
| lastFour | string 4 digits Β· optional | Filter by last 4 card digits. |
| startDate | string YYYY-MM-DD Β· optional | Start date UTC. Default: 30 days before endDate. |
| endDate | string YYYY-MM-DD Β· optional | End date UTC. Default: today. |
| offset | integer Β· optional | Pagination offset. Default: 0. |
| limit | integer Β· optional | Max per page. Default: 10. |
3
Request β Code Example
Response fields
| Field | Type | Description |
|---|
| itemsTotal | integer | Total matching refunds. |
| data | array | Refund objects for current page. |
| error | object | Present only on failure. |
5
Response β Code Example
JSON β 200 Success
{
"itemsTotal": 1,
"data": [{ "id": "3a2049fb-6c9f-433d-9cef-701b6843f0cd", "amount": 1299, "chargeId": "a1822999-099d-4fb1-a354-77be553a5b22", "status": "SUCCEEDED", "transactionTime": "2024-05-15T17:00:01Z" }]
}6
Error / HTTP Status Codes
| HTTP Status | Meaning | Recommended Action |
|---|
| 200 | OK β Previously created (same idempotency key) | Check status field in response body |
| 201 | Created β New resource created | Store the id for future operations |
| 400 | Bad Request β Invalid payload | Check error.details and error.invalidFields |
| 402 | Payment Required β Issuer declined | Check result.declineCode β do not retry automatically |
| 404 | Not Found | Verify the ID in the request path |
| 422 | Unprocessable β Invalid state | Check error.message |
| 500 | Internal Server Error | Retry with backoff; contact PayFacto Support if persistent |