Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.borga.is/llms.txt

Use this file to discover all available pages before exploring further.

A refund returns funds to the customer for a completed payment. Omit amount to refund the full payment amount, or pass a specific value to issue a partial refund. Multiple partial refunds can be issued against the same payment until the fully refunded amount equals the original charge. Status values
ValueDescription
pendingRefund has been submitted and is being processed.
succeededFunds have been returned to the customer.
failedRefund could not be processed. Contact support if this occurs.

Create a refund

POST /v1/refunds Issues a refund against an existing payment. The payment must have a status of succeeded or partially_refunded.

Request parameters

payment
string
required
ID of the payment to refund (e.g. pay_xxx).
amount
number
Amount to refund in whole ISK kronur. Minimum value is 1. Omit to refund the full remaining amount of the payment.
reason
string
Reason for the refund. Stored on the refund object and visible in the dashboard.
metadata
object
Set of key-value pairs to attach to the refund. Values must be strings.
curl --request POST \
  --url https://api.borga.is/v1/refunds \
  --header "Authorization: Bearer sk_live_..." \
  --header "X-Merchant-Id: mer_xxx" \
  --header "Content-Type: application/json" \
  --data '{
    "payment": "pay_01hx9z3k2mfq7nbvd4cw8ej5rt",
    "amount": 1990,
    "reason": "Customer request",
    "metadata": {
      "support_ticket": "tkt_8821"
    }
  }'

Response fields

id
string
required
Unique identifier for the refund (e.g. ref_xxx).
payment
string
required
ID of the payment that was refunded.
amount
number
required
Amount refunded in whole ISK kronur.
currency
string
required
Three-letter ISO 4217 currency code, inherited from the payment.
status
string
required
Current refund status. One of pending, succeeded, failed.
reason
string
Reason provided at creation.
metadata
object
Key-value pairs attached to the refund.
created_at
string
required
ISO 8601 timestamp of when the refund was created.
{
  "id": "ref_01hxa4p7qwrs3nt5vjb8ck2mde",
  "payment": "pay_01hx9z3k2mfq7nbvd4cw8ej5rt",
  "amount": 1990,
  "currency": "ISK",
  "status": "pending",
  "reason": "Customer request",
  "metadata": {
    "support_ticket": "tkt_8821"
  },
  "created_at": "2026-04-29T12:00:00Z"
}

List refunds

GET /v1/refunds Returns a paginated list of refunds, ordered by creation date descending.

Query parameters

payment
string
Filter refunds by payment ID. Use this to retrieve all refunds for a specific payment.
limit
number
Maximum number of refunds to return per page.
curl --request GET \
  --url "https://api.borga.is/v1/refunds?payment=pay_01hx9z3k2mfq7nbvd4cw8ej5rt&limit=10" \
  --header "Authorization: Bearer sk_live_..." \
  --header "X-Merchant-Id: mer_xxx"

Response fields

data
object[]
required
Array of refund objects.
has_more
boolean
required
Whether more refunds exist beyond this page.
{
  "data": [
    {
      "id": "ref_01hxa4p7qwrs3nt5vjb8ck2mde",
      "payment": "pay_01hx9z3k2mfq7nbvd4cw8ej5rt",
      "amount": 1990,
      "currency": "ISK",
      "status": "succeeded",
      "reason": "Customer request",
      "metadata": {},
      "created_at": "2026-04-29T12:00:00Z"
    }
  ],
  "has_more": false
}

Retrieve a refund

GET /v1/refunds/{id} Retrieves the details of an existing refund.

Path parameters

id
string
required
The ID of the refund to retrieve.
curl --request GET \
  --url https://api.borga.is/v1/refunds/ref_01hxa4p7qwrs3nt5vjb8ck2mde \
  --header "Authorization: Bearer sk_live_..." \
  --header "X-Merchant-Id: mer_xxx"

Response fields

id
string
required
Unique refund identifier.
payment
string
required
ID of the refunded payment.
amount
number
required
Refunded amount in whole ISK kronur.
currency
string
required
Three-letter ISO 4217 currency code.
status
string
required
Current refund status. One of pending, succeeded, failed.
reason
string
Reason for the refund.
metadata
object
Key-value pairs attached to the refund.
created_at
string
required
ISO 8601 timestamp of when the refund was created.
{
  "id": "ref_01hxa4p7qwrs3nt5vjb8ck2mde",
  "payment": "pay_01hx9z3k2mfq7nbvd4cw8ej5rt",
  "amount": 1990,
  "currency": "ISK",
  "status": "succeeded",
  "reason": "Customer request",
  "metadata": {
    "support_ticket": "tkt_8821"
  },
  "created_at": "2026-04-29T12:00:00Z"
}